Self-Host Your Music with Navidrome on a Raspberry Pi

Introduction

I decided to experiment with self-hosting our music by setting up a family music library. My goal was to easily share my music collection and regain full control over it, eliminating the need for major streaming platforms. I chose Navidrome, a modern web-based music server and streamer, for this purpose. Below are my notes on setting it up and using it effectively.

Navidrome login page

Notes

Prerequisites:

Docker Compose file:

services:
  navidrome:
    image: deluan/navidrome:0.54.4
    container_name: navidrome
    user: 1000:1000
    ports:
      - "4533:4533"
    restart: unless-stopped
    environment:
      # Optional: put your config options customization here. Examples:
      ND_SCANSCHEDULE: 1h
      ND_LOGLEVEL: info  
      ND_SESSIONTIMEOUT: 24h
      ND_BASEURL: ""
    volumes:
      - "./data:/data"
      - "./music:/music:ro"

Why 1000:1000? It's the default user in the container.

Adjust the volumes permissions, on your local machine, to match the container's user:

sudo chown -R 1000:1000 data
sudo chown -R 1000:1000 music

On the raspberry pi, the default user is pi, which has the uid and gid of 1000.

Accessing Navidrome

On your local network, if your raspberry pi hostname is rpi5 navigate to http://rpi5:4533 to access Navidrome. You can also use the IP address of your raspberry pi. There, you will be prompted to create an admin account.

Populating Your Music Collection

You can now copy music from your computer to the music directory on the raspberry pi.

Exposing Navidrome to the Internet

For instructions on how to expose Navidrome to the internet, visit my other blog post:

Self-Hosting Web Services with a VPS, WireGuard, and a Raspberry Pi

Native apps

Aside from the web interface, you can also use native apps to access Navidrome. For example, Amperfy on iOS.

Conclusion

The setup was a success. My criteria included using free and open-source software, having native apps, a web interface, offline access, and a simple Docker Compose setup. Navidrome met all these requirements. I am pleased with the results and hope you will be too.

Mastodon