← Back to Blog

How to Set Up Plex Media Server on a VPS (Ubuntu 24.04)

Published May 3, 2026  ·  8 min read  ·  Galaxy Cloud Solutions

Plex on a VPS gives you a media server with a static IP and reliable uptime without fighting home router port forwarding. Two things to sort out before picking a plan: storage and transcoding. Read those sections below before committing — they affect which plan actually works for your situation.

⚡ VPS plans from $5/mo — use code LAUNCH2026 for 50% off

Storage: Figure This Out First

A 1080p movie file is 4–20GB depending on encoding. A TV season is 20–60GB. VPS storage tops out at 320GB on the Supernova plan. For a modest personal collection that is fine. For a large library you will want to either use the biggest plan or keep media files on a home NAS and mount it remotely — more complex but workable.

Transcoding: Know What You Are Getting

Plex transcodes when the client device cannot play the original file format. If your devices support direct play (most modern Plex apps do for common formats), transcoding barely happens. If you transcode regularly, plan on roughly one CPU core per simultaneous 1080p stream. Hardware transcoding needs Plex Pass and compatible hardware — VPS plans do software transcoding only.

What You Need

Step 1: Install Plex

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo gpg --dearmor -o /usr/share/keyrings/plex-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/plex-archive-keyring.gpg] https://downloads.plex.tv/repo/deb public main" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
sudo apt update && sudo apt install plexmediaserver -y

Step 2: Start the Service

sudo systemctl enable plexmediaserver
sudo systemctl start plexmediaserver
sudo systemctl status plexmediaserver

Step 3: Set Up Media Directories

sudo mkdir -p /media/plex/movies /media/plex/tv
sudo chown -R plex:plex /media/plex

Upload media from your local machine:

rsync -avz --progress /local/movies/ user@your-server:/media/plex/movies/

Step 4: Firewall

sudo ufw allow OpenSSH
sudo ufw allow 32400/tcp
sudo ufw enable

Step 5: Initial Setup via SSH Tunnel

This is the step that gets people. Plex requires the first-time setup to happen from the same machine the server is running on. Since your VPS has no browser, you create an SSH tunnel so your local browser looks local to the server.

On your local machine:

ssh -L 8888:localhost:32400 your-user@your-server-ip

Then open http://localhost:8888/web in your browser. Sign in with your Plex account, name the server, and add libraries pointing to /media/plex/movies and /media/plex/tv.

After setup, access Plex at http://your-server-ip:32400/web or through app.plex.tv from any device.

Keeping Plex Updated

sudo apt update && sudo apt upgrade plexmediaserver -y

Run your own Plex server from $10/mo

Nebula 2: 2 vCPU, 2GB RAM, 40GB SSD. Solid starting point for a personal media server. Use code LAUNCH2026 for 50% off your first month.

Get Started