Jellyfin is a free and open-source media server that organizes and streams your personal collection of movies, TV shows, music, and photos to any device, with no tracking or paywalls. This guide deploys Jellyfin using Docker Compose with Traefik handling automatic HTTPS. By the end, you'll have a Jellyfin media server streaming securely at your domain.
Set Up the Directory Structure
1. Create the project directory structure:
$ mkdir -p ~/jellyfin-media-server/{cache,config,media}
$ cd ~/jellyfin-media-server
2. Find your user UID and GID:
$ id USERNAME
3. Create the environment file:
$ nano .env
UID=YOUR_USER_UID
GID=YOUR_USER_GID
DOMAIN=jellyfin.example.com
LETSENCRYPT_EMAIL=admin@example.com
Deploy with Docker Compose
1. Create the Docker Compose manifest:
$ nano docker-compose.yaml
services:
traefik:
image: traefik:v3.6
container_name: traefik
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
restart: unless-stopped
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
user: "${UID}:${GID}"
hostname: jellyfin
expose:
- "8096"
volumes:
- "./config:/config"
- "./cache:/cache"
- "./media:/media"
environment:
- JELLYFIN_PublishedServerUrl=https://${DOMAIN}
labels:
- "traefik.enable=true"
- "traefik.http.routers.jellyfin.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.jellyfin.entrypoints=websecure"
- "traefik.http.routers.jellyfin.tls.certresolver=letsencrypt"
restart: unless-stopped
volumes:
letsencrypt:
2. Start the services:
$ docker compose up -d
3. Verify the services are running:
$ docker compose ps
4. View the logs:
$ docker compose logs
Configure Jellyfin
- Open
https://jellyfin.example.comin a browser. - Choose your display language.
- Create the administrator account with a username and password.
- Add media libraries by selecting a content type and the matching folder under
/media. - Set metadata language and country preferences.
- Review the remote access settings.
- Complete setup and sign in with the administrator credentials.
Next Steps
Jellyfin is running and streaming securely over HTTPS. From here you can:
- Install Jellyfin apps on your TV, phone, and desktop devices
- Add more libraries and enable hardware transcoding for smoother playback
- Create additional user accounts with per-library access control
For the full guide with additional tips, visit the original article on Vultr Docs.
Top comments (0)