Strato Windows V Server as Plex Media Server

As already described in previous posts, Plex can be set up on NAS systems and thus used locally in the LAN. The use outside the local network of the server is strongly dependent on the upload of the Internet connection. To work around this, a VPS, Virtual Private Server, can be used for the Plex Media Server. This is hosted in a data center that has a good Internet connection, allowing unrestricted use of remote access. Various providers are eligible for implementation. For Germany, Strato, as the largest provider, offers an easy way to set up a cheap virtual machine.

Compared to the performance on an ARM QNAP NAS, the following configuration already offers more possibilities in the field of transcoding, which improves compatibility with different devices.

Operating systemMicrosoft Windows Server 2019
CPU6 CPU vCore
RAM12 GB
HDD400 GB NVMe
Network1 GBit/s synchronous

Installation

Setup in the Customer Center

The order is placed in the customer center and is within 30 minutes. completed. When commissioned, the administrator password is requested, with which the remote desktop session to the server can be established.

VirtIO Driver

Strato’s virtual Windows servers run on a Red Hat VirtIO platform. After setup, the appropriate drivers must first be installed. As a Windows setup, these are provided by Proxmox and can be downloaded from the following addresses:

An update of the drivers must be done with the “Manual Installation”, because the setup may not be executed correctly.

Network Configuration

With the installation, the server receives a network adapter that is assigned a public IP. Since it is no longer possible to set up virtual machines on an already virtual server, the Plex Media server cannot be operated in one with a private IP.

However, by setting up a second (loopback) adapter, the IP address range and port forwarding for remote access can be implemented. This results in the following advantages over use with public IP.

  • Installation is compliant with the requirement that the Plex media server may only be operated in (private) networks of RFC-1597 or RFC-1918
  • the port through which remote access is made is not limited to 32400
  • remote access is also possible from guest networks if the (public) port is 80 or 443

Setting up the loopback adapter

The loopback adapter can be set up via the device manager.

In the “Action” menu, the corresponding wizard can be called up with “Add Legacy Hardware”.

This then leads through the further installation.

The appropriate driver must be selected manually.

The driver “Microsoft KM-TEST Loopback Adapter” can be found under “Network Adapters” and …

… Manufacturer Microsoft.

After completion of the installation, the new adapter can then be found in the Control Panel under the network connections and should be renamed here in “Loopback” in order to be able to easily identify it later.

In the properties, the IP protocol (v4) should be configured according to RFC-1597 or RFC-1918 . For example, the following values can be used. These can be used regardless of the actual public IP of the server.

  • IP address: 192.168.0.1
  • Subnet mask: 255.255.255.0
  • Default gateway: 192.168.0.254
  • DNS server: 192.168.0.254

The Plex media server can now be bound to the loopback adapter created in this way for remote access. The setting for this can be found in the options under Network. The “Preferred network adapter(s)” must be set to “Loopback (192.168.0.1)”. The name results from the previously configured values (and may differ).

Only the remote access of the clients runs through this, the server can still access the metadata servers of Plex independently of this adapter. This is still done via the (public) Ethernet adapter.

Set up port forwarding

In order for remote access to run over a different port, port forwarding must now be set up for Plex. This forwards the data traffic from the desired public port (the Ethernet adapter) to the internal port 32400 of the loopback adapter. The setup is done via the following command in the command line:

netsh interface portproxy add v4tov4 listenport=<öffentlicher Port> listenaddress=<öffentliche IP des Ethernet-Adapters> connectport=32400 connectaddress=<private IP des Loopback-Adapters>

With concrete values, for example, it looks like this:

  • – 80
  • – 93.137.2.234 (fictitious)
  • – 192.168.0.1
netsh interface portproxy add v4tov4 listenport=80 listenaddress=93.137.2.234 connectport=32400 connectaddress=192.168.0.1

In the Plex network settings, the upload speed must then be specified.

Because the loopback adapter cannot upload, Plex misleadingly displays a non-working remote access. Regardless, the clients can still access the contents of the server.

Limitations when using the loopback adapter

In addition to the aforementioned misleading marking of remote access as non-functional, there is a second restriction that may not be desired. The dashboard no longer displays the bandwidth of the network connection.

Enable domain names for network shares

If the media libraries are to be addressed via UNC paths in order to move them more easily or to use them for DirectPlay via Kodi, the desired domain must be registered as the alternative name of the server. Otherwise, only the direct server name without a domain is valid.

You can make the change using the following PowerShell script.

$altNames = @("KUMO","KUMO.dachs.blog")
$hostName = "KUMO"
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa -Name DisableLoopbackCheck -PropertyType DWord -Value 1
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 -Name BackConnectionHostNames -PropertyType MultiString -Value $altNames
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters -Name OptionalNames -PropertyType MultiString -Value $altNames[0]
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters -Name DisableStrictNameChecking -PropertyType DWord -Value 1
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters -Name DnsOnWire -PropertyType DWord -Value 1

This post is also available in: German English

Leave a Reply