---
title: "Deploy Jellyfin media server"
description: "Jellyfin media server with browser uploads and no open setup wizard"
category: "Other"
url: https://railway.com/deploy/jellyfin-media-ser-1
---

# Deploy Jellyfin media server

Jellyfin media server with browser uploads and no open setup wizard

**[Deploy Jellyfin media server on Railway](https://railway.com/template/jellyfin-media-ser-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/jellyfin-media-ser-1/manifest.json

- **Creator:** Anton Orel's Projects
- **Category:** Other
- **Total deploys:** 4

## Template content

### Jellyfin

- **Source:** tech-progress/railway-template-jellyfin
- **Health check:** /health

### Jellyfin Gateway

- **Image:** caddy:2.11.9-alpine@sha256:0bbb055bda6793c999bde78b1b5ce3e89f829fb031af2cf50056ea1246559fee
- **Start command:** `/bin/sh -ec 'case "$GATEWAY_USERNAME" in ""|*[!A-Za-z0-9._-]*) echo "GATEWAY_USERNAME must use letters, digits, dot, dash or underscore." >&2; exit 64;; esac; [ "$(printf "%s" "$GATEWAY_PASSWORD" | wc -c)" -ge 16 ] && [ "$(printf "%s" "$GATEWAY_PASSWORD" | wc -c)" -le 72 ] || { echo "GATEWAY_PASSWORD must have 16 to 72 bytes." >&2; exit 64; }; password_hash="$(printf "%s" "$GATEWAY_PASSWORD" | caddy hash-password)"; unset GATEWAY_PASSWORD; printf "%s\n" "$GATEWAY_CONFIG" | sed -e "s|__USERNAME__|$GATEWAY_USERNAME|g" -e "s|__PASSWORD_HASH__|$password_hash|g" -e "s|__JELLYFIN__|$JELLYFIN_UPSTREAM|g" -e "s|__UPLOADS__|$UPLOAD_UPSTREAM|g" >/tmp/Caddyfile; unset GATEWAY_CONFIG; echo "Waiting for Jellyfin to complete its startup wizard."; until wget -Y off -q -T 5 -O - "http://$JELLYFIN_UPSTREAM/System/Info/Public" 2>/dev/null | grep -q "\"StartupWizardCompleted\":true"; do sleep 2; done; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'`
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Jellyfin on Railway

Jellyfin is a free software media server for your movies, shows and music. This template runs Jellyfin 12.4 privately, completes its setup wizard with a generated administrator before anyone can reach it, and adds a password-protected browser upload manager for your media. It is a community template, not an official Jellyfin project release.

## About Hosting Jellyfin

Jellyfin reads media from folders on disk and has no built-in upload, so this template adds [dufs](https://github.com/sigoden/dufs) at `/files/` to upload into the same volume Jellyfin scans. One 5 GB volume at `/data` holds Jellyfin's database and settings, its cache, and the Movies, Shows and Music libraries, so accounts, watch history and files survive restarts and redeploys. Resize the volume as your library grows.

On first boot the Jellyfin container runs the setup wizard itself while Jellyfin listens only on loopback, creates the administrator from `JELLYFIN_ADMIN_USERNAME` and the generated `JELLYFIN_ADMIN_PASSWORD`, and adds the three libraries. The Caddy gateway is the only public service and opens only after the wizard is complete. It asks for its own generated password (`GATEWAY_USERNAME` and `GATEWAY_PASSWORD` on the `Jellyfin Gateway` service) before the upload manager; everything else uses Jellyfin's login, so the web player and the phone and TV apps work normally.

After deploying: sign in with the administrator credentials from the `Jellyfin` service, upload media at `/files/` (one folder per film, for example `movies/Title (Year)/Title (Year).mp4`), then run Scan All Libraries in the dashboard.

Railway has no GPUs, so transcoding is software ffmpeg. Plan on about two vCPU per simultaneous 1080p transcode; direct play needs almost none. Streaming to viewers is billed as Railway egress.

## Why Deploy Jellyfin on Railway

- No first-visit takeover: the setup wizard is finished with a generated administrator before the public port opens.
- Upload movies, shows and music from a browser instead of copying files to a server.
- Pinned image digests for Jellyfin, dufs and Caddy, health checks, and a persistent volume.
- Transcode throttling and segment deletion are on, which limits CPU use and the space long transcodes take.

## Common Use Cases

- A private streaming server for your own films and home videos, for you and your family.
- Listening to your music collection from any browser or Jellyfin app.
- Sharing a small library with friends through their own Jellyfin accounts.

## Dependencies for Jellyfin Hosting

The template uses two services and one Railway volume. No database or external account is needed.

### Deployment Dependencies

- [Jellyfin](https://github.com/jellyfin/jellyfin) ([jellyfin.org](https://jellyfin.org)) provides the media server, users, players and transcoding.
- [dufs](https://github.com/sigoden/dufs) provides the browser upload manager for the media folders.
- [Caddy](https://caddyserver.com) provides the public gateway and Basic Auth on uploads.
- [Railway](https://railway.com) provides builds, private networking, HTTPS and the persistent volume.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/jellyfin-media-ser-1
