Back to blog
Blog

Jellyfin Media Server on a VPS With Caddy HTTPS

Self-host Jellyfin on a VPS with Caddy HTTPS, storage planning, safe updates, and backup basics for your private media library.

By Anurag Singh
Updated on Dec 03, 2026
Category: Blog
Share article
Jellyfin Media Server on a VPS With Caddy HTTPS

A private media library sounds simple. Then titles disappear, terms change, or an algorithm starts “curating” your evenings.

If you want predictable access and consistent playback across devices, self-host Jellyfin on infrastructure you control.

Use a VPS for remote access. Use a dedicated server if you expect serious transcoding.

This is an open-source spotlight. You’ll get context first: where Jellyfin shines, where it’s weaker, and how it stacks up against the usual alternatives.

Then you’ll deploy it on a Linux VPS with Docker Compose, put Caddy in front for HTTPS, and cover storage layout, backups, and a low-drama update routine.

Why Jellyfin fits creators (and not just homelabs)

Jellyfin is a self-hosted media server. It organizes movies, TV, music, and home videos, then streams them to apps on phones, TVs, browsers, and set-top boxes.

That’s the obvious pitch.

The less obvious win is creator workflow support. You get private review, clean sharing, and a predictable library structure.

  • Client review libraries: keep works-in-progress private, share per-user accounts, and remove access cleanly.
  • Archive and reference: store raw exports, final masters, and “portfolio cuts” in one place with predictable naming.
  • Family-friendly curation: create libraries per audience (Kids, Home Videos, Studio Reels) without relying on third-party profiles.

Jellyfin is open-source (GPLv2) and fully self-hostable. If you care about long-term control, that matters.

You aren’t waiting on a vendor roadmap. You can run it on a server you already pay for.

Self-host Jellyfin vs Plex, Emby, and “hosted media”

Most people end up here after trying Plex or a hosted setup. Then they hit tradeoffs.

Here’s the plain comparison.

  • Jellyfin vs Plex: Plex is polished and has a big ecosystem. But it’s not fully open-source, and it blends “your library” with Plex’s own content features. Jellyfin stays centered on your server and your files.
  • Jellyfin vs Emby: Emby is the project Jellyfin originally forked from. Emby includes proprietary components and paid features. Jellyfin keeps the full experience open and self-hosted.
  • Jellyfin vs cloud storage sharing: a shared drive works until you need metadata, watch state, multiple users, subtitles, TV apps, or stable streaming over weak connections.

The real hinge point is transcoding. Direct play is easy on almost any VPS.

Real-time transcoding gets expensive fast (CPU). Without hardware acceleration, a VPS can struggle.

Hardware acceleration is usually on a dedicated server.

Picking the right HostMyCode plan for a Jellyfin library

Jellyfin doesn’t need exotic infrastructure. It needs stable storage, decent bandwidth, and enough CPU for how you actually watch.

  • Light use (direct play): 1–2 vCPU, 2 GB RAM is workable for a small household, especially if your media is already in client-friendly formats (H.264/AAC in MP4, for example). A HostMyCode VPS is usually the clean starting point.
  • Moderate use (some transcoding): 2–4 vCPU, 4–8 GB RAM. After initial indexing, CPU matters more than RAM.
  • Heavy use (multiple transcodes, 4K): plan on a dedicated box. At that point, CPU headroom and fast storage aren’t optional. Host your media on HostMyCode dedicated servers if you expect several simultaneous transcodes.

Storage is the other constraint. Libraries only grow.

Size your disk the way you size backups: deliberately, with headroom.

If you’re juggling other services and don’t want to babysit OS updates and monitoring, Managed VPS hosting is a practical option.

Storage planning that won’t bite you later

Your Jellyfin server has three storage classes. Mixing them without a plan is how people end up with a full root disk at 2 a.m.

  • Config: user database, settings, plugins. Small, but critical.
  • Cache/transcodes: temporary, but it can spike during playback.
  • Media: your actual library. Big—and only “replaceable” if you keep masters elsewhere.

On a VPS, this layout stays tidy:

  • /opt/jellyfin/ for Compose and secrets
  • /srv/jellyfin/config for persistent config
  • /srv/jellyfin/cache for cache/transcodes (ideally on fast disk)
  • /mnt/media for your library (a mounted volume or separate disk if available)

If you’ve been burned by “disk full” incidents, set up alerts before you import a library.

