# Jellyfin

# Install Jellyfin on Dcoker

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

1. Create a directory for your Jellyfin setup (e.g., mkdir jellyfin &amp;&amp; cd jellyfin).
2. 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).
3. Create a docker-compose.yml file in the directory.

#### Docker Compose YAML

<div dir="auto" id="bkmrk-yaml"><div>yaml</div><div>  
</div><div>  
</div></div>```yaml
version: "3"
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=America/Los_Angeles
    volumes:
      - /home/user/jellyfin/config:/config
      - /home/user/jellyfin/cache:/cache
      - /home/user/jellyfin/media:/media
    ports:
      - 8098:8096
    restart: unless-stopped
```

#### Running the Service

1. In the directory containing docker-compose.yml, run: ```bash
    docker-compose up -d
    ```
2. Access Jellyfin by navigating to http://&lt;your-server-ip&gt;:8092 in a web browser.

#### Notes

- **Storage Paths**: Replace <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">/mounted/local/storage/location</span> with actual paths on your host (e.g., <span style="color:rgb(224,62,45);background-color:rgb(248,202,198);">/home/user/jellyfin/config</span>). Using the same path for <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">/config</span>, <span style="color:rgb(224,62,45);background-color:rgb(248,202,198);">/cache</span>, and <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">/media</span> may not be ideal; consider separate paths (e.g., <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">/home/user/jellyfin/config</span>, <span style="color:rgb(224,62,45);background-color:rgb(248,202,198);">/home/user/jellyfin/cache</span>, <span style="color:rgb(224,62,45);background-color:rgb(248,202,198);">/home/user/jellyfin/media</span>) for better organization.
- **Permissions**: Ensure the user/group IDs (PUID/PGID) match the owner of the storage paths. Adjust <span style="color:rgb(224,62,45);background-color:rgb(248,202,198);">1001 </span>to match your system’s user/group IDs if needed (check with <span style="color:rgb(224,62,45);background-color:rgb(248,202,198);">id &lt;username&gt;</span>).
- **Port**: The service maps port <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">8098 </span>on the host to <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">8096 </span>in the container. Ensure <span style="background-color:rgb(248,202,198);color:rgb(224,62,45);">8098 </span>is open on your firewall.