# Setup & Configuration

We need to install the service through Portainer and configure any necessary settings.

# Preparation

There are some things we need to do in preparation to install this service.

## Volumes

<details id="bkmrk-media-folders-radarr"><summary>Persistent Data</summary>

This is where the service will store its own application data and ensures we can quickly update the service image.

<p class="callout warning">Ensure your user has permissions to access the folder.</p>

</details><details id="bkmrk-media-folders-this-s"><summary>Media Folders</summary>

This service will need access to the folders where you store your media files.

<p class="callout warning">Ensure your user has permissions to access the folder.</p>

</details>## Environment

<details id="bkmrk-tz-this-is-the-curre"><summary>TZ</summary>

This is the current time zone formatted using the [tz database.](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

<p class="callout info">*For example:* America/Vancouver</p>

</details><details id="bkmrk-gid-%C2%A0"><summary>PUID</summary>

This is the numeric ID of the user account on Debian. If you are unsure, open a terminal and run:

```bash
id -u
```

</details><details id="bkmrk-pgid-this-is-the-num"><summary>PGID</summary>

This is the numeric ID of the user account's group on Debian. If you are unsure, open a terminal and run:

```bash
id -g
```

</details>### Hardware Acceleration

<p class="callout warning">You will need to [perform additional steps to attach some graphics cards](https://hub.subspace.services/books/software/page/graphic-card-integration "Graphic Card Integration") to Docker containers.</p>

<details id="bkmrk-db_root_pass-this-is"><summary>Intel Embedded Graphics</summary>

Modern Intel processors have an embedded graphic processor that can be used for hardware acceleration within this container.</details><details id="bkmrk-amd-graphics-amd-and"><summary>AMD Graphics</summary>

AMD and ATI graphic cards can be used for hardware acceleration within this container [after an initial setup](https://hub.subspace.services/books/software/page/graphic-card-integration "Graphic Card Integration").

</details><details id="bkmrk-nvidia-graphics-nvid"><summary>Nvidia Graphics</summary>

Nvidia graphics cards can be used for hardware acceleration within this container [after an initial setup](https://hub.subspace.services/books/software/page/graphic-card-integration "Graphic Card Integration").

</details>

# Installation

The service can be installed through the Portainer web interface.

<p class="callout info">Learn about [creating a new stack](https://hub.subspace.services/books/portainer/page/creating-a-new-stack "Creating a New Stack").</p>

## Docker Compose

### Intel and AMD Graphics   


Use the following code to install the service:

```yaml
---
services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    network_mode: bridge
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Vancouver
    volumes:
      # Persistent Data
      - /srv/jellyfin:/config

      # Media Folders
      - /mnt/movies:/mmt/movies
      - /mnt/television:/mmt/television
      - /mnt/music:/mmt/music
      - /mnt/books:/mmt/books
    devices:
      - /dev/dri:/dev/dri
    ports:
      - 8096:8096
      - 8920:8920
      - 7359:7359/udp
      - 1900:1900/udp
    restart: unless-stopped
```

## Nvidia Graphics   


Use the following code to install the service:

```yaml
---
services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    network_mode: bridge
    runtime: nvidia
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Vancouver
      - NVIDIA_VISIBLE_DEVICES=all
    volumes:
      # Persistent Data
      - /srv/jellyfin:/config

      # Media Folders
      - /mnt/movies:/mmt/movies
      - /mnt/television:/mmt/television
      - /mnt/music:/mmt/music
      - /mnt/books:/mmt/books
    ports:
      - 8096:8096
      - 8920:8920
      - 7359:7359/udp
      - 1900:1900/udp
    restart: unless-stopped
```

# Updating

<p class="callout success">Re-Deploy the Stack</p>

This service has been optimized for running in Docker thanks to [LinuxServer.io](https://linuxserver.io).

This allows you to [re-deploy the stack through Portainer](https://hub.subspace.services/books/portainer/page/updating-a-stack "Updating a Stack") to download the latest updates.