You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
4.3 KiB
Markdown

3 years ago
# Jellyfin in docker
3 years ago
###### guide-by-example
3 years ago
![logo](https://i.imgur.com/gSyMEvD.png)
3 years ago
# Purpose & Overview
3 years ago
Stream movies/tv-shows/music to a browser, or a [large selection of devices and services.](https://jellyfin.org/clients/)
3 years ago
3 years ago
* [Official site](https://jellyfin.org/)
* [Github](https://github.com/jellyfin/jellyfin)
* [DockerHub](https://hub.docker.com/r/jellyfin/jellyfin/)
3 years ago
3 years ago
Jellyfin if a free media system, an alternative to proprietary Plex.<br>
3 years ago
The core server side is written in C#, web client in Javascript,
and a number of other clients written in various languages and frameworks.
Starting point for me was [this viggy96 repo](https://github.com/viggy96/container_config)
3 years ago
# Files and directory structure
```
3 years ago
/mnt/
└── bigdisk/
├── tv/
├── movies/
└── music/
3 years ago
/home/
└── ~/
└── docker/
3 years ago
└── jellyfin/
7 months ago
├── jellyfin_cache/
├── jellyfin_config/
3 years ago
├── transcodes/
3 years ago
├── .env
2 years ago
└── docker-compose.yml
3 years ago
```
3 years ago
* `/mnt/bigdisk/...` - a mounted media storage share
7 months ago
* `jellyfin_cache/` - cache
* `jellyfin_config/` - configuration
3 years ago
* `transcodes/` - transcoded video storage
3 years ago
* `.env` - a file containing environment variables for docker compose
* `docker-compose.yml` - a docker compose file, telling docker how to run the containers
2 years ago
You only need to provide the two files.</br>
3 years ago
The directories are created by docker compose on the first run.
# docker-compose
3 years ago
The media are mounted in read only mode.
3 years ago
`docker-compose.yml`
```yml
services:
3 years ago
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
hostname: jellyfin
3 years ago
restart: unless-stopped
env_file: .env
3 years ago
devices:
- /dev/dri
3 years ago
volumes:
3 years ago
- ./transcodes/:/transcodes
7 months ago
- ./jellyfin_config:/config
- ./jellyfin_cache:/cache
3 years ago
- /mnt/bigdisk/serialy:/media/video:ro
- /mnt/bigdisk/mp3/moje:/media/music:ro
ports:
1 year ago
- "8096:8096"
1 year ago
- "1900:1900/udp"
3 years ago
networks:
default:
3 years ago
name: $DOCKER_MY_NETWORK
external: true
3 years ago
```
`.env`
```bash
# GENERAL
DOCKER_MY_NETWORK=caddy_net
TZ=Europe/Bratislava
```
**All containers must be on the same network**.</br>
Which is named in the `.env` file.</br>
If one does not exist yet: `docker network create caddy_net`
# Reverse proxy
3 years ago
Caddy is used, details
3 years ago
[here](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/caddy_v2).</br>
`Caddyfile`
```
3 years ago
jellyfin.{$MY_DOMAIN} {
reverse_proxy jellyfin:8096
3 years ago
}
```
# First run
3 years ago
![interface-pic](https://i.imgur.com/pZMi6bb.png)
3 years ago
3 years ago
# Specifics of my setup
7 months ago
* no real long term use
* findroid app does not jump subtitles like official one
2 years ago
* amd cpu and no gpu, so no experience with hw transcoding
3 years ago
* media files are stored and shared on trunas scale VM
3 years ago
and mounted directly on the docker host using [systemd mounts](https://forum.manjaro.org/t/root-tip-systemd-mount-unit-samples/1191),
3 years ago
instead of fstab or autofs.
`/etc/systemd/system/mnt-bigdisk.mount`
```ini
[Unit]
Description=12TB truenas mount
[Mount]
What=//10.0.19.19/Dataset-01
Where=/mnt/bigdisk
Type=cifs
Options=ro,username=ja,password=qq,file_mode=0700,dir_mode=0700,uid=1000
DirectoryMode=0700
[Install]
WantedBy=multi-user.target
```
3 years ago
`/etc/systemd/system/mnt-bigdisk.automount`
3 years ago
```ini
[Unit]
3 years ago
Description=12TB truenas mount
3 years ago
[Automount]
Where=/mnt/bigdisk
[Install]
WantedBy=multi-user.target
```
2 years ago
to automount on boot - `sudo systemctl enable mnt-bigdisk.automount`
3 years ago
3 years ago
# Troubleshooting
![error-pic](https://i.imgur.com/KQhmZTQ.png)
*We're unable to connect to the selected server right now. Please ensure it is running and try again.*
2 years ago
If you encounter this, try opening the url in browsers private window.<br>
3 years ago
If it works then clear the cookies in your browser.
7 months ago
*No playback at all but GUI works fine*
Might be no access to network share, for example if dockerhost boots up faster
than NAS.
3 years ago
3 years ago
# Update
3 years ago
Manual image update:
- `docker-compose pull`</br>
- `docker-compose up -d`</br>
- `docker image prune`
6 months ago
# Useful
3 years ago
6 months ago
* https://www.reddit.com/r/selfhosted/comments/1bit5xr/livetv_on_jellyfin_2024/