Self Hosting Navidrome in a Docker Container
Sat 19 July 2025I found a Cool Thing
I've been looking for a way to replace spot-who-shall-not-be-named-ify in my daily life. I came across a tool called Navidrome in one of those famous fediverse "here's how to self host anything you want" posts. The thing that really caught my eye was that it conforms to the Subsonic API, meaning that you can use it with many different apps for listening. I use Ultrasonic on my phone, and Supersonic1 on my desktop/laptop/Steam Deck. It also runs in a docker container! Neat! It'll be painless to set up!
First attempt
Calling it the first attempt is a bit unfair; I did actually get it working. My hard drive just also crashed immediately afterward and I didn't take enough notes, so I had to relearn from my notes and the docs. I also used the old nvme from my Steam Deck when I upgraded to a 1TB nVME. So the drive I'm using is tiny--64GB--leading to an interesting constraint that'll come up later.
But! The setup is real simple--the Navidrome docs make it dead simple to get something going to tweak and iterate on:
services:
navidrome:
image: deluan/navidrome:latest
user: 1000:1000 # should be owner of volumes
ports:
- "4533:4533"
restart: unless-stoppedi
env_file: "navidrome.env"
environment:
# Optional: put your config options customization here. Examples:
# ND_LOGLEVEL: debug
volumes:
- "/path/to/data:/data"
- "/path/to/your/music/folder:/music:ro"
Basically, a volume for administrative data, a volume for music, the ports you wanna use, and the image. No complicated filesystems or anything. I mostly used defaults, with the notable config I did being to add an admin user and enable the scanner every 5 mins in an env file:
username=lolno
password="yeah certainly not"
ND_SCANNER_ENABLED=true
ND_SCANNER_SCHEDULE='*/5 * * * *'
and in docker-compose.yaml, the line specifying env_file: "navidrome.env" makes sure those values are honored. Put a music file in the server's music folder specified in the volume declaration, do a docker compose up -d and baby, you got a stew goin.
The second time: tiny boot drive edition
So that constraint from earlier is the obvious one. I have a NAS. I have a tiny drive in this machine. Why not make music happen from the NAS?
First option I considered was mounting the SMB share. I found an option on Stack Overflow for doing a docker volume over SMB, involving pretty simple setup:
volumes:
- nas-share:/container-path
All you have to do is mount the share. Scripting it would be slightly more difficult, but could be doable, right? I'd still need to have my SMB creds floating around ~/, which... I'm not too happy about. But like, wait, isn't there a whole table of file systems somewhere? Some file system table I could declare it in?
fstab smb share in ~/Navidrome/Music
Here's the SO post about the topic. Add //server/share /pathto/mountpoint cifs credentials=/home/username/.smbcredentials,uid=shareuser,gid=sharegroup 0 0 to fstab, with an .smbcredentials file that's chmod 0600'ed containing
username=shareuser
password=sharepassword
domain=domain_or_workgroupname
The only significant edit I made to that post was putting the fstab creds in /etc/cifs-utils.
Then, my exact /etc/fstab edit ended up being:
//10.1.1.67/navidromemusic /home/rhrgrt/Navidrome/Music cifs credentials=/home/rhrgrt/.smbcreds,uid=1001,gid=1001 0 0
the user id and group id could maybe have been 1000 and 1000 (rhrgrt's user and group on the Navidrome Server) instead of 1001 and 1001 (navidromeuser's user and group on the NAS, and who the SMB share was "shared" with) but I was tired of testing, and it worked this way.
Next, so long as ~/Navidrome/Music exists, a sudo mount -a oughta mount it and then ls ~/Navidrome/Music/ to confirm things exist there, and you're done.
Testing it all works
Running docker compose up in tmux, I then went to port 4533 to sign in with my admin account. Made myself some user accounts, then added the server in my Supersonic and Ultrasonic apps. Double checked that the service works over a VPN (so I can access music from the internet without port forwarding).
All that done, all I need to do is figure out my process for adding new albums. It's pretty simple:
1. Download the zip
2. Move it to the storage serverrsync ~/Downloads/music.zip largemathbox:/dev/sda/or/whatever/Music
3. Realize I could drag and drop in nemo instead
4. Unzip there, delete zip archive
5. Wait patiently for the Navidrome re-scan, and check the album is there now
All buttoned up and ready for use! And now whenever I buy a new album on Bandcamp, it's easy to make it happen at my phone or desktop.
-
I never fail to type "hypersonic" and "ultrasonic" in my computer when looking for the app, and am constantly looking for "supersonic" and "hypersonic" on my phone. I hate this naming convention. ↩
-
My domain/workgroup name is WORKGROUP because windows pitches such a shitfit sometimes if that's not the name. There's not been a (non-guest) windows machine on this lan ever actually but I'm so ascairt of a windows machine finding me and complaining about WORKGROUP not existing that I've preemptively complied. ↩
Blu Blog