Using Docker Compose:
Create a docker-compose.yml
file with the following contents:
version: "3.5"
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
user: uid:gid
network_mode: "host"
volumes:
- /path/to/config:/config
- /path/to/cache:/cache
- /path/to/media:/media
- /path/to/media2:/media2:ro
restart: "unless-stopped"
# Optional - alternative address used for autodiscovery
environment:
- JELLYFIN_PublishedServerUrl=http://example.com
Then while in the same folder as the docker-compose.yml
run:
docker-compose up
To run the container in background add -d
to the above command.
You can learn more about using Docker by reading the official Docker documentation.