Migrations Migrating from Heroku, Render, Hatchbox or Cloud 66? We move your production app within 48 hours →
Self-host Jellyfin on your own server ← Blog vs. competitors • 12 min read

Self-host Jellyfin on your own server

Almokhtar Bekkour

Almokhtar Bekkour, Founder, Systems Architect

September 7, 2026 · 12 min read

Follow this on your own server. Start your 14-day trial

Plex used to be the obvious way to watch your own media, and then it slowly stopped being yours: remote streaming moved behind a Plex Pass subscription, the apps route through Plex’s own servers and accounts, and the home screen fills up with content you don’t own and didn’t ask for. Jellyfin does the same core job, a media server that organizes your movies, shows and music and streams them to a browser, phone, TV or Roku, as free software that runs entirely on your hardware and phones home to nobody. By the end of this guide you’ll have Jellyfin running on your own server, reachable over HTTPS at your own domain, playing your own files off disk, with GPU hardware transcoding wired up so a single cheap box can serve real streams without pegging its CPU, plus backups and an upgrade path that won’t corrupt your library.

Jellyfin has two parts that a naive Docker setup gets wrong. The first is hardware transcoding: the difference between a server that melts under one 4K stream and one that quietly serves several, which comes down to passing the GPU into the container correctly. The second is the reverse proxy: Jellyfin needs to be told it’s living behind one, or remote clients get the wrong address and real-time control goes silent. This setup handles both from the start.

What you’ll need

  • A server. Jellyfin itself is light at idle; the cost is transcoding. For direct play to modern clients even a 1 vCPU / 1 GB box is fine, but if you want to transcode (4K down to 1080p for a phone, or an incompatible codec), a box with an Intel CPU that has Quick Sync, or a passable GPU, is what makes it comfortable. A 2 vCPU / 4 GB VPS or, better, a small home machine with an Intel iGPU is a sensible floor. Any Ubuntu 24.04 host works.
  • A domain name (or a subdomain of one you already own), with access to its DNS.
  • Docker and the Docker Compose plugin on the server (Step 2).
  • Your media files on the server’s disk, and SSH access with a terminal.

Step 1: Create the server and point a domain at it

Create an Ubuntu 24.04 server and note its public IP. If you’re repurposing a home machine behind a router, you’ll also need to forward ports 80 and 443 to it, and your ISP has to give you a reachable address; a VPS avoids that entirely.

In your DNS, add an A record for a subdomain, for example jellyfin.yourdomain.com, pointing at that IP:

Type: A
Name: jellyfin
Value: <your server's IP>
TTL: 300

DNS can take a few minutes to propagate. Confirm it resolves before continuing, because the TLS certificate in Step 5 depends on it:

dig jellyfin.yourdomain.com +short

That should print your server’s IP, not an old one and not nothing.

Step 2: Install Docker

SSH in and install Docker Engine with the Compose plugin:

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER

Log out and back in for the group change to take effect, then check both pieces are present:

docker --version
docker compose version

You should see a Docker version and a Compose version printed, with no “command not found”.

Step 3: Lay out the project, the media and the GPU group

Create a directory for the stack:

mkdir -p ~/jellyfin && cd ~/jellyfin

Decide where your media lives on the host. This guide uses /srv/media, with whatever structure you like underneath, for example /srv/media/movies and /srv/media/shows. Jellyfin will see this directory and never write to it, so it can sit anywhere you can mount from.

sudo mkdir -p /srv/media/movies /srv/media/shows

The one host-specific value worth capturing now is the GID of the render group, which owns the GPU device node your transcoding will use. Read it off the host:

getent group render | cut -d: -f3

Create .env with your domain and that GID:

DOMAIN=jellyfin.yourdomain.com
RENDER_GID=<the number getent printed>
chmod 600 .env

If getent group render returns nothing, your host doesn’t have a render group; use the video group’s GID instead, and see the hardware-transcoding note in Step 4.

Step 4: Write the Docker Compose file

