It’s my music and I’ll stream if I want to, stream if I want to, stream if I want to!

This is hands down one the easiest self-hosting project that I’ve installed.

What is Navidrome Streaming?

Navidrome can be used as a standalone server, that allows you to browse and listen to your music collection using a web browser.

It can also work as a lightweight Subsonic-API compatible server, that can be used with any Subsonic compatible client .

https://www.navidrome.org/docs/overview/

A screenshot of the Navidrome ‘Random Albums’ page showing the album artwork. Navidrome Random Albums Screenshot

Why choose Navidrome for Streaming?

I already have a Jellyfin media server, so I could have used my existing Jellyfin app to listen to my music when out and about.

However, as per the name of this blog, I like tinkering.

Without a doubt, setting up the reverse proxy was the most time consuming part for me.

Given that there were so few necessary steps, the whole process took about thirty minutes.

(It probably helped that I already had all of the music folders on the server already.)

Installing the Navidrome Server

https://www.navidrome.org/docs/installation/linux

Create the directory structure

The following will create the directory to store the Navidrome executable with the proper permissions.

sudo install -d -o $USER -g $USER /opt/navidrome

Then create a Navidrome working directory with the proper permissions.

sudo install -d -o $USER -g $USER /var/lib/navidrome

Download the archive

The following will grab the Navidrome release.

Specifically the one for my Raspberry Pi.

wget https://github.com/navidrome/navidrome/releases/download/v0.52.5/navidrome_0.52.5_linux_arm64.tar.gz -O Navidrome.tar.gz

Extract the archive

The following extracts the archive contents to the previously created Navidrome executable directory.

sudo tar -xvzf Navidrome.tar.gz -C /opt/navidrome/

Take ownership

Then, take ownership of the executable.

sudo chown -R $USER:$USER /opt/navidrome

Point to a music library

First, create the config file:

nano /var/lib/navidrome/navidrome.toml

Then add:

# Music location
MusicFolder = "/home/foo/music"

Create a Navidrome .service file (optional)

First, create the config file:

sudo nano /etc/systemd/system/navidrome.service

Then add:

[Unit]
Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
After=remote-fs.target network.target
AssertPathExists=/var/lib/navidrome

[Install]
WantedBy=multi-user.target

[Service]
User=foo
Group=foo
Type=simple
ExecStart=/opt/navidrome/navidrome --configfile "/var/lib/navidrome/navidrome.toml"
WorkingDirectory=/var/lib/navidrome
TimeoutStopSec=20
KillMode=process
Restart=on-failure

# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
DevicePolicy=closed
NoNewPrivileges=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
ReadWritePaths=/var/lib/navidrome

# You can uncomment the following line if you're not using the jukebox This
# will prevent navidrome from accessing any real (physical) devices
PrivateDevices=yes

# You can change the following line to `strict` instead of `full` if you don't
# want navidrome to be able to write anything on your filesystem outside of
# /var/lib/navidrome.
ProtectSystem=strict

# You can uncomment the following line if you don't have any media in /home/*.
# This will prevent navidrome from ever reading/writing anything there.
ProtectHome=true

# You can customize some Navidrome config options by setting environment variables here. Ex:
#Environment=ND_BASEURL="/navidrome"

Open a port on the firewall (optional depending on firewall usage)

First, add a rule to allow Navidrome traffic:

sudo ufw allow 4533 comment 'Navidrome Traffic'

Then, check the status:

sudo ufw status

Or, to only allow traffic on the internal network:

sudo ufw allow from 192.168.0.0/24 to any port 4533 comment "Navidrome traffic from LAN only"

Create an account

Remember that the first account created will have Admin i.e. escalted privileges.

Set up a reverse proxy (optional)

https://blog.yossarian.net/2022/02/02/Setting-up-Navidrome-with-Nginx-as-a-reverse-proxy

https://ked.wtf/posts/2022/navidrome-setup-guide

First, create a basic nginx config file for Navidrome:

sudo nano /etc/nginx/sites-available/NAVIDROME

Then, add:

server {
    listen                  80;
    listen                  [::]:80;
    server_name             navidrome.example.net;

    location / {
        proxy_pass          http://<server_ip>:4533;
        proxy_set_header    Host $host;
        proxy_set_header    X-Real-IP $remote_addr;
        proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header    X-Forwarded-Proto $scheme;
        proxy_set_header    X-Forwarded-Protocol $scheme;
        proxy_set_header    X-Forwarded-Host $http_host;
        proxy_buffering     off;
    }
}

Then, link:

sudo ln -s /etc/nginx/sites-available/NAVIDROME /etc/nginx/sites-enabled/

Now, check the nginx status:

sudo nginx -t

Finally, restart nginx:

sudo systemctl restart nginx

Now, grab an SSL Certificate:

sudo certbot

Certbot will do it’s thing and update the previously created nginx conf.

Then, ‘check and restart’ nginx:

sudo nginx -t && sudo systemctl restart nginx

Set an encryption key (optional)

This is a one-time only configuration

https://www.navidrome.org/docs/usage/security/#encrypted-passwords

Generate a key (basically a long password):

https://bitwarden.com/password-generator

Then, in:

nano /var/lib/navidrome/navidrome.toml

Add:

# Re-encrypt all existing current passwords (one time thing)
PasswordEncryptionKey = "super_long_password"

Then, restart and check the status:

sudo systemctl restart navidrome

sudo systemctl status navidrome

Which Navidrome Streaming Client?

The hardest aspect of using Navidrome for me, was choosing a client that I liked.

All of my music is stored in folders (Artist – Album Title) and I wanted a client that could reflect this.

Additionally I wanted a simple UI.

After an array of clients were trawled through, (one popular Android player has a dizzying amount of customisation options) I settled on Tempo from the F-Droid store.

Bonus!

Navidrome will also stream radio stations.

A screenshot of the Navidrome ‘Radio’ page showing the currently listed stations. Navidrome Radio Tab Screenshot

Obviously you will have to add your own stations to the list but here are a couple to get you started:

Love a Brother Radio – http://23.106.236.229:24914/stream

Radio Free Fedihttp://relay.radiofreefedi.net/listen/comfy/comfy.mp3

Radio Free Fedihttp://relay.radiofreefedi.net/listen/rff/rff.mp3

However, many more stations can be added.