Install Jellyfin on Dcoker
Install Jellyfin on Docker
This guide provides a Docker Compose YAML file to deploy a Jellyfin media server.
Prerequisites
- Docker and Docker Compose must be installed. Refer to Docker Installation Guide for setup instructions.
- Basic knowledge of Docker commands and file system permissions.
- A local storage location for Jellyfin’s configuration, cache, and media files.
Setup
- Create a directory for your Jellyfin setup (e.g., mkdir jellyfin && cd jellyfin).
- Ensure the local storage paths (e.g., /mounted/local/storage/location) exist on your host system and have appropriate permissions (e.g., owned by user/group with IDs 1001).
- Create a docker-compose.yml file in the directory.
Docker Compose YAML
yaml
version: "2"
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
environment:
- PUID=1001
- PGID=1001
- PST=America/Los Angeles
volumes:
- /mounted/local/storage/location:/config
- /mounted/local/storage/location:/cache
- /mounted/local/storage/location:/media
ports:
- 8092:8096
restart: always
Running the Service
- In the directory containing docker-compose.yml, run:
docker-compose up -d
- Access Jellyfin by navigating to http://<your-server-ip>:8092 in a web browser.
Notes
- Storage Paths: Replace /mounted/local/storage/location with actual paths on your host (e.g., /home/user/jellyfin/config). Using the same path for /config, /cache, and /media may not be ideal; consider separate paths (e.g., /home/user/jellyfin/config, /home/user/jellyfin/cache, /home/user/jellyfin/media) for better organization.
- Permissions: Ensure the user/group IDs (PUID/PGID) match the owner of the storage paths. Adjust 1001 to match your system’s user/group IDs if needed (check with id <username>).
- Timezone: The PST=America/Los Angeles environment variable may not be recognized by Jellyfin; the correct variable is TZ=America/Los_Angeles. Update the YAML accordingly.
- Port: The service maps port 8092 on the host to 8096 in the container. Ensure 8092 is open on your firewall.