Create docker-compose.yml:

services:
  jellyfin:
    image: jellyfin/jellyfin:10.10.3
    restart: unless-stopped
    group_add:
      - "${RENDER_GID}"
    devices:
      - /dev/dri:/dev/dri
    volumes:
      - jellyfin_config:/config
      - jellyfin_cache:/cache
      - /srv/media:/media:ro
    networks:
      - jellyfin-net

  caddy:
    image: caddy:2
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    environment:
      - DOMAIN=${DOMAIN}
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
      - caddy_config:/config
    depends_on:
      - jellyfin
    networks:
      - jellyfin-net

networks:
  jellyfin-net:

volumes:
  jellyfin_config:
  jellyfin_cache:
  caddy_data:
  caddy_config:

The choices worth explaining:

  • The image is pinned to 10.10.3 rather than latest. A media server that silently upgrades itself across a schema migration on a restart, with your watch history and user accounts inside it, is not a trade worth making. You upgrade on your own schedule, covered in Step 7.
  • Three storage paths, each with a different job. jellyfin_config at /config is the one that matters: it holds Jellyfin’s SQLite database, downloaded metadata and artwork, and every setting. jellyfin_cache at /cache is throwaway transcode scratch and image caches that Jellyfin regenerates, so it isn’t backed up. And /srv/media is bind-mounted at /media read-only (:ro), which means Jellyfin physically cannot rename, move or delete your files no matter what a plugin or a bug does; it only ever reads them.
  • devices: - /dev/dri:/dev/dri is the line that turns hardware transcoding on. /dev/dri is the host’s GPU render interface, and passing it into the container lets Jellyfin offload video decoding and encoding to the GPU instead of the CPU. On an Intel chip this is Quick Sync (QSV); on Intel or AMD it’s VAAPI against /dev/dri/renderD128. The effect is dramatic: a single 4K HEVC stream transcoded to 1080p in software can saturate four or more CPU cores and still stutter, while the same job on an Intel iGPU runs at a few percent CPU and lets one small box serve several simultaneous streams.
  • group_add: - "${RENDER_GID}" grants the Jellyfin process membership in the host’s render group, so it’s actually allowed to open that device node. Passing the device without permission to use it is the most common reason hardware transcoding “doesn’t work.”
  • Only Caddy publishes ports to the host. Jellyfin listens on 8096 on the internal Docker network and is never reachable from the internet directly.

Passing /dev/dri covers Intel and AMD. NVIDIA is different: there’s no /dev/dri passthrough. Install the NVIDIA Container Toolkit on the host, then give the Jellyfin service access to the GPU through the NVIDIA runtime (a deploy.resources.reservations.devices block requesting the nvidia driver) instead of the devices/group_add lines above. The rest of this guide is identical.

One more thing to know before you start: passing the device is necessary but not sufficient. You still flip hardware acceleration on inside Jellyfin, in Dashboard → Playback → Transcoding, where you pick VAAPI or Quick Sync and the codecs to accelerate. Until you do, Jellyfin transcodes in software even with the GPU sitting right there.

Step 5: Write the Caddyfile and start everything

Caddy fetches and renews a Let’s Encrypt certificate automatically, as long as DNS already points at the server and ports 80 and 443 are reachable. Create Caddyfile in the same directory:

{$DOMAIN} {
	reverse_proxy jellyfin:8096
}

Jellyfin’s web client and remote-control features use websockets, and Caddy’s reverse_proxy upgrades them transparently, so no special rule is needed the way some proxies require. Start the stack:

docker compose up -d

Watch it come up and confirm Caddy actually obtained a certificate:

docker compose logs -f caddy

Look for a line about a certificate obtained for your domain, then open https://jellyfin.yourdomain.com. You should get Jellyfin’s first-run wizard with a valid padlock and no warning. Create your admin user and add a library there, pointing it at /media/movies and /media/shows, the paths as the container sees them, not the host’s /srv/media.

