> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Install Jellyfin with Docker on a VPS

> Install Jellyfin with Docker: run jellyfin/jellyfin with config, cache and media volumes, serve port 8096 over HTTPS with Nginx and finish the setup wizard.

To install Jellyfin with Docker, create a `compose.yaml` that runs the official `jellyfin/jellyfin` image with `/config`, `/cache` and a read-only `/media` folder, publish port `8096` on `127.0.0.1` and run `sudo docker compose up -d`. Serve it over HTTPS with Nginx, then complete the setup wizard and add your libraries.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Intermediate | 30 minutes | Ubuntu 22.04 / 24.04, Debian 12 / 13, AlmaLinux / Rocky 9 / 10 | [Docker](https://help.freakhosting.com/portals/other/how-to-install-docker.md), a domain, storage for your media |

## What is Jellyfin?

Jellyfin is a free, open-source media server. It organises your films, series and music, fetches artwork and metadata, and streams them to a browser, phone, smart TV or the Jellyfin apps.

> [!WARNING]
>
> Only add media that you own or have the rights to stream. Don't use a server to share copyrighted content with others.

## What should I know before running Jellyfin on a VPS?

* **Transcoding is CPU-heavy.** When a device can't play a file as it is, Jellyfin converts it on the fly. Jellyfin's [hardware guide](https://jellyfin.org/docs/general/administration/hardware-selection) says video transcoding on the CPU is "very performance demanding", and that HEVC, VP9 and AV1 can be very demanding even on modern CPUs without hardware acceleration. A typical VPS has no GPU, so plan for **direct play**: store files in formats your devices play natively.
* **Streaming uses bandwidth.** Every stream counts as outgoing traffic. Check your usage in [VPS traffic and bandwidth](https://help.freakhosting.com/portals/vps-panel/understanding-vps-traffic-and-bandwidth.md).
* **Plan RAM and disk.** Jellyfin recommends at least 8 GB RAM for an average setup; a Linux server without a desktop may need only 4 GB. Keep Jellyfin's own files on SSD; media can sit on slower storage.

## Before you start

* [Install Docker](https://help.freakhosting.com/portals/other/how-to-install-docker.md) and [Nginx](https://help.freakhosting.com/portals/other/how-to-install-nginx.md). The commands use `sudo`; leave it out if you are `root`.
* Point `media.example.com` at your server. See [point a domain to your server](https://help.freakhosting.com/portals/other/how-to-point-a-domain-to-your-server.md).
* Put your media in one folder, for example `/srv/media/movies` and `/srv/media/shows`. Upload files with [SFTP](https://help.freakhosting.com/portals/other/how-to-transfer-files-with-sftp-winscp-and-filezilla.md) or [rsync](https://help.freakhosting.com/portals/other/how-to-copy-files-with-scp-and-rsync.md).

## How to install Jellyfin with Docker Compose

**1. Create the folders**

```bash theme={null}
mkdir -p ~/jellyfin/config ~/jellyfin/cache && cd ~/jellyfin
sudo mkdir -p /srv/media/movies /srv/media/shows
```

**2. Create compose.yaml**

Based on the [official container guide](https://jellyfin.org/docs/general/installation/container):

```yaml theme={null}
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    ports:
      - "127.0.0.1:8096:8096/tcp"
    volumes:
      - ./config:/config
      - ./cache:/cache
      - type: bind
        source: /srv/media
        target: /media
        read_only: true
    restart: unless-stopped
    environment:
      - JELLYFIN_PublishedServerUrl=https://media.example.com
```

`/config` holds Jellyfin's settings and database, `/cache` its cache and `/media` your library, mounted read-only so Jellyfin can't change your files. The official example also publishes `7359/udp` for auto-discovery on a local network; a VPS doesn't need it.

**3. Start Jellyfin**

```bash theme={null}
sudo docker compose up -d
```

## How to serve Jellyfin over HTTPS with Nginx

**1. Create the Nginx site**

Create `/etc/nginx/sites-available/media.example.com` (Ubuntu / Debian) or `/etc/nginx/conf.d/media.example.com.conf` (AlmaLinux / Rocky). This follows the [Jellyfin Nginx example](https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/nginx):

```nginx theme={null}
server {
    listen 80;
    listen [::]:80;
    server_name media.example.com;

    client_max_body_size 20M;

    location / {
        proxy_pass http://127.0.0.1:8096;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_buffering off;
    }

    location /socket {
        proxy_pass http://127.0.0.1:8096;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Protocol $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
    }
}
```

**2. Enable, test and get a certificate**

```bash theme={null}
sudo ln -s /etc/nginx/sites-available/media.example.com /etc/nginx/sites-enabled/   # Ubuntu / Debian only
sudo nginx -t
sudo systemctl reload nginx
sudo certbot --nginx -d media.example.com
```

On AlmaLinux / Rocky, run `sudo setsebool -P httpd_can_network_connect 1` before testing.

## How to complete the setup wizard

**1. Choose a language**

Open `https://media.example.com`. On **Select Language**, pick the language for the wizard.

**2. Create the administrator**

On **Setup Administrator Account**, enter a username and a strong password.

**3. Add your libraries**

On **Add Media Libraries**, click **+**, choose a content type (for example Movies), give it a name and add the folder `/media/movies`. Repeat for `/media/shows`.

**4. Finish the wizard**

Choose a metadata language. On the networking step, keep remote access on and leave automatic port mapping (UPnP) off. Then log in.

Do the wizard as soon as the site is reachable, so nobody else creates the administrator first.

## How to check it worked

```bash theme={null}
sudo docker compose ps
curl -s http://127.0.0.1:8096/health
```

The container shows `Up (healthy)` once the built-in health check on `/health` passes. Then play a file in the browser to confirm streaming works.

## How to back up Jellyfin

On Jellyfin 10.11 and later, open the **Dashboard**, go to **Backups** and click **Create Backup**. The zip lands in the backups folder inside the data directory (`./config` here) and always contains the database; you can add metadata, subtitles and trickplay images.

For a full manual backup, stop Jellyfin, copy the `config` folder, then start it again:

```bash theme={null}
cd ~/jellyfin
sudo docker compose stop
sudo tar -czf jellyfin-config-$(date +%F).tar.gz config
sudo docker compose start
```

Back up the media itself separately, for example with [rsync](https://help.freakhosting.com/portals/other/how-to-back-up-files-with-rsync.md).

## How to update Jellyfin

```bash theme={null}
cd ~/jellyfin
sudo docker compose pull
sudo docker compose up -d
```

To control upgrades, pin a minor version such as `jellyfin/jellyfin:10.11` instead of `latest`. Back up before every upgrade and read the [release notes](https://github.com/jellyfin/jellyfin/releases).

## Frequently asked questions

### Why are my folders empty or missing in the library dialog?

Usually a permissions problem. Check that the files under `/srv/media` are readable by all users (`sudo chmod -R a+rX /srv/media`) and that you used the container path `/media/...`, not the host path.

### Why is playback buffering?

The server is probably transcoding and the CPU can't keep up, or the connection is too slow for the bitrate. Lower the quality in the player, or convert the file to a format your device plays directly.

### Can I use hardware transcoding?

Only if your server has a supported GPU or video encoder and you pass it into the container. Without one, Jellyfin transcodes on the CPU. If your server has one, follow Jellyfin's hardware acceleration guide.

### Which port does Jellyfin use?

Port 8096 (TCP) for HTTP. With the setup above it listens only on `127.0.0.1`, and visitors reach it on 443 through Nginx.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Transfer files with SFTP](https://help.freakhosting.com/portals/other/how-to-transfer-files-with-sftp-winscp-and-filezilla.md)
>
> Upload your media.

> [card] [Mount a new disk](https://help.freakhosting.com/portals/other/how-to-mount-a-new-disk-on-linux.md)
>
> Extra space for your library.

> [card] [Find what is using CPU](https://help.freakhosting.com/portals/other/how-to-find-what-is-using-cpu-on-linux.md)
>
> Spot heavy transcoding.

> [card] [VPS traffic and bandwidth](https://help.freakhosting.com/portals/vps-panel/understanding-vps-traffic-and-bandwidth.md)
>
> Track streaming traffic.

***

> [!NOTE]
>
> **Checked against the official [Jellyfin documentation](https://jellyfin.org/docs/general/installation/container)** on 4 November 2026 (image `jellyfin/jellyfin:latest`); `compose.yaml` validated with `docker compose config` and the Nginx configuration syntax-tested on Ubuntu 24.04 LTS. Menu names can change between Jellyfin releases.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.