|
| 1 | +--- |
| 2 | +title: Deploying Jellyfin on a Scaleway Instance using Docker |
| 3 | +description: Learn how to deploy Jellyfin, an open-source media server that allows you to organize, stream, and manage your personal media collection. |
| 4 | +tags: jellyfin docker media streaming |
| 5 | +products: |
| 6 | + - instances |
| 7 | +dates: |
| 8 | + validation: 2025-08-21 |
| 9 | + posted: 2025-08-21 |
| 10 | + validation_frequency: 12 |
| 11 | +--- |
| 12 | +import Requirements from '@macros/iam/requirements.mdx' |
| 13 | + |
| 14 | +Jellyfin is an open-source media server that allows you to organize, stream, and manage your personal media collection. |
| 15 | +It supports various clients and devices, providing a self-hosted alternative to commercial streaming services. |
| 16 | +This tutorial explains how to deploy Jellyfin on a Scaleway Instance using Docker, which simplifies installation and management. |
| 17 | +We will use an Ubuntu-based Instance and the official Jellyfin Docker container. |
| 18 | + |
| 19 | +<Requirements /> |
| 20 | + |
| 21 | +- A Scaleway account logged into the [console](https://console.scaleway.com) |
| 22 | +- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization |
| 23 | +- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/) |
| 24 | +- An [Instance](/instances/how-to/create-an-instance/) running the latest Ubuntu image |
| 25 | + |
| 26 | +## Connecting to the Instance |
| 27 | + |
| 28 | +1. Open a terminal on your local machine. |
| 29 | + |
| 30 | +2. Connect via SSH using the following command: |
| 31 | + |
| 32 | + ``` |
| 33 | + ssh root@your_instance_ip |
| 34 | + ``` |
| 35 | + |
| 36 | + Replace `your_instance_ip` with the actual IP. Accept the host key if prompted. |
| 37 | + |
| 38 | + <Message type="tip"> |
| 39 | + If you are using a non-root user or a different key, adjust the command accordingly (e.g., `ssh -i /path/to/key ubuntu@your_instance_ip`). |
| 40 | + </Message> |
| 41 | + |
| 42 | +## Installing Docker |
| 43 | + |
| 44 | +1. Update the `apt` package cache and upgrade already installed packages to their latest version: |
| 45 | + |
| 46 | + ``` |
| 47 | + apt update && apt upgrade -y |
| 48 | + ``` |
| 49 | + |
| 50 | +2. Install the prerequisites for adding the Docker repository: |
| 51 | + |
| 52 | + ``` |
| 53 | + apt install ca-certificates curl -y |
| 54 | + ``` |
| 55 | + |
| 56 | +3. Add Docker's official GPG key: |
| 57 | + |
| 58 | + ``` |
| 59 | + install -m 0755 -d /etc/apt/keyrings |
| 60 | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc |
| 61 | + chmod a+r /etc/apt/keyrings/docker.asc |
| 62 | + ``` |
| 63 | + |
| 64 | +4. Add the Docker repository to `apt` sources: |
| 65 | + |
| 66 | + ``` |
| 67 | + echo \ |
| 68 | + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ |
| 69 | + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ |
| 70 | + tee /etc/apt/sources.list.d/docker.list > /dev/null |
| 71 | + apt update |
| 72 | + ``` |
| 73 | + |
| 74 | +5. Install the required Docker packages: |
| 75 | + |
| 76 | + ``` |
| 77 | + apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin acl -y |
| 78 | + ``` |
| 79 | + |
| 80 | +6. Verify that Docker is installed by running a test container: |
| 81 | + |
| 82 | + ``` |
| 83 | + docker run hello-world |
| 84 | + ``` |
| 85 | + |
| 86 | + This should download and run a simple image, confirming Docker works. |
| 87 | + |
| 88 | +## Creating a Jellyfin user |
| 89 | + |
| 90 | +1. Create a user named `jellyfin`: |
| 91 | + ``` |
| 92 | + adduser jellyfin |
| 93 | + ``` |
| 94 | + Enter the users' password, password confirmation, account information and confirm by pressing `Enter`. |
| 95 | + |
| 96 | +2. Enter the `jellyfin` user: |
| 97 | + ``` |
| 98 | + su jellyfin |
| 99 | + ``` |
| 100 | + |
| 101 | +3. Run the following command to get the user ID and group ID of the user. |
| 102 | + ``` |
| 103 | + id -u && id -g |
| 104 | + ``` |
| 105 | + This command outputs two numbers: the user ID (e.g. `1001`) and the group ID (e.g. `10001`). Save these numbers as you will need them for the following steps. |
| 106 | + |
| 107 | +## Deploying Jellyfin |
| 108 | + |
| 109 | +1. Create a directory for Jellyfin configuration and navigate to it: |
| 110 | + |
| 111 | + ``` |
| 112 | + mkdir ~/jellyfin && cd ~/jellyfin |
| 113 | + ``` |
| 114 | + |
| 115 | +2. Create a `docker-compose.yml` file with the following content: |
| 116 | + |
| 117 | + ``` |
| 118 | + services: |
| 119 | + jellyfin: |
| 120 | + image: jellyfin/jellyfin |
| 121 | + container_name: jellyfin |
| 122 | + user: <USER ID>:<GROUP ID> |
| 123 | + network_mode: 'host' |
| 124 | + volumes: |
| 125 | + - ./config:/config |
| 126 | + - ./cache:/cache |
| 127 | + - /path/to/your/media:/media |
| 128 | + restart: 'unless-stopped' |
| 129 | + environment: |
| 130 | + - JELLYFIN_PublishedServerUrl=http://your_instance_ip:8096 |
| 131 | + ``` |
| 132 | + |
| 133 | + Customize the volumes: |
| 134 | + - Replace `/path/to/your/media` with the actual path to your media files on the Instance. You can mount additional volumes if needed. |
| 135 | + - Replace `your_instance_ip` with the public IP. |
| 136 | + - Replace `<USER ID>` and `<GROUP ID>` with the `jellyfin` user ID and group ID retrieved in the previous step. |
| 137 | + |
| 138 | + <Message type="note"> |
| 139 | + Running as a non-root user is recommended; the `user` line specifies the ID of the `jellyfin` user. Ensure the mounted directories have appropriate permissions. |
| 140 | + Ensure the Jellyfin user has write and read permission to the `/config` and `/cache` folders by setting permissions: `setfacl -m u:jellyfin:rwx config` and `setfacl -m u:jellyfin:rwx cache`. |
| 141 | + </Message> |
| 142 | + |
| 143 | +2. Start the Jellyfin container: |
| 144 | + |
| 145 | + ``` |
| 146 | + docker compose up -d |
| 147 | + ``` |
| 148 | + |
| 149 | + This pulls the image and runs it in detached mode. |
| 150 | + |
| 151 | +## Accessing Jellyfin |
| 152 | + |
| 153 | +1. Open a web browser on your local machine and navigate to `http://your_instance_ip:8096`, replacing `your_instance_ip` with the Instance's public IP. |
| 154 | +2. Follow the on-screen setup wizard: |
| 155 | +- Create an admin account |
| 156 | +- Add your media libraries, and |
| 157 | +- Configure settings like language and metadata. |
| 158 | + |
| 159 | +<Message type="tip"> |
| 160 | + Jellyfin listens on port `8096` by default. Ensure this port is open in your [Instance's security groups](/instances/how-to/use-security-groups/). For production, consider setting up HTTPS with a [reverse proxy like Nginx](/tutorials/nginx-reverse-proxy/). |
| 161 | +</Message> |
| 162 | + |
| 163 | + |
| 164 | +By following these steps, you have a functional Jellyfin media server running on Scaleway. For more advanced configurations, refer to the official [Jellyfin documentation](https://jellyfin.org/docs/). |
0 commit comments