Before you leave the dashboard, tell Jellyfin it’s behind a proxy. In Dashboard → Networking, set the published server URL to https://jellyfin.yourdomain.com and add the proxy to Known proxies so Jellyfin trusts its forwarded headers. Without this, remote clients get handed Jellyfin’s internal container address, the connection-check banner complains the server isn’t reachable, and logging shows every request as coming from the proxy rather than the real client.

Step 6: Back up the config directory

Your media is your own files; back those up however you already back up files. The thing people forget is the config directory, and they find out when a disk dies and they’ve lost every user account, library definition, and the watch state and resume positions for the whole household. All of that lives in the jellyfin_config volume (/config): the SQLite database, the downloaded metadata and artwork, and the settings XML.

Back it up and keep it off the server. Compose prefixes volume names with the project directory, so a stack in ~/jellyfin names the volume jellyfin_jellyfin_config:

docker run --rm -v jellyfin_jellyfin_config:/data -v $(pwd):/backup alpine \
  tar czf /backup/jellyfin-config-$(date +%F).tar.gz -C /data .

Put that in a cron job and copy the result to object storage or another machine. A backup that lives only on the server it protects doesn’t survive the failure that destroys the server. The jellyfin_cache volume is deliberately not backed up: Jellyfin rebuilds it.

To restore onto a fresh box: bring the stack up once so the volume exists, stop Jellyfin, extract the tarball back into jellyfin_jellyfin_config, then start Jellyfin. Point the new install at the same media paths and everything, users and resume points included, comes back.

Step 7: Upgrade Jellyfin without corrupting the library

Jellyfin occasionally runs one-way SQLite schema migrations on boot when you move between versions, and those are not reversible. So the order matters: back up /config first (Step 6), then bump the tag, then pull.

Check your release notes for anything between your version and the target, then set the new tag in docker-compose.yml:

image: jellyfin/jellyfin:10.10.4

Pull and restart just that service:

docker compose pull jellyfin
docker compose up -d jellyfin

Watch the logs for a clean startup with no migration error, and confirm your libraries and playback state are intact when you log back in:

docker compose logs -f jellyfin

If a migration fails or the database comes up wrong, the backup you took a moment ago is the way back: restore the config volume, pin the tag back to the version that made it, and start again. This is the entire reason the backup comes before the pull, not after.

The shortcut: do it with Railyard

Everything above, Jellyfin with a persistent config volume, your media mounted read-only, the GPU passed through for hardware transcoding, and HTTPS already wired up at your own domain, is also a one-click template:

https://app.railyard.run/deploy?template=jellyfin

That gives you the same architecture this guide builds by hand: the Jellyfin container with its config on a persistent volume so your users, libraries and watch state survive restarts and redeploys, a throwaway cache, and TLS handled for you at your own domain with the reverse-proxy settings already correct, so the connection banner and remote access just work. You add your media and, on a box with a GPU, flip on hardware acceleration in the playback settings.

If you want to understand what runs on your server first, the quickstart covers the basics, and databases and backups explains how scheduled backups work across every template, not just this one. For how the one-click link format itself works, see deploy button.

Troubleshooting

Caddy never gets a certificate, or the browser shows a certificate warning. This is almost always DNS, not Caddy. Run dig jellyfin.yourdomain.com +short from your own machine and confirm it returns the server’s current IP. Let’s Encrypt also needs port 80 reachable from the internet for validation, so check your cloud provider’s firewall or security group allows inbound 80 and 443, not just 443. On a home connection, confirm both ports are forwarded to the box.

Playback buffers and stutters, and docker stats shows Jellyfin pegging the CPU. You’re transcoding in software. Either hardware acceleration isn’t enabled in Dashboard → Playback → Transcoding, or the device never made it into the container. Check ls -l /dev/dri on the host shows a renderD128 node, confirm the devices and group_add lines are in the compose file, and verify the container can see it with docker compose exec jellyfin ls -l /dev/dri.

