Why Host Your Media Server on a VPS
A self-hosted media server on a VPS makes you the owner of your catalog: movies, TV shows, music, and photos stay accessible over HTTPS from a browser, a Smart TV, or a smartphone, with no imposed quota and no analysis of your habits. Unlike a home machine, a VPS has the stable upload bandwidth essential for remote streaming, a fixed IP to set up a domain, and 24/7 availability with no added electricity cost. Jellyfin is entirely free (GPL license) with no paid features whatsoever; Plex offers a more polished client experience but locks hardware transcoding and remote access behind a Plex Pass subscription. The choice therefore comes down to total freedom versus turnkey convenience.
What You Gain by Hosting It Yourself
- Remote access over HTTPS without going through an external relay or exposing your content to a third party
- No limit on accounts, simultaneous streams, or library size
- On-the-fly transcoding driven by your own VPS resources (CPU or GPU)
- Subtitles, metadata, and cover art fetched automatically and stored on your own server
- With Jellyfin: zero paid features, no telemetry, auditable source code
- Trivial backup and migration: everything fits in a Docker volume and a media folder
Prerequisites for a VPS Media Server
For direct streaming (remux without re-encoding), a VPS with 2 vCPUs and 2 GB of RAM is enough. As soon as you enable software transcoding of a 1080p stream, count on 4 vCPUs and 4 GB; for several simultaneous 4K streams, aim for 6 to 8 vCPUs. Hardware transcoding (QSV, NVENC) remains rare on shared VPSes: favor files already compatible with your clients to stay in Direct Play. On the storage side, plan for a generous volume and ideally a fast disk for metadata. You'll need Docker and Docker Compose installed, a subdomain (e.g. media.yourdomain.com) pointing to the VPS IP, and a reverse proxy for TLS.
Deploy Jellyfin (or Plex) with Docker and a Reverse Proxy
Prepare the Directory Tree and Volumes
On the VPS, create mkdir -p /srv/jellyfin/{config,cache} and a media folder /srv/media/{films,series,musique}. These paths will be mounted as volumes to persist the configuration and cleanly separate content from the database.
Write the docker-compose.yml
Declare the jellyfin/jellyfin service (or plexinc/pms-docker), mount ./config, ./cache, and /srv/media read-only, and expose port 8096 (Jellyfin) or 32400 (Plex) locally only: 127.0.0.1:8096:8096. The reverse proxy will handle public exposure.
Start the Container
Run docker compose up -d, then follow docker compose logs -f. Reach the setup wizard through an SSH tunnel ssh -L 8096:127.0.0.1:8096 user@vps to create the admin account before any public exposure.
Set Up the Reverse Proxy and SSL
Configure Caddy or Nginx to proxy media.yourdomain.com to 127.0.0.1:8096. With Caddy, two lines are enough and the Let's Encrypt certificate is automatic; remember to forward the WebSocket headers for real-time playback.
Index Your Libraries
In the interface, add the /media/films and /media/series folders, choose the metadata agent, and start the scan. Verify that a file plays in Direct Play from an external client to confirm that the proxy and codecs are correct.
Secure Access
Enable strong authentication, limit the number of attempts, and open only ports 80/443 on the firewall. The application port must never be reachable directly from the Internet.
| Criterion | Jellyfin | Plex |
|---|---|---|
| License / cost | Free (GPL), 100% free | Freemium, paid Plex Pass for the key features |
| Hardware transcoding | Included and free | Reserved for Plex Pass subscribers |
| Remote access | Direct via your reverse proxy | Goes through Plex relays (or Pass) |
| Privacy | No telemetry, everything stays on your server | Centralized Plex account and metadata |
| Client quality (TV, mobile) | Good, improving | Very polished and stable |
| Plugin catalog | Rich and community-driven | More closed, built-in features |
| Initial setup | A few manual settings | Very guided wizard |
| Live TV / DVR | Included | Included (depending on Pass) |
To avoid saturating your VPS CPU, disable 'automatic' transcoding and enforce Direct Play by standardizing your library in H.264/AAC within an MP4 or MKV container. A simple ffmpeg remux script (no re-encoding, -c copy) repackages your files in a few seconds and relieves the server for good, especially on a VPS without a GPU.