This is an old revision of the document!
Navidrome
Navidrome is a streaming server that let's you stream your own music to your devices. It's pretty solid and compatible with OpenSubsonic API. You can browse and listen to your collection on the WEB GUI or with your favorite client app.
Installation
Navidrome is provided via docker and natively support rootless configuration. As usual, you need to create a dedicated user for the service:
useradd -d /data/daemons/navidrome -m -g media navidrome
Then put the following docker-compose.yml to /data/daemons/navidrome:
- docker-compose.yml
version: "3" services: navidrome: image: deluan/navidrome:latest user: 1046:1014 # should be owner of volumes 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: "/navidrome" volumes: - "/data/daemons/navidrome/data:/data" - "/data/Music/folder:/music:ro"
You need to adapt UID/GID, paths to music collection and port. Also, check the BASEURL.
Reverse Proxy
The following NGINX configuration will proxy your navidrome to https://mydomain.com/navidrome. For more details see The Reverse Proxy concept.
- navidrome.conf
location ^~ /navidrome { proxy_pass http://127.0.0.1:4533/navidrome; 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_set_header Remote-User $remote_user; proxy_buffering off; location /navidrome/rest { auth_pam off; proxy_pass http://127.0.0.1:4533/navidrome/rest; 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_set_header Remote-User $remote_user; proxy_buffering off; } }
Autostart
To start it, and set it up on boot, as usual follow my indications Using Containers on Gentoo, so link the user-containers init script:
ln -s /etc/init.d/user-containers /etc/init.d/user-containers.navidrome
and create the following config file:
- /etc/conf.d/user-containers.navidrome
USER=navidrome DESCRIPTION="The music server"
Add the service to the default runlevel and start it now:
rc-update add user-containers.navidrome default rc-service user-containers.navidrome start