Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:navidrome [2024/04/16 12:24] – willy | services:navidrome [2025/10/14 08:47] (current) – [Navidrome] willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Navidrome ====== | ====== Navidrome ====== | ||
| + | [[https:// | ||
| - | <code bash> | + | This will be integrated with SSO using Authelia. |
| - | useradd -d / | + | |
| + | For automatic music scan, to create dynamic and automatic playlists, check out [[services: | ||
| + | ===== Installation ===== | ||
| + | |||
| + | Navidrome is provided via docker and natively support rootless configuration. As usual, you need to create a dedicated user for the service: | ||
| + | |||
| + | <code bash> | ||
| + | useradd -d / | ||
| </ | </ | ||
| - | docker-compose.yml: | + | Then put the following **docker-compose.yml** to **/ |
| <file - docker-compose.yml> | <file - docker-compose.yml> | ||
| version: " | version: " | ||
| Line 23: | Line 30: | ||
| ND_LOGLEVEL: | ND_LOGLEVEL: | ||
| ND_SESSIONTIMEOUT: | ND_SESSIONTIMEOUT: | ||
| - | ND_BASEURL: "/navidrome" | + | ND_BASEURL: "" |
| + | ND_REVERSEPROXYWHITELIST: | ||
| volumes: | volumes: | ||
| - "/ | - "/ | ||
| - "/ | - "/ | ||
| </ | </ | ||
| + | |||
| + | You need to adapt UID/GID, paths to music collection and port. | ||
| + | ND_REVERSEPROXYWHITELIST must list the subnet associated to your NGINX reverse proxy as seen from the Navidrome container. The provided IP range should be enough for a default Podman installation. | ||
| + | |||
| + | |||
| + | ===== Reverse Proxy ===== | ||
| + | |||
| + | I choose to install Navidrome on it's own subdomain **https:// | ||
| + | |||
| + | This example also include the Authelia integration. | ||
| <file - navidrome.conf> | <file - navidrome.conf> | ||
| - | location ^~ / | + | server |
| - | | + | |
| - | 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; | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| + | access_log / | ||
| + | error_log / | ||
| - | | + | |
| - | auth_pam off; | + | |
| - | proxy_pass http://127.0.0.1: | + | |
| - | 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 ^~ / { | ||
| + | |||
| + | include " | ||
| + | include " | ||
| + | |||
| + | proxy_pass http:// | ||
| + | proxy_set_header X-Forwarded-Protocol $scheme; | ||
| + | proxy_set_header Remote-User $remote_user; | ||
| + | proxy_buffering off; | ||
| } | } | ||
| + | location /rest { | ||
| + | proxy_pass http:// | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | proxy_set_header X-Forwarded-Protocol $scheme; | ||
| + | | ||
| + | proxy_set_header Remote-User $remote_user; | ||
| + | proxy_buffering off; | ||
| + | } | ||
| + | |||
| + | client_max_body_size 100M; | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | This will automatically login your users using the SSO provided by [[services: | ||
| + | |||
| + | Please note that the **/rest** location is __not__ protected by Authelia, as this would __not__ work with Subsonic apps. Authentication, | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== Autostart ===== | ||
| + | |||
| + | To start it, and set it up on boot, as usual follow my indications [[gentoo: | ||
| + | < | ||
| + | ln -s / | ||
| + | </ | ||
| + | |||
| + | and create the following config file: | ||
| + | <file - / | ||
| + | USER=navidrome | ||
| + | DESCRIPTION=" | ||
| + | </ | ||
| + | |||
| + | Add the service to the default runlevel and start it now: | ||
| + | <code bash> | ||
| + | rc-update add user-containers.navidrome default | ||
| + | rc-service user-containers.navidrome start | ||
| + | </ | ||
| + | |||
| + | ===== External Integrations ===== | ||
| + | |||
| + | See [[https:// | ||
| + | |||
| + | ==== LastFM ==== | ||
| + | |||
| + | Navidrome can use Last.fm to retrieve artists biographies, | ||
| + | < | ||
| + | ND_LASTFM_ENABLED: | ||
| + | ND_LASTFM_APIKEY: | ||
| + | ND_LASTFM_SECRET: | ||
| + | ND_LASTFM_LANGUAGE: | ||
| + | </ | ||
| + | |||
| + | to fill the key& | ||
| + | |||
| + | ==== Spotify ==== | ||
| + | |||
| + | Artist images can be retrieved from Spotify. You’ll need to set the config options: | ||
| + | < | ||
| + | ND_SPOTIFY_ID: | ||
| + | ND_SPOTIFY_SECRET: | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | |||