Railway

Deploy Jellyfin | (Just Updated) Media Server That Keeps Your Library

Your library, users, plugins and watch history survive every redeploy.

Deploy Jellyfin | (Just Updated) Media Server That Keeps Your Library

/data

Deploy and Host Jellyfin on Railway

Jellyfin is the free, open-source media server: it indexes your movies, shows and music, adds artwork and metadata, and streams them to a browser, phone, TV or Kodi client with no subscription, no account and no telemetry. This template runs Jellyfin 10.11.11 as a single service with one volume, an administrator seeded before the URL is ever reachable, and the listen port wired to the one Railway actually routes.

About Hosting Jellyfin

Jellyfin was written for a machine that stays where you left it, which is the opposite of how a platform deploy behaves, and the difference is where every self-hosted Jellyfin template goes wrong.

Three things need handling. Jellyfin keeps its database, users, metadata, artwork and plugins under /config and /cache — two separate paths, both declared as volumes in the upstream image — while a Railway template mounts exactly one volume, so unless the whole tree is relocated onto that mount, the library is written to the container's disposable layer and vanishes at the next deploy. Jellyfin does not read $PORT either: its listen port lives in network.xml, a file the image does not ship, so the port has to be written before the server starts. And the setup wizard — the screens that create the first administrator — authenticates nobody until it has been completed, so a fresh instance on a public URL belongs to whoever loads it first.

This image handles all three. Everything durable is relocated onto the single volume, network.xml is written from the injected port on every boot, and the wizard is completed against a loopback port the platform does not route, before the public port is bound.

Why Deploy Jellyfin on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Jellyfin on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Concretely, for this app: a media server is a long-running process with a disk attached, which is exactly what Railway's volumes and always-on services provide, and the public domain plus TLS mean remote clients work without a VPN, a dynamic-DNS record or a port-forward on a home router.

Common Use Cases

  • Stream a personal movie, TV and music library to browsers, phones, TVs and Kodi clients from anywhere, without a Plex or Netflix subscription.
  • Give family members their own logins, with per-user watch state, resume points and parental-control ratings.
  • Serve audiobooks, podcasts and recorded lectures to phones over a normal HTTPS URL.

Dependencies for Jellyfin Hosting

  • A Railway volume, mounted at /data.

Deployment Dependencies

What this template does that a stock deploy does not

  • The library survives a redeploy. JELLYFIN_DATA_DIR, JELLYFIN_CONFIG_DIR, JELLYFIN_CACHE_DIR and JELLYFIN_LOG_DIR all point onto the single /data volume, so accounts, watch history, metadata, artwork and plugins persist.
  • Nobody can claim your server. The administrator is seeded from JELLYFIN_ADMIN_PASSWORD behind a loopback port before the public port opens, and the container refuses to start if that variable is empty. Anonymous requests to the setup routes return 401.
  • A redeploy is a working password reset. Jellyfin has no non-interactive password command and its reset flow needs email a fresh deploy does not have, so a lost credential is normally unrecoverable. This image re-applies the variable to the database on every boot.
  • $PORT is honoured, by writing network.xml from it, so the deployment answers at its own domain and the health check passes.
  • Transcodes are sized to the container. EncodingThreadCount defaults to the host's core count, not the container's quota; this image reads the quota from /sys/fs/cgroup/cpu.max.
  • The image is pinned to 10.11.11 and prebuilt, rather than tracking a moving tag on an application that migrates its database forward on boot.

After deploying

Open the deployment URL and sign in as admin with the generated JELLYFIN_ADMIN_PASSWORD from the service's variables. Add your media under /data/media (or any path on the volume) from Dashboard → Libraries.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
44
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51