
Jellyfin is a free and open-source media server that lets you organize, manage, and stream your personal collection of movies, TV shows, music, and photos to any device. Jellyfin is fully self-hosted with no subscription tiers or proprietary cloud services. It gives you full control over your media library and runs entirely on your own server environment.
In this article, you will deploy Jellyfin using Docker Compose, configure persistent storage for application data and media files, and set up Traefik as a reverse proxy to securely access your Jellyfin instance.
Before you begin, you need to:
sudo privileges.jellyfin.example.com).In this section, you prepare the required directory structure for Jellyfin and define environment variables in a .env file.
Create the directory structure for Jellyfin.
This command creates the following directories:
Navigate into the jellyfin-media-server directory.
Find the UID and GID of the user who owns your media files. Replace USERNAME with the username of your media file owner.
From the output, note the uid and gid of the user.
Create a .env file.
Add the following variables:
Replace:
YOUR_USER_UID/YOUR_USER_GID with your actual UID and GID.jellyfin.example.com with your domain.admin@example.com with your email.Save and close the file.
In this section, you create and deploy the Docker Compose stack that runs Jellyfin behind Traefik. Docker Compose manages both containers, applies the environment variables from your .env file, and automatically configures HTTPS routing through Traefik.
Create a new Docker Compose manifest.
Add the following content, replacing UID:GID with the user and group IDs that own your media files on the host, jellyfin.example.com with your domain name, and admin@example.com with your email address.
Save and close the file.
In the above manifest:
80 (HTTP) and 443 (HTTPS) on the host so Traefik can route external traffic to your services.8096) visible to Traefik without publishing the port directly to the host../config, ./cache, ./media) persist application data for Jellyfin.letsencrypt named volume stores Traefik TLS certificates from Let's Encrypt./var/run/docker.sock) allows Traefik to automatically detect running services.Create and start the services.
Verify that the services are running.
Output:
The above output confirms that both services are running successfully. Jellyfin is healthy, and Traefik is listening on ports 80 and 443 for incoming traffic.
View the logs for the services.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
In this section, you use the Jellyfin web interface to configure your server, create an administrator account, and add your media libraries.
Open the Jellyfin web interface in your browser.
On the Welcome screen, enter a Server Name and select your preferred Display Language, then click Next.
Create an Administrator Account by providing a username and password, then click Next.
Click Add Media Library to add your media folders.
Choose the Content Type (Movies, TV Shows, Music, Photos, etc.).
Click Folders, then + Add and navigate to the media folder you mounted in Docker (for example, /media/movies), select it, and click OK.
(Optional) Adjust Metadata Settings and Advanced Settings if needed, then click OK and Next.
Choose your Preferred Metadata Language and Country, then click Next.
Review the Remote Access settings. The default settings are appropriate for most setups. Click Next, then Finish to complete the setup.
After setup completes, Jellyfin will reload and display the login screen. Sign in using the administrator account you just created. The page redirects to the Jellyfin Dashboard, where you can manage libraries, users, streaming, and transcoding options.
You have successfully set up your own Jellyfin media server and made it accessible through a secure domain. You deployed the required services using Docker Compose, created persistent storage directories for configuration, cache, and media files, configured Traefik as the reverse proxy, and enabled HTTPS encryption with Let's Encrypt.
0 Comments
Be the first to comment and share your perspective with the community.