Netdata makes that straightforward; see Install Netdata on Ubuntu VPS for Real-Time Monitoring for a solid baseline.

Deploying Jellyfin with Docker Compose (clean and reversible)

This isn’t a click-through wizard. It’s a setup you can reproduce, roll back, and explain later.

The steps below assume Ubuntu 24.04+ or Debian 12+ on your VPS. They also assume Docker is installed and a domain points to your server IP.

Create directories first:

sudo mkdir -p /opt/jellyfin
sudo mkdir -p /srv/jellyfin/{config,cache}
sudo mkdir -p /mnt/media
sudo chown -R $USER:$USER /opt/jellyfin /srv/jellyfin

Then drop a Compose file at /opt/jellyfin/docker-compose.yml:

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: "1000:1000"  # change to your UID:GID if needed
    environment:
      - TZ=UTC
    volumes:
      - /srv/jellyfin/config:/config
      - /srv/jellyfin/cache:/cache
      - /mnt/media:/media:ro
    ports:
      - "8096:8096"  # internal HTTP (we'll reverse proxy this)
    restart: unless-stopped

Start it:

cd /opt/jellyfin
docker compose up -d
docker compose ps

At this point Jellyfin answers on http://your-server-ip:8096.

Don’t leave that port exposed long-term. Put it behind HTTPS, and control what can reach it.

Reverse proxy with Caddy + HTTPS (simple, reliable defaults)

Caddy is a great fit for a single-app VPS. You get automatic TLS, readable config, and few moving parts.

You can run it as a system service. In a Docker-first setup, it’s usually easiest to add Caddy to the same Compose project.

Create /opt/jellyfin/Caddyfile:

jellyfin.example.com {
  encode zstd gzip

  # Basic hardening headers (keep it boring)
  header {
    Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
    X-Content-Type-Options "nosniff"
    X-Frame-Options "SAMEORIGIN"
    Referrer-Policy "strict-origin-when-cross-origin"
  }

  reverse_proxy jellyfin:8096
}

Now extend Compose to include Caddy (same docker-compose.yml):

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: "1000:1000"
    environment:
      - TZ=UTC
    volumes:
      - /srv/jellyfin/config:/config
      - /srv/jellyfin/cache:/cache
      - /mnt/media:/media:ro
    restart: unless-stopped

  caddy:
    image: caddy:latest
    container_name: caddy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /opt/jellyfin/Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
    restart: unless-stopped

volumes:
  caddy_data:
  caddy_config:

Bring the stack up again:

cd /opt/jellyfin
docker compose up -d

DNS has to point jellyfin.example.com to your VPS IP before Caddy can fetch a Let’s Encrypt certificate.

Keep it simple. Create an A/AAAA record, then wait for propagation.

If you want a checklist, use HostMyCode blog search for DNS topics.

If you’ve already used Caddy for other apps, this will feel familiar.

The closest sibling guide is for a different web app, but the reverse proxy pattern is the same: Run Ollama Behind Caddy With HTTPS on a VPS.

Security and exposure: keep Jellyfin private by default

Jellyfin is meant to be reachable. That doesn’t mean it should be reachable from everywhere.

  • Firewall: allow 80/443, block 8096 from the public internet. On Ubuntu with UFW, that usually means allowing 80/443 and not adding a rule for 8096.
  • SSH hygiene: disable password login and use keys. If you haven’t done this on your VPS yet, follow Set Up SSH Keys And Disable Password Login On VPS.
  • Bruteforce protection: if Jellyfin is internet-facing, add rate limiting in front of it (Caddy can help) and consider an IPS like CrowdSec.

You can also layer authentication. Jellyfin accounts may be enough for family use.

For collaborators, an external auth gate (like an OAuth proxy) can make sense.

Optional. The baseline is still HTTPS and strong passwords.

Performance reality check: direct play, transcode, and bandwidth

The fastest Jellyfin server is the one that never transcodes. That mostly comes down to file formats and what your clients can decode.

  • Direct play: Jellyfin streams the original file. CPU stays low. Bandwidth matches the file bitrate.
  • Transcoding: Jellyfin converts video/audio on the fly. CPU climbs fast, especially with 4K sources and subtitles that require burn-in.

On a VPS, treat direct play as the happy path. If you need frequent transcoding, budget for it.

A larger VPS can cover light workloads. For multiple simultaneous transcodes, a dedicated server is usually the predictable option.

Quick diagnostic: open Jellyfin’s playback info while streaming. If it says “Transcoding,” you’ll usually see load jump within seconds.

Watch CPU, disk I/O, and network throughput together. That trio explains most buffering.

Backups: what to copy, what to ignore

Backing up the entire media library can get expensive fast. Sometimes you need it, but it shouldn’t be your first move.

Start with what’s painful to rebuild.

Back up:

  • /srv/jellyfin/config (your Jellyfin database, users, metadata, watched state)
  • Your Caddy data (so you retain cert state and avoid renewal surprises): Docker volume caddy_data is the key one
  • /opt/jellyfin/docker-compose.yml and /opt/jellyfin/Caddyfile

Usually skip:

  • /srv/jellyfin/cache (cache and transcodes are disposable)

A practical baseline is a nightly tarball plus offsite sync. Example (run as root via cron):

mkdir -p /var/backups/jellyfin
BACKUP_DATE=$(date +%F)

tar -C / -czf /var/backups/jellyfin/jellyfin-config-$BACKUP_DATE.tar.gz \
  srv/jellyfin/config opt/jellyfin

# optional: export Caddy volume
docker run --rm -v jellyfin_caddy_data:/data -v /var/backups/jellyfin:/backup alpine \
  tar -czf /backup/caddy-data-$BACKUP_DATE.tar.gz -C / data

Store backups off the VPS. If the disk dies, local backups go with it.

If you want a nudge to watch disk growth, pair this with Netdata alerts (see Self-Host Netdata Cloud Alternative: Netdata Agent).

Updates: keep it boring and scheduled

Jellyfin updates are usually painless. The key is a routine you can repeat without thinking too hard.

  1. Read the release notes if you rely on plugins.
  2. Pull images and recreate containers:
cd /opt/jellyfin
docker compose pull
docker compose up -d

Then test playback from at least one remote client.

If something breaks, roll back fast. The simplest method is to pin the previous image tag (instead of :latest) and redeploy.

Use :latest only if you’re fine updating regularly.

If you want automated image updates, be careful. Auto-updaters can restart Jellyfin mid-stream.

If you still want it, schedule maintenance windows and review the operational notes in Docker Compose Auto-Updates With Watchtower on a VPS.

Common pitfalls (and how to avoid support tickets from your own users)

  • Root disk fills up: metadata and cache can grow. Put /srv/jellyfin on a volume with headroom, and set alerts. If you’re already in trouble, use Disk Full on VPS: Find Large Files and Free Space Safely.
  • Wrong file permissions: Jellyfin can’t read your media mount. Fix ownership/permissions at the filesystem level and confirm the container UID/GID matches.
  • Exposing port 8096 publicly: you lose the benefits of your reverse proxy and HTTPS. Only expose 80/443, proxy internally to Jellyfin.
  • Expecting a small VPS to transcode 4K: direct play is fine; real-time conversion is a different workload class.

If you want a private media library you control end to end, a VPS is the simplest starting point. Spin up a HostMyCode VPS for Jellyfin, then move to HostMyCode dedicated servers later if transcoding becomes a real requirement. Either way, you’re working with infrastructure you can tune, monitor, and back up on your schedule.

FAQ: self-hosting Jellyfin on real infrastructure

Do I need a dedicated server to self-host Jellyfin?

No. A VPS works well for direct play and smaller libraries.

Choose a dedicated server if you expect multiple simultaneous transcodes or consistently high bitrates.

Is Caddy safe to use as a reverse proxy for Jellyfin?

Yes, if you keep it updated and only expose ports 80/443.

Caddy’s automatic TLS cuts down on certificate mistakes, and the config stays readable.

What should I back up first?

Back up Jellyfin’s config directory and your deployment files (Compose + Caddyfile). That protects users, watched status, metadata, and your server configuration.

Cache is usually not worth backing up.

How do I stop buffering on a VPS?

First confirm whether you’re transcoding. If you are, either upgrade CPU, reduce source bitrate, or pre-encode media into a direct-play format for your clients.

Also check network throughput and disk I/O.

Summary: a practical way to self-host Jellyfin in 2026

Jellyfin gives you a private, open-source media server without the baggage of hosted libraries.

Run it on a VPS, keep it behind Caddy with HTTPS, and you get a setup that’s easy to explain, back up, and move.

If you want to self-host Jellyfin on infrastructure that won’t flinch under real streaming traffic, start with a HostMyCode VPS.

When your library—or your transcoding demand—outgrows that footprint, HostMyCode dedicated servers is the straightforward next step.