# Self-host Jellyfin

> Free-software media server that streams a library of video, music and photos to apps and browsers. Run your own Jellyfin on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

_Updated November 23, 2026_

Running your own Jellyfin usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Jellyfin behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

## Just ask your agent

Open a Pro workspace (Jellyfin runs in Docker, which Plus and Pro include), tap **Launch** to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

```text
Set up Jellyfin on this workspace and give me the link. Follow https://envhaven.com/self-host/jellyfin.md
```

Then open the link it sends and create your Jellyfin account straight away, before anyone else finds the address. That is the whole request: the address in it is this page's Markdown copy, and the agent follows the instructions for it further down, with every setting Jellyfin's docs require.

## Or keep it private with Tailscale

The preview URL puts Jellyfin on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Jellyfin an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace's **Vars** pane as `TS_AUTHKEY`, and ask the agent:

```text
Set up Jellyfin on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/jellyfin.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
```

- A Tailscale container runs beside Jellyfin, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- Anything other services have to reach, such as a webhook, still needs a public address. [Keep self-hosted apps private with Tailscale](https://envhaven.com/guides/self-host-privately-with-tailscale) covers both, and what Tailscale's free plan includes.

| At a glance |  |
| --- | --- |
| What it is | Music, video and books |
| License | GPL-2.0 |
| Runs as | Docker (`jellyfin/jellyfin`) |
| Memory | Recommended 8 GB of system RAM (4 GB may be enough for a Linux server without a GUI); no minimum stated ([docs](https://jellyfin.org/docs/general/administration/hardware-selection/)) |
| Plan that fits | Pro or larger |
| Web port | 8096 |
| Documentation | [jellyfin.org/docs/general/installation/container/](https://jellyfin.org/docs/general/installation/container/) |

## What your agent takes care of

- **Installing it.** Jellyfin runs from the official image, `jellyfin/jellyfin`, with its data in folders under `~/apps/jellyfin`.
- **Putting it on an HTTPS address.** The workspace's preview URL serves it, and your own domain can too.
- **Locking it down first.** What Jellyfin's docs say to set before it faces the internet, below.
- **Telling you what to back up**: /config, /cache and the media folders mounted into the container (Docker: the data directory is wherever the /config volume is sourced from), Debian and Ubuntu packages: data directory /var/lib/jellyfin and config directory /etc/jellyfin (set in /etc/default/jellyfin), Fallback for a plain user process: $XDG_DATA_HOME/jellyfin or $HOME/.local/share/jellyfin and the built-in backup covers the database, metadata, subtitles and trickplay data ([docs](https://jellyfin.org/docs/general/administration/configuration/)).

### The settings it needs behind a proxy

- Known Proxies (Dashboard, Networking): Lists the reverse proxy IP addresses; without it Jellyfin discards the forwarded headers and sees the proxy as the client. ([docs](https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/))
- WebSocket pass-through (proxy side): The proxy must allow WebSocket connections to Jellyfin. ([docs](https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/))
- Base URL (Dashboard, Networking): URL path prefix to serve under, such as /jellyfin; needs a server restart. ([docs](https://jellyfin.org/docs/general/post-install/networking/))
- Local Networks (Dashboard, Networking): CIDR ranges Jellyfin treats as the local network; the remote-access controls depend on it. ([docs](https://jellyfin.org/docs/general/post-install/networking/))
- JELLYFIN_PublishedServerUrl (environment variable): Alternative address advertised for client autodiscovery. ([docs](https://jellyfin.org/docs/general/installation/container/))
- HTTPS port 8920 (off by default): Jellyfin can serve HTTPS itself, but the port is unused unless enabled; with a TLS-terminating proxy it stays off. ([docs](https://jellyfin.org/docs/general/post-install/networking/))
- Allow remote access to this server (setup wizard): Wizard option that allows connections from outside the local network. ([docs](https://jellyfin.org/docs/general/post-install/setup-wizard/))

### Before it faces the internet

- The first-run wizard creates the administrator account, so finish it before the address is shared and use a strong password. ([docs](https://jellyfin.org/docs/general/post-install/setup-wizard/))
- Do not open the port straight to the internet; put a TLS proxy in front. ([docs](https://jellyfin.org/docs/general/post-install/networking/))
- Forwarded-for headers are ignored unless the sender is a known proxy. ([docs](https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/))
- Proxy access logs can leak the api_key parameter. ([docs](https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/))

## Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

- "Organize the files in ~/apps/media into folders the server can scan."
- "Make a library for each kind of media."
- "Move Jellyfin to app.example.com." Add the domain on the dashboard's Domains page with a CNAME to `domains.envhaven.app`, and the agent changes Jellyfin's address settings to match.
- "Update Jellyfin to the latest release." It pulls the new image and recreates the container, data kept.

## Instructions for the agent

The agent reads these from the page's Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

```text
Set up Jellyfin on this workspace and serve it at my preview URL.
- Use Docker Compose with the official image, jellyfin/jellyfin, starting from the docs' compose file: https://jellyfin.org/docs/general/installation/container/. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/jellyfin and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Jellyfin's port 8096.
- The preview URL terminates HTTPS in front of Jellyfin: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/jellyfin.md for the preview URL, as Jellyfin's docs describe for running behind a proxy; skip any that apply only when Jellyfin serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/jellyfin.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Jellyfin up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
```

## What to know

- In Docker, Jellyfin's containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- No GPU means software transcoding on the CPU, which the docs call a poor fit; direct play avoids it. ([docs](https://jellyfin.org/docs/general/administration/hardware-selection/))
- HDR to SDR tone-mapping on the CPU can overload even a fast processor. ([docs](https://jellyfin.org/docs/general/administration/hardware-selection/))
- Hardware transcoding needs a graphics card; a remote server without a GPU cannot use it. ([docs](https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/))
- Auto-discovery (client discovery on UDP 7359, DLNA on UDP 1900) works only inside the local subnet, so a remote server outside the home network gets no discovery. ([docs](https://jellyfin.org/docs/general/post-install/networking/))
- DLNA discovery uses a broadcast on the subnet. ([docs](https://jellyfin.org/docs/general/post-install/networking/dlna/))
- Remote streaming needs upload bandwidth. ([docs](https://jellyfin.org/docs/general/administration/hardware-selection/))
- Over HTTP and HTTPS only the web client and streaming work remotely; everything else is local only. ([docs](https://jellyfin.org/docs/general/post-install/networking/))
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

## Without a workspace

The manual route, on a server you run:

1. Rent a Linux VPS, secure SSH, and create a user for the app.
2. Install Docker and write a compose file from the official image.
3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Jellyfin's own [documentation](https://jellyfin.org/docs/general/installation/container/) covers each step for its install methods.

## Sources

Facts about Jellyfin come from its own documentation, checked on 2026-11-23:

- [jellyfin.org/docs/general/installation/container](https://jellyfin.org/docs/general/installation/container/)
- [jellyfin.org/docs/general/administration/hardware-selection](https://jellyfin.org/docs/general/administration/hardware-selection/)
- [jellyfin.org/docs/general/post-install/networking/reverse-proxy](https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/)
- [jellyfin.org/docs/general/post-install/networking](https://jellyfin.org/docs/general/post-install/networking/)
- [jellyfin.org/docs/general/post-install/setup-wizard](https://jellyfin.org/docs/general/post-install/setup-wizard/)
- [jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration](https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/)
- [jellyfin.org/docs/general/post-install/networking/dlna](https://jellyfin.org/docs/general/post-install/networking/dlna/)
- [jellyfin.org/docs/general/administration/configuration](https://jellyfin.org/docs/general/administration/configuration/)

## Keep reading

- [Self-host any app with your agent](https://envhaven.com/self-host)
- [Self-host Navidrome](https://envhaven.com/self-host/navidrome)
- [Self-host Audiobookshelf](https://envhaven.com/self-host/audiobookshelf)
- [AI agent hosting](https://envhaven.com/guides/ai-agent-hosting)

Source: https://envhaven.com/self-host/jellyfin
