Navidrome is an open source Music Server compatible with Subsonic/Airsonic. This article introduces how to deploy Navidrome on a server.

Navidrome offers several advantages for me:

  1. Compatible with all Subsonic/Madsonic/Airsonic client apps.
  2. Low resource usage.
  3. Docker images are provided.

Deployment

Installation

Install docker and docker compose if they haven't been installed yet.

curl -sSL https://get.docker.com/ | sh
systemctl enable --now docker

Create docker-compose.yml.

version: "3"
services:
  navidrome:
    image: deluan/navidrome:latest
    ports:
      - "127.0.0.1:4533:4533"
    restart: unless-stopped
    environment:
      ND_SCANSCHEDULE: 1m
      ND_LOGLEVEL: info
      ND_SESSIONTIMEOUT: 24h
      ND_BASEURL: ""
    volumes:
      - ./data:/data
      - ./music:/music:ro

Note that ./music:/music:ro specifies the location of music files. Since Navidrome does not support file uploads, alternative methods, such as scp or miniserve, are required to add songs to the server.

In my case, I use FileRun for managing my music files. I create a music folder within FileRun and upload songs there. All you need to do is configure the volume path of Navidrome to match the song storage path in FileRun. Here is an example:

#...
volumes:
      #...
      - /opt/filerun/filerun/user-files/music:/music:ro

This article details how to build a file sync and share application using FileRun.

Then up docker compose.

docker compose up -d

Access IP:4533 to check if Navidrome runs smoothly.

Nginx configuration

Below is a reference configuration for nginx. If you don't have a domain certificate yet, see here and here.

server {
    listen      443 ssl http2;
    server_name music.domain.com;

    ssl_certificate     /opt/ssl/server.crt;
    ssl_certificate_key /opt/ssl/server.key;
    ssl_protocols       TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_ciphers         ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers   on;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;

    location / {
        client_max_body_size    128m;
        proxy_pass          http://127.0.0.1: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;
    }
}

server {
    listen      80;
    server_name music.domain.com;
    return      301 https://$host$request_uri;
}

Reload new configuration.

nginx -s reload

Now, access the domain name to install FileRun.

An account creation is prompted when the first visit.

Because no songs have been added yet, the initial page will display "No Albums yet."

With Navidrome periodically checking for file updates, simply adding songs to the designated server folder will reflect updates after a short period of time.

Navidrome comes equipped with various features such as transcoding, multi-user capabilities. Detailed information about these features can be found in the official Document.

Client app

I prefer to use Navidrome through a web browser on a laptop and use a client app on a smartphone.

Ultrasonic and Substreamer can be used on the Android platform, and Substreamer and iSub can be used on the iOS platform to connect to the service. There is an example of using Substreamer on the iOS platform to connect the service.

The protocol needs to be changed to HTTPS, and then fill in your url, username, and password, as follows.

Then enjoy the music time anywhere and anytime ~🎵

Demo

There is a demo provided by the official. To login, use the following credentials:

  • User: demo
  • Password: demo

References

https://link.toolin.cc/TNO7T

https://link.toolin.cc/4lFYi

Outline