Navidrome is a lightweight, self-hosted music server that lets you stream your personal music collection anywhere, on any device. It’s fast, modern, and works seamlessly with Subsonic-compatible apps. Pairing Navidrome with Docker makes installation and management much easier, as it keeps everything isolated and simple to update.
In this guide, we’ll walk through the process of installing Navidrome on Ubuntu 24.04 using Docker. By the end, you’ll have an efficient music streaming server up and running, ready to serve your library across your devices.
Before setting up Docker and Navidrome, it’s worth considering where you’ll host your Docker environment: on bare metal, a virtual machine (VM), or an LXC container. Each approach has its own advantages and trade-offs. Running on bare metal gives you the best performance and direct hardware access, but it lacks flexibility if you want to isolate or quickly redeploy services. Using a VM provides strong isolation and makes it easier to snapshot, back up, or migrate your server, though this comes at the cost of some extra overhead. LXC containers strike a middle ground — they’re lighter than VMs and more flexible than bare metal, but they share the host’s kernel, which means slightly less isolation and possible compatibility issues for certain workloads. Your choice depends on whether you prioritize performance, portability, or ease of management.
apt update && apt upgrade -y
apt update
/etc/apt/sources.list (and any files under /etc/apt/sources.list.d/).&&
This is a logical operator in Bash.
It means “only run the next command if the previous one succeeds.”
So, apt upgrade -y will only run if apt update completes without errors.
apt upgrade -y
Upgrades all installed packages on the system to the latest versions available in the repositories.
The -y flag automatically answers “yes” to all prompts, so it won’t stop to ask for confirmation.
cURL (short for Client URL) is a command-line tool used to transfer data to or from a server. It supports a wide range of protocols, including HTTP, HTTPS, FTP, and more, making it very versatile for downloading files, testing APIs, or sending data over the web. In practice, cURL is often used to quickly fetch web pages, download installation scripts, or check connectivity between a server and a URL.
apt install curl -y
adduser [username]
adduser [username] sudo
su [username]
curl -sSL https://get.docker.com | sh
curl -sSL https://get.docker.com
Uses cURL to fetch a shell script from Docker’s official website.
The flags mean:
-s → silent mode (hides progress meter and errors unless something goes wrong).
-S → if an error occurs, show it (useful with -s).
-L → follow redirects automatically (in case the URL redirects to another location).
Essentially, this part downloads the official Docker installation script.
| sh
The pipe (|) sends the downloaded script directly into sh (the shell) to be executed immediately.
This means you are running the script without saving it first, which is convenient but can also be risky if you don’t fully trust the source.
When you install Docker, it creates a special user group called docker. By default, only the root user can run Docker commands, which means you’d have to type sudo every time. Adding your user to the docker group lets you run Docker as a normal user without sudo, making it more convenient for everyday use. Keep in mind, though, that this group has root-level access to the system, so you should only add trusted users.
adduser [username] docker
If you’re logged in as your regular user, simply type:
exit
If you switched to root using su, you may need to type exit twice to fully log out.
After that, log back in with your normal user account.
passwd -l root
It’s a good idea to run services under their own user account. Let’s make one called Navidrome:
adduser Navidrom
We’ll need these IDs later for Docker permissions. Run:
id Navidrom
Choose a location (such as your home folder) where you want Navidrome’s files to live.
mkdir Navidrom
cd Navidrom
nano docker-compose.yml
Paste the following starter configuration into the file. This will work as-is, but we’ll improve it in the next step:
services:
navidrome:
image: deluan/navidrome:latest
#user: 1000:1000 # should be owner of volumes
ports:
- "4533:4533"
restart: unless-stopped
# environment:
# Optional: put your config options customization here. Examples:
# ND_LOGLEVEL: debug
volumes:
- "/path/to/data:/data"
- "/path/to/your/music/folder:/music:ro"services:
navidrome:
image: deluan/navidrome:latest
#user: 1000:1000 # should be owner of volumes
ports:
- "4533:4533"
restart: unless-stopped
# environment:
# Optional: put your config options customization here. Examples:
# ND_LOGLEVEL: debug
volumes:
- "/path/to/data:/data"
- "/path/to/your/music/folder:/music:ro"Let's start making this config better by getting user working earlier I had you run id Navidrom that is the info we need to fix this line
remove the # and enter the valve that was output from the command for group and user
user: 1001:1001 # should be owner of volumes
user: 1001:1001 # should be owner of volumesCTRL + O (write out) ENTER (confirm) CTRL + X (exit)
CTRL + O (write out)
ENTER (confirm)
CTRL + X (exit)mkdir /home/Navidrom/music/
mkdir /home/Navidrom/music/data
sudo chown -R 1001:1001 /home/Navidrom/music/
chown
-R
/home/Navidrom/music/, not just the directory itself. 1001:1001
1001 is both the UID and GID of the Navidrom user you created earlier. This ensures that the Navidrome Docker container has the correct permissions to read and write your music files. /home/Navidrom/music/
mkdir /home/[username]/MyMusic
nano docker-compose.yml
volumes:
- /home/Navidrome/music/data:/data
- /home/[username]/music/MyMusic:/music:ro volumes:
- /home/Navidrome/music/data:/data
- /home/[username]/music/MyMusic:/music:rodocker compose up -d