logo smart home family kruse

Kruse Smart Home

Easy living in our smart home & Garden

Install Plex Media Server on a Raspberry Pi

Install Plex Media Server on a Raspberry Pi

27 April 2026

Jan-Willem

1. Introduction

Install Plex Media Server on a Raspberry Pi 5 running Virtualmin (with Apache), including making it reachable via a subdomain as for example plex.example.com, is not complicated. Plex Media Server won’t be an install “inside” a Virtualmin website, but at the host level on server.example.com. Via a dummy Virtualmin website the plex.example.com will be forwarded to the Plex Media Server using Virtualmin/Apache as a reverse proxy.

2. Requirements

Required before starting to install Plex Media Server on a Raspberry Pi:

In this article the domain name plex.example.com is used. Please replace it with your own domain.

3. Setup Plex Media Server

Instructions how to Install Plex Media Server on a Raspberry Pi is divided in the following sections:

  • Install Plex Media Server
  • Create a storage area for media
  • Create a Virtualmin server

3.1 Install Plex Media Server

  1. Assure server is up to date
  2. Install the packages curl and gnupg2 if not available already
  3. Add the official Plex APT repository to a Debian/Ubuntu/Raspberry Pi OS system, so Plex Media Server can be installed and updated via apt:
  4. Execute following commands
  5. Start Plex Media Server now and make sure it starts automatically after every reboot.
  6. Check Plex Media Server is working locallY:

    You should see something like:

    from another device you can use for example (change IP address to the one from your webserver):

    Which will show the Plex Media Server site.

3.2 Create a storage area for media files

  1. Create the media folders
  2. Set the correct rights
  3. Restart Plex

3.3 Create a Virtualmin server

  1. In Virtualmin, create a new virtual server such as with domain name plex.example.com and Apache enabled. SSL will be enabled by default in Virtualmin.

    See also article ‘Install Virtualmin on a Raspberry Pi’
  2. Reverse-proxy Plex through Apache. Make sure required modules are present:
  3. Edit the file ‘plex.familykruse.eu.conf’ in folder ‘/etc/apache2/sites-available’. Add the following under the Port 80 vhost:

    En voor Port 443 vhost:
  4. Restart Apache

3.3 Initial configuration of Plex Media Server

To get the subdomain plex.example.com correctly working throughout Plex Media Server, perform the next steps.

  1. Go in browser to https://plex.example.com
  2. Go to Settings → Server → Network → Show Advanced → Custom server access URLs and add the following:

    Plex documents this option specifically for situations involving a reverse proxy or custom subdomain; the URL is published to plex.tv for server discovery.
  3. Within the server terminal check everyting is working fine by using the commands:

    Something like below should be shown

    What should be shown is:
    – 127.0.0.1:32400/web geeft Plex-response.
    – https://plex.example.com/web gives Plex-response or redirect to Plex web.
    – http://plex.familykruse.eu/web gives a 301 to HTTPS.

4. Finally

This concludes how to install Plex Media Server on a Raspberry Pi running Webmin, Virtualmin and  ConfigServer Security & Firewall. The next step is configuring the Plex Media Server.

Article by <a href="https://smarthome.familykruse.eu/author/iamjwk/" target="_self">Jan-Willem</a>

Article by Jan-Willem

Position

Writen by the website owner

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *