Docker Compose on Linux
Tried? TestedThe simplest way. Works on Debian, Ubuntu, Fedora and other distributions with Docker.
Tested by the developer with Docker Compose on Linux.
- Install Docker Engine with the Compose plugin following your distribution guide, or with the commands below on Debian and Ubuntu.
- Make a folder, for example /opt/nielix, and put the compose file in it. Docker creates the data folder as root on first start.
- Start with docker compose up -d and open the administration on port 8420.
- Open the ports in the firewall if you have one: TCP 8420 and UDP 7421.
- If you do not want to run as root, set user in the compose file and give the folder to the same user (the command below). This has been tested.
- The container must use host networking. Without it the TV app cannot find the server on its own, and the server writes a warning in the log.
- If the media files are on a network drive, mount it on the host first and point the compose file at the mount point.
services:
nielix:
image: ghcr.io/themsn/nielix:latest
container_name: nielix
# host networking, so apps can find the server on their own
network_mode: host
environment:
TZ: Europe/Copenhagen # CHANGE: your time zone
NIELIX_ADDR: ":8420"
NIELIX_NAME: Nielix # the name devices see
NIELIX_MEDIA_ROOTS: /media
volumes:
- ./data:/data # database, images and backups: back up this folder
- /path/to/your/media:/media:ro # CHANGE: the folder with your films and series (:ro = read-only)
restart: unless-stopped
docker run -d --name nielix --restart unless-stopped \
--network host \
-e TZ=Europe/Copenhagen \
-e NIELIX_MEDIA_ROOTS=/media \
-v "$PWD/data:/data" \
-v /path/to/your/media:/media:ro \
ghcr.io/themsn/nielix:latest
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker "$USER"
# log out and in again so the group applies
docker compose version
sudo ufw allow 8420/tcp
sudo ufw allow 7421/udp
sudo ufw allow 5353/udp
sudo chown -R 1000:1000 ./data
# and in docker-compose.yml:
# user: "1000:1000"
