Remote Access (Gate L)
Gladious web binds to 0.0.0.0:3773 (WEB_HOST / next dev|start -H 0.0.0.0). The public URL for browsers and OAuth is NEXTAUTH_URL — currently HTTPS via Nginx Proxy Manager:
- Open:
https://gladious.kozehub.point2this.com - Upstream: NPM
Gladious.kozehub.point2this.com→http://10.0.0.8:3773 - Loopback (
localhost/127.0.0.1) redirects to that public origin
Discord OAuth always uses NEXTAUTH_URL for redirect_uri — do not register localhost in the Portal.
For who can sign in (owners vs one-server staff), see PANEL_ACCESS.md.
HTTPS (Nginx Proxy Manager) — required for Discord + Spotify
- In NPM → Proxy Hosts, confirm Gladious.kozehub.point2this.com forwards to
10.0.0.8:3773(HTTP). - SSL tab: request a Let’s Encrypt certificate for that hostname, enable Force SSL / HSTS (same pattern as
Panel.kozehub.point2this.com). - Root
.env:NEXTAUTH_URL=https://gladious.kozehub.point2this.com AUTH_TRUST_HOST=true WEB_HOST=0.0.0.0 WEB_PORT=3773 - Restart web after changing
.env. - Discord Developer Portal → OAuth2 → Redirects — add exactly (no trailing slash):
https://gladious.kozehub.point2this.com/api/auth/callback/discord
- Spotify Developer Dashboard → Redirect URIs — add exactly:
https://gladious.kozehub.point2this.com/api/spotify/callback
- The
/loginpage shows the exact Discordredirect_uriNextAuth will send.
Without a valid TLS cert on the Gladious proxy host, https://… will fail in the browser even if HTTP on port 80 works.
Same Wi‑Fi (LAN only, no hostname)
Direct LAN access still works for debugging (http://10.0.0.8:3773), but OAuth redirects always go to NEXTAUTH_URL. Prefer the HTTPS hostname for login.
If the site loads on this PC but not on a phone via LAN IP:
- Allow inbound TCP 3773 in Windows Firewall:
scripts\allow-web-firewall.cmd(orpnpm firewall:web). - If NordVPN / NordLynx is connected, enable “Allow local network access”.
Option A — Tailscale (private access off-LAN)
- Install Tailscale on the Gladious host and your client devices: https://tailscale.com/download
- Sign in to the same Tailnet on both.
- On the host, note the Tailscale IP (
100.x.y.z) viatailscale ip -4. - Only use Tailscale as the public origin if you are not using the HTTPS hostname — set
NEXTAUTH_URL=http://100.x.y.z:3773and add that Discord redirect. - Prefer keeping
NEXTAUTH_URL=https://gladious.kozehub.point2this.comwhen NPM + DNS already expose the panel.
Option B — Cloudflare Tunnel
- Create a tunnel in Cloudflare Zero Trust → Networks → Tunnels.
- Install
cloudflaredon the Gladious host. - Route a hostname to
http://127.0.0.1:3773(or keep NPM in front). - Set
NEXTAUTH_URL=https://<that-hostname>andAUTH_TRUST_HOST=true. - Add matching Discord / Spotify redirect URIs.
Hardening checklist
- Strong
NEXTAUTH_SECRET - OAuth client secret only in
.env - Owner list reviewed (
OWNER_DISCORD_IDS+/admin/owners) - Bot token never pasted into chat or committed
- Firewall denies public
5432/4001unless intentional - TLS enabled on the Gladious NPM proxy host
- PM2 or Windows service keeps processes up:
pnpm pm2:start
Local-only reminder
To lock the dashboard to this PC only, bind with WEB_HOST=127.0.0.1 and change the web scripts’ -H flag accordingly, then use console / RDP / physical access only. (You would still need a matching public NEXTAUTH_URL if OAuth must work.)