Navidrome – A Self-Hosted Music Server on Docker
In this tutorial, you’ll be learning how to install Navidrome on Docker
What is Navidrome ?
- It allows you to listen to your own digital music collection in the same way you would with services like Spotify, Apple Music and others.
- It also allows you to easily share your music and playlists with your friends and family
- It is lightweight and free to use
Read more here: https://www.navidrome.org/docs/
For more blogs, visit: Blogs
For Docker related Blogs, visit: Docker
Pre-requisites
- Docker and Docker-Compose on Ubuntu installed and ready to use
- A digital music collection
Steps to deploy Navidrome on Docker
1. Create a folder to maintain the project and create a docker-compose.yml file
# Create a folder
mkdir navidrome
# Navigate into it
cd navidrome
# Create a docker compose file
touch docker-compose.yml
2. Add in the contents into the docker-compose.yml file as shown
# Get the UID and GID of the current user by using the below commands
# Note the output of this command, we will be using this in our docker-compose configuration
echo $(id -u):$(id -g)
# Create a directory for music and data
mkdir data
mkdir music
# Edit the file using the editor of your choice
nano docker-compose.yml
# Paste the below content into it
version: "3"
services:
navidrome:
image: deluan/navidrome:latest
user: 1000:100 # should be owner of volumes
ports:
- "8000:4533"
restart: unless-stopped
environment:
# Optional: put your config options customization here. Examples:
ND_SCANSCHEDULE: "@every 1h"
ND_LOGLEVEL: "info"
ND_UIWELCOMEMESSAGE: "Welcome Nishanth Nagendra!!!"
ND_DEFAULTTHEME: "Dark"
ND_ENABLECOVERANIMATION: "true"
ND_ENABLEDOWNLOADS: "true"
ND_SESSIONTIMEOUT: "24h"
# ND_BASEURL: ""
volumes:
- "/home/pi/data:/data"
- "/home/pi/music:/music:ro"
# The user parameter "user: 1000:100" will have the UID and GID of the current user which can be obtained as shown in the previous step
# The port parameter "8000:4533" specifies the port mapping where the left port denotes the host port and the right port denotes the container port
# The environment variables can be configured based on your requirement. Refer the below page for details about environment variables
# The volume mounts must be created to the data and music folder. You can point your music library to the /music mount. Here I will be pointing it to the /home/pi/music location
# Save the file
Refer to this page for additional environment variables: https://www.navidrome.org/docs/usage/configuration-options/#available-options
3. Deploy the container with the docker-compose command
# -d runs the container in detached mode
docker-compose up -d
4. Wait for the container to come up and then browse to http://<ip>:<port> where <ip> is the IP of your machine and <port> is the port on which navidrome is deployed.
Setup the username and password for your account
5. You should now be able to see the dashboard as shown below
6. Move your songs library to the /music folder created previously or point the volume mount to your music library. Once this is done, click on the quick scan icon and then your songs will be shown on the dashboard
Congratulations!! You’ve successfully installed Navidrome on Docker