What is Docker and why use it on a NAS?

Docker lets you run self-hosted apps in isolated containers. Instead of installing Jellyfin, Nextcloud, or Home Assistant directly on your NAS (which can break things), each app runs in its own box. They cannot interfere with each other, and they are easy to remove if you change your mind.

💡Think of Docker containers like apps on your phone. Each one is self-contained, easy to update, and easy to delete. Your NAS operating system stays clean underneath.
bash — the 5 Docker commands you need every day
# See what is running right now
$
docker ps

# See everything including stopped containers
$
docker ps -a

# Live logs from a container (Ctrl+C to stop)
$
docker logs -f jellyfin

# Restart a container
$
docker restart jellyfin

# See which container is using the most CPU and RAM
$
docker stats

Using Docker Compose — a beginner guide

Docker Compose lets you define a container in a simple text file instead of typing a long command every time. It is much easier to manage, update, and back up.

Step 1Create a folder for your app

Keep each app in its own folder. This keeps things organised.

bash
$
mkdir -p /opt/docker/jellyfin && cd /opt/docker/jellyfin
$
nano docker-compose.yml
Step 2Write a basic compose file
docker-compose.yml — Jellyfin example
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
restart: unless-stopped
ports:
- "8096:8096"
# access at http://NAS-IP:8096
volumes:
- /opt/docker/jellyfin/config:/config
- /mnt/data/media:/media
# your media folder
environment:
- PUID=1000
# run: id to get your user ID
- PGID=1000
# run: id to get your group ID
Step 3Start it up
bash
$
docker compose up -d
Container jellyfin started

# Then open http://YOUR-NAS-IP:8096 in your browser

Permission denied — container cannot write files

This is the number one Docker problem on NAS systems. The container tries to write to a folder but Linux says no. The fix is making the container user match the folder owner.

bash — fix permission errors in 3 steps
# Step 1: Find your user ID and group ID
$
id
uid=1000(yourname) gid=1000(yourname) ← use these in PUID/PGID

# Step 2: Give your user ownership of the config folder
$
sudo chown -R 1000:1000 /opt/docker/jellyfin/config

# Step 3: Restart
$
docker restart jellyfin

How to update containers safely

Updating is easy but blindly pulling latest can sometimes break things. Here is the safe way.

bash — safe update process
# Pull the new image (does not affect running container yet)
$
docker pull jellyfin/jellyfin:latest

# Recreate the container with the new image
$
docker compose down && docker compose up -d

# Check it started cleanly
$
docker logs jellyfin --tail 30

# Something broke? Pin to the previous working version:
image: jellyfin/jellyfin:latest
image: jellyfin/jellyfin:10.8.13 ← pin this in compose file
$
docker compose down && docker compose up -d

Related guides