Plex is a platform for managing and streaming media such as movies, TV shows, music, and photos from one central location. With Plex Media Server, you can organize your libraries, and Plex automatically downloads cover art, descriptions, and cast information before streaming everything to your browser, smartphone, smart TV, or streaming device.
In this guide, we'll show you two ways to get started: the easy way with the One-Click App, which makes Plex available over HTTPS in just a few clicks and links it directly to your Plex account, and the manual installation using Docker Compose. Then we'll show you how to upload media, connect the Plex apps, and explain the limitations of running a Plex server in a data center.
A Plex Media Server on a VPS or Dedicated Server is especially useful if:
- you want your media collection to be available around the clock, without having to keep a computer or NAS running at home.
- your home internet connection doesn't have enough upload bandwidth for streaming while you're away or for several people at once. The server streams over the data center's connection.
- you want to share your libraries with family or friends, each with their own Plex account.
- you want to play music and view photos from anywhere, for example with Plexamp.
A data center server is less suitable if you mainly watch content at home on your own network: Plex considers anything outside your local network to be remote access, and playing your own videos remotely has required payment since April 29, 2025 (see “Limitations of Plex on a server” below for more information). A VPS without a graphics card can also quickly reach its limits if your videos often need to be transcoded, for example 4K files for older devices.
Alongside Plex, Jellyfin is one of the main options for running your own media server. Both are available as a One-Click App.
| Plex | Jellyfin | |
|---|---|---|
| Cost | Server is free; remote video playback requires Plex Pass or Remote Watch Pass | Completely free and open source |
| Account | Plex account required; sign in through plex.tv | No provider account; users are stored on your server |
| Apps | Plex apps for smartphones, smart TVs, consoles, and streaming devices | Jellyfin apps for Android, iOS, smart TVs, and streaming devices |
| Hardware transcoding | Requires Plex Pass and a compatible graphics unit | No subscription required, but a compatible graphics unit is also needed |
If you already have a Plex Pass or want to use the Plex apps on your devices, Plex is the obvious choice. If you want to stream videos over the internet without a subscription, Jellyfin is a better fit.
The fastest way to get your own Plex Media Server is through the One-Click Apps on your VPS or Dedicated Server. The app uses the Plex image from LinuxServer.io, is available directly over HTTPS when you use a domain, and is linked to your Plex account during installation. You don't need to use 127.0.0.1 or an SSH tunnel to access it.
- A Linux VPS or Dedicated Server (Debian or Ubuntu) with One-Click Apps set up. See Setting up One-Click Apps for instructions.
- A free Plex account.
- Enough resources and storage for your media: use the table under the requirements for the manual installation as a guide.
To link the new server to your account, you'll need a claim code. Sign in to plex.tv/claim with your Plex account and copy the displayed code, which starts with claim-. The code is only valid for 4 minutes, so get it after you've opened the installation form.
- Open your server in the ZapX dashboard and go to the One-Click Apps tab.
- Find Plex in the app catalog and click Install app.
- Use a custom subdomain or zap.cloud is already selected with a random name. Leave this option enabled or enter your own name: the domain lets you access Plex Web over HTTPS.
- Open App configuration and enter your claim code in
PLEX_CLAIM.TZis already set toEurope/Berlin. Only change it if you're in a different time zone, for exampleEurope/London. - Click Queue installation. Plex will be ready in a few minutes.
As long as the server hasn't been linked to an account yet, simply get a new code. Enter it in the app settings (gear icon) under App environment in PLEX_CLAIM, then click Save. When Plex restarts, it will link the server to your account.
Open the app's Access link. Your browser will open Plex Web, where you can sign in with your Plex account. Plex will then guide you through setup: give your server a name and create your first media libraries.
Behind the One-Click Apps HTTPS proxy, Plex initially only knows its internal server address. So that the Plex apps on your smartphone, smart TV, or streaming device can still find your server, the One-Click App adds its own domain with port 443 as an access URL in Plex as soon as the server is linked to your Plex account. If you change the app's domain later, the app updates the address the next time it starts. An address you entered in Plex yourself is kept.
You only need to add the address yourself if you installed Plex before 28 November 2026 or the Plex apps can't find your server. To check the setting:
- In Plex Web, open Settings (the wrench in the top right), select Network, and click Show Advanced.
- Under Custom server access URLs, check whether your domain and port are listed, for example
https://plex.example.com:443. If the field is empty, enter the address in this format. - Click Save Changes.
Plex will then publish the address on plex.tv, and your apps will use it to connect to your server.
To update Plex, open the app settings (gear icon) and go to App update. Click Check for updates, then install a new version with Apply update. If Plex notifies you of a new server version, don't install it in Plex itself; use App update instead. Your settings, media libraries, and media are stored in separate volumes and are preserved during updates.
The database and settings are stored in the volume whose name ends in plex-config; your media is in plex-movies and plex-tv. Back up these volumes or use your server backups in the web interface.
The rest of this guide explains how to manually install Plex Media Server from the command line using Docker Compose. This is a good option if, for example, you want to manage Plex alongside other services or store your media in custom folders. The instructions are based on the LinuxServer.io Plex image guide.
- A Linux server running Debian or Ubuntu with SSH access. See First access via SSH.
- Docker and Docker Compose. See Installing Docker. Check the installation with
docker --versionanddocker compose version. - A free Plex account.
- For HTTPS: a domain or subdomain whose A record points to your server's IP address (e.g.,
plex.example.com).
| Hardware | Minimum | ZAP-Hosting recommendation |
|---|---|---|
| CPU | 4 vCPU cores | 8 vCPU cores |
| RAM | 4 GB | 8 GB |
| Storage | 25 GB plus space for your media | 25 GB plus space for your media |
According to Plex, 4 GB of RAM is enough for most installations. CPU load, however, depends heavily on whether Plex needs to transcode videos during playback. As a rough guide, Plex recommends a PassMark score of about 2,000 for each simultaneous 1080p transcode (H.264, 10 Mbit/s) and about 12,000 to 17,000 for 4K files (HEVC). The Plex database, including cover art and preview thumbnails, can take up 50 GB or more for large collections.
A new Plex Media Server isn't linked to an account yet. So leave port 32400 closed for now and only allow SSH and the ports required for the reverse proxy. With ufw, this looks like:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
You'll make the first connection through an SSH tunnel, then access Plex over HTTPS. Only open port 32400/tcp if you want the Plex apps to connect directly without a reverse proxy. See “Plex apps and remote access” below. For more information about ufw, see Managing the firewall on Linux.
Create directories for the configuration and your media, then go to the new directory:
mkdir -p /opt/plex/config /opt/plex/media/movies /opt/plex/media/tv
chown -R 1000:1000 /opt/plex
cd /opt/plex
Get a claim code at plex.tv/claim and create the Compose file with nano docker-compose.yml. The code is only valid for 4 minutes, so enter it now:
services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- VERSION=docker
- PLEX_CLAIM=claim-XXXXXXXXXXXX
volumes:
- ./config:/config
- ./media/tv:/tv
- ./media/movies:/movies
restart: unless-stopped
Here's what the entries mean:
network_mode: host: Plex uses the server's network directly, as recommended by LinuxServer.io. This means the server firewall applies without Docker exceptions, so port32400remains blocked from outside.PUIDandPGID: Plex runs with user and group ID1000. That's why the directories above are owned by this user.VERSION=docker: Plex is updated only by pulling a new image, not from within the running container.PLEX_CLAIM: Links the server to your Plex account the first time it starts. You don't need this entry afterward../config:/config: The database, settings, and metadata are stored in/opt/plex/config../media/movies:/moviesand./media/tv:/tv: Your movies and TV shows. In Plex, you'll select/moviesand/tvas the folders later.
Start the container:
docker compose up -d
Check whether it's running with docker compose ps, and view the logs with docker compose logs -f.
Plex also offers packages for Debian and Ubuntu at plex.tv/media-server-downloads. The web interface, firewall rules, and reverse proxy work as described here. You can install updates through the package manager.
Since port 32400 is blocked, you'll connect to Plex through an SSH tunnel the first time. Run this command on your own computer:
ssh -L 32400:localhost:32400 root@SERVER_IP
Replace SERVER_IP with your server's IP address, then open http://localhost:32400/web in your browser. Sign in with your Plex account. Plex will guide you through setup: give the server a name and create your first media libraries. If you didn't enter a claim code or it had already expired, you can link the server to your account through the tunnel now, because Plex treats the tunnel connection as local.
To access Plex through your domain, set up a reverse proxy with an SSL certificate in front of Plex. For the basics, see Setting up a reverse proxy with nginx and Creating an SSL certificate (Let's Encrypt).
Plex Web uses WebSockets, so the proxy needs to pass them through. Here's a server block for nginx:
server {
listen 80;
server_name plex.example.com;
location / {
proxy_pass http://127.0.0.1:32400;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
}
Then get the certificate with certbot --nginx -d plex.example.com. Certbot will add HTTPS and HTTP redirection to the block.
Next, add your domain to Plex as an access URL so the Plex apps know to use the proxy: Settings > Network > Show Advanced > Custom server access URLs, for example https://plex.example.com:443, then Save Changes.
Caddy is even simpler: it gets the certificate itself and automatically passes WebSockets through. A single entry, plex.example.com { reverse_proxy 127.0.0.1:32400 }, in the Caddyfile is enough. Add the access URL in Plex in the same way.
Everything that makes up your Plex installation is stored in /opt/plex/config: the database, settings, shares, and metadata. Your media is stored separately in /opt/plex/media. Briefly stop the container to create a backup, then archive the configuration directory. You can leave out the cache folder; Plex will create it again:
cd /opt/plex
docker compose stop
tar -czf plex-backup-$(date +%F).tar.gz --exclude='config/Library/Application Support/Plex Media Server/Cache' config
docker compose start
Download the backup regularly or also use your server backups in the web interface. To restore your data, put the config directory back and restart the container.
With VERSION=docker, you update Plex by pulling a new image. If Plex Web notifies you of a new server version, you can't install it directly in the container. Get the new version like this:
cd /opt/plex
docker compose pull
docker compose up -d
Your database and settings in the config directory will be preserved.
The following steps apply to both installation methods.
Upload your files to the media folders over SFTP. See Connecting via SFTP for instructions.
- Manual installation: Put movies in
/opt/plex/media/moviesand TV shows in/opt/plex/media/tv. - One-Click App: The app includes two folders:
/moviesfor movies and/tvfor TV shows. Each is stored in its own volume. To find the path to the movies folder on the server, run this command over SSH:
docker volume inspect $(docker volume ls -q | grep plex-movies) --format '{{ .Mountpoint }}'
For TV shows, replace plex-movies with plex-tv.
Put each movie in its own folder named with the title and release year, for example Big Buck Bunny (2008)/Big Buck Bunny (2008).mp4. This helps Plex find the right information and cover art. Then, in Plex, open Settings (the wrench in the top right) and create a library under Libraries by clicking Add Library. Select a type, such as Movies, then click Browse for media folder and add the /movies folder. Plex will detect new files during its next scan. To scan immediately, select Scan Library Files from the library menu.
The Plex apps on smartphones, smart TVs, consoles, and streaming devices sign in with your Plex account and find your server through plex.tv. You can connect in two ways:
- Through your domain (recommended): If your HTTPS address is listed under Custom server access URLs, the apps will connect through it. This is how the One-Click App and the reverse proxy above are set up.
- Directly through port 32400: Allow the port with
ufw allow 32400/tcp, then enable remote access in Plex under Settings > Remote Access. Plex will check whether the server is reachable from outside.
You can share your libraries in Plex with other Plex accounts, such as those belonging to family or friends. Each person signs in with their own account and sees only the libraries you've shared with them.
- Remote video playback requires a paid plan: Since April 29, 2025, playing your own videos from a server outside your local network has required a Plex Pass for the server's admin account (which then applies to all users of the server), or a Plex Pass or Remote Watch Pass for your own account. According to Plex, this affects the mobile apps, many TV and console apps, and Plex Web in a browser. Plex always considers a data center server to be remote. Music (for example, with Plexamp) and photos aren't affected. See the requirements for remote playback for details.
- CPU-only transcoding: If a device can't play a video directly, Plex transcodes it during playback. A VPS doesn't have a graphics card for this, so the CPU handles it. Hardware-accelerated transcoding also requires Plex Pass. You'll put the least load on your server if your devices can play the files directly.
You've now installed Plex on your server, uploaded your media, and connected the Plex apps. The One-Click App is the fastest option and comes with HTTPS ready to use. Manual installation with Docker Compose gives you full control over folders, the proxy, and updates. If you want to stream videos over the internet without a subscription, take a look at Jellyfin too.
You can find more information here:
- Plex.tv – Official website
- support.plex.tv/articles/ – Plex Help Center (documentation)
Do you have specific questions that aren't answered here? Our team is available every day to answer your questions and provide support—just get in touch! 🙂