Hardware acceleration is on but playback fails with a VAAPI or QSV error in the logs. This is almost always permissions on the render node or the wrong group. Re-run getent group render on the host and confirm RENDER_GID in .env matches; a wrong GID means the Jellyfin process can open nothing. If your host has no render group, use the video group’s GID instead. It can also mean the codec you’re asking the GPU to handle isn’t supported by that chip, for example HEVC on an older Intel iGPU.

Remote clients say “This server is not accessible” or get the wrong address. Jellyfin hasn’t been told it’s behind a proxy. In Dashboard → Networking, set the published server URL to your real https:// domain and add the proxy under Known proxies. Until then Jellyfin advertises its internal container address to clients.

A library is empty after you add the folder. The path is wrong or the mount isn’t there. Point the library at the path as the container sees it (/media/movies), not the host path (/srv/media/movies), and confirm the files are actually visible inside the container with docker compose exec jellyfin ls /media. If that’s empty, the bind-mount in the compose file doesn’t match where your files really are.

docker compose up fails with “port is already allocated.” Something else on the box is bound to 80 or 443, often a default Nginx or Apache. Find it with sudo ss -tlnp | grep -E ':80|:443' and stop that service, or change the ports Caddy publishes if you genuinely need both.

FAQ

How is this different from Plex? Jellyfin is fully free with no subscription, no account, and nothing routing through a third party’s servers; your media, your users and your watch history never leave your box. Plex gates remote streaming and several client features behind Plex Pass and signs you into Plex’s own account system. Jellyfin has no paywall and no tiers.

Do I actually need a GPU? Not always. When a client supports the file’s codec it direct-plays and nothing is transcoded at all, so even a tiny box is fine. You need transcoding, and therefore benefit from a GPU, when a client can’t play a codec, or you’re streaming a 4K file down to a phone on mobile data, or several people watch at once. An Intel CPU with Quick Sync is the cheapest way to make that comfortable.

How much does this cost to run? The server, and nothing else. Jellyfin is free software with no per-user, per-stream or per-device fee, which is the whole point against Plex Pass. A small VPS runs $5–12/month, or it’s free on hardware you already own.

Can I watch away from home? Yes, that’s what the domain and HTTPS in this guide are for. Once the published server URL is set, the Jellyfin apps on Android, iOS, Android TV, Fire TV and Roku, or any web browser, connect to https://jellyfin.yourdomain.com from anywhere. There’s no relay in the middle; the stream goes straight from your server to the client.

Do I have to use Caddy? No, Nginx or Traefik work the same way. Whatever proxy you put in front of Jellyfin has to forward websockets and the standard proxy headers, and you still set Jellyfin’s Known proxies and published server URL so it trusts them. Caddy just gets the certificate without extra configuration.

Either path gets you the same thing: your own media server, your own files on your own disk, and a bill that doesn’t grow when you add another show, another user or another screen.

Why people pick Railyard for this

  • Your own cloud account. Deploy to DigitalOcean, Hetzner, Vultr, AWS, OVHcloud, or any Linux server over SSH, billed directly by your provider with no markup.
  • One flat price per team. Launch is $22 a month with 2 servers and 1 seat. Scale is $45 with 5 servers and 5 seats, Team is $79 with 10 servers and 15 seats, and Agency is $149 with 20 servers and unlimited seats. Unlimited apps on every plan, no charge per app, per deploy or per gigabyte, and a 14-day trial to start.
  • One-click templates. Deploy open-source apps, like databases, analytics and dev tools, to your own server in one click.
  • Managed databases. Postgres, MySQL and Redis with scheduled, restore-verified backups and point-in-time recovery.
  • Push-to-deploy. Deploy from GitHub, GitLab or the CLI, with automatic HTTPS and zero-downtime releases.

Skip the server setup

Launch the Jellyfin template on Railyard in one click and get a running media server with HTTPS already wired up.

14-day trial on every plan. One flat price per team, your servers at your provider's price.

Theme
Colors