Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:navidrome [2024/04/17 10:43] – willy | services:navidrome [2024/09/02 12:30] (current) – [Reverse Proxy] willy | ||
---|---|---|---|
Line 2: | Line 2: | ||
[[https:// | [[https:// | ||
+ | |||
+ | This will be integrated with SSO using Authelia. | ||
===== Installation ===== | ===== Installation ===== | ||
Line 26: | Line 28: | ||
ND_LOGLEVEL: | ND_LOGLEVEL: | ||
ND_SESSIONTIMEOUT: | ND_SESSIONTIMEOUT: | ||
- | ND_BASEURL: "/navidrome" | + | ND_BASEURL: "" |
+ | ND_REVERSEPROXYWHITELIST: | ||
volumes: | volumes: | ||
- "/ | - "/ | ||
Line 32: | Line 35: | ||
</ | </ | ||
- | You need to adapt UID/GID, paths to music collection and port. Also, check the BASEURL. | + | 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 ===== | ===== Reverse Proxy ===== | ||
- | The following NGINX configuration will proxy your navidrome | + | I choose |
+ | |||
+ | 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; | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | auth_pam off; | + | |
- | | + | |
- | 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; | + | |
+ | include " | ||
+ | |||
+ | 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 ===== | ===== Autostart ===== | ||
- | If you are following | + | To start it, and set it up on boot, as usual follow |
- | < | + | < |
- | ln -s _servicer.sh 32-navidrome--podman.start | + | ln -s /etc/init.d/user-containers /etc/init.d/user-containers.navidrome |
- | ln -s _servicer.sh 32-navidrome--podman.stop | + | |
</ | </ | ||
+ | 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 | ||
+ | </ | ||