mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-06-11 00:34:54 +02:00
2.0 KiB
2.0 KiB
Nginx Proxy Manager (NPM) Admin Setup
This guide covers setting up MeshCore Hub behind Nginx Proxy Manager with admin authentication.
Overview
Use two hostnames so the public map/site stays open while admin stays protected:
- Public host: no Access List (normal users).
- Admin host: Access List enabled (operators only).
Both proxy hosts should forward to the same web container:
| Setting | Value |
|---|---|
| Scheme | http |
| Forward Hostname/IP | Your MeshCore Hub host |
| Forward Port | 18080 (or your mapped web port) |
| Websockets Support | ON |
| Block Common Exploits | ON |
Important:
- Do not host this app under a subpath (for example
/meshcore); proxy it at/. WEB_ADMIN_ENABLEDmust betrue.
Advanced Configuration
In NPM, for the admin host, paste this in the Advanced field:
# Forward authenticated identity for MeshCore Hub admin checks
proxy_set_header Authorization $http_authorization;
proxy_set_header X-Forwarded-User $remote_user;
proxy_set_header X-Auth-Request-User $remote_user;
proxy_set_header X-Forwarded-Email "";
proxy_set_header X-Forwarded-Groups "";
Then attach your NPM Access List (Basic auth users) to that admin host.
Verifying Auth Forwarding
curl -s -u 'admin:password' "https://admin.example.com/config.js?t=$(date +%s)" \
| grep -o '"is_authenticated":[^,]*'
Expected:
"is_authenticated": true
If it still shows false, check:
- You are using the admin hostname, not the public hostname.
- The Access List is attached to that admin host.
- The
Advancedblock above is present exactly. WEB_ADMIN_ENABLED=trueis loaded in the running web container.