Install Navidrome on Debian 11

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. In this post, you will learn how to install Navidrome on Debian 11.

First, what is Navidrome?

According to the project’s website,

It’s a software that allows you to listen to your own digital music 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.

So in a nutshell, it’s an application that allows you to deploy your music library using services like Spotify as inspiration.

Some main features of Navidrome are as follows

  • Handles large music collections
  • Streams virtually any audio format available
  • Reads and uses all the metadata you have selected
  • Great support for compilations (multi-artist albums) and box sets (multi-disc albums)
  • Multi-user, each user has their own play counts, playlists, favorites, etc.
  • Very low resource usage

On top of all this, it is cross-platform, and we can use Docker as an installation method. This way we can install it on many operating systems quickly.

Let’s go for it.

Install Navidrome on Debian 11

First, you have to upgrade the system completely on your server.

sudo apt update
sudo apt upgrade

Next, we need to install ffmpeg.

sudo apt install ffmpeg

After this, create the necessary folders for Navidrome to run.

sudo mkdir -p /opt/navidrome
sudo mkdir -p /var/lib/navidrome

Next, set the necessary permissions on the folders by making the current user the owner of both folders.

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

Now, using the wget command, we can start the installation as follows.

wget https://github.com/navidrome/navidrome/releases/download/v0.47.5/navidrome_0.47.5_Linux_x86_64.tar.gz -O Navidrome.tar.gz
1.- Download Navidrome using wget
1.- Download Navidrome using wget

At the time of writing this post, the latest stable version of Navidrome is 0.47.5 so check the download site for the correct link.

Then, unzip the downloaded file.

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

Then edit or create an initial configuration file.

sudo vi /var/lib/navidrome/navidrome/navidrome.toml

And add the following

MusicFolder = "<library_path>"

Save the changes and close the editor.

Creating a Systemd service

Navidrome management can be made easier by creating a systemd service. This will make starting it, stopping it, restarting it or checking its status a simple task.

Create the service configuration file

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

And add the following

[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=<user>
Group=<group>
Type=simple
ExecStart=/opt/navidrome/navidrome --configfile "/var/lib/navidrome/navidrome.toml"
WorkingDirectory=/var/lib/navidrome
TimeoutStopSec=20
KillMode=process
Restart=on-failure

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

ProtectSystem=full

In the [service] section, you have to replace the User and Group values with the corresponding ones.

Save the changes and close the editor.

Refresh the list of services.

sudo systemctl daemon-reload

Next, start the service

sudo systemctl start navidrome.service

And check the status of the service

sudo systemctl status navidrome.service
2.- Navidrome service status
2.- Navidrome service status

If all goes well, you will see a screen like this.

Log in to the Navidrome GUI

Now open a browser and go to http://domain:4533. You will see a screen like this where you will have to create the user administrator.

3.- Installing Navidrome on Debian 11
3.- Installing Navidrome on Debian 11

When you do this, you will see the main screen of the application.

4.- Navidrome on Debian 11
4.- Navidrome on Debian 11

Conclusion

Thanks to this post, you learned how to install your own spotify with Navidrome. It sounds interesting and as you can see, it is simple and can be used for educational or community projects.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

1 COMMENT

  1. there is a mistake in the path
    sudo vi /var/lib/navidrome/navidrome/navidrome.toml
    should be
    sudo vi /var/lib/navidrome/navidrome.toml

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook