2026-03-07 19:52:33 +00:00
|
|
|
worker_processes 1;
|
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
|
|
|
|
|
|
|
|
events {
|
|
|
|
|
worker_connections 768;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
http {
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
|
sendfile on;
|
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
|
|
2026-03-09 20:13:14 +00:00
|
|
|
# Allow large uploads globally (filebrowser, etc.)
|
|
|
|
|
client_max_body_size 0;
|
|
|
|
|
|
fix(demo): mock backend overhaul — real media, correct shapes, mempool.guide
- Serve committed demo/content (music/photos/documents) alongside demo/files
drop-ins, normalizing top-level folder names; Dockerfile now COPYs it. This
is why Cloud music failed: the real library sat in demo/content while the
loader only read the empty demo/files.
- Drop unbacked seeded Videos; runtime WAV/SVG fallback for any seeded media
without a real file so playback never hits 'no supported source'.
- monitoring.current/history/alerts/alert-rules/export rewritten to the exact
MetricSnapshot shapes Monitoring.vue expects (epoch-second timestamps,
containers with limits/block IO, rpc_latency_ms, ws_connections).
- streaming.list-services + configure-service (Networking Profits page was
erroring with Method not found).
- server.get-state snapshot so the 30s resync / reconnect path stops erroring.
- lnd-connect-info now returns cert/macaroon base64url + grpc/rest ports (the
lnd-ui shell only renders the wallet QR + details when they're present);
LND REST balance endpoints for the shell's new balance cards.
- Fix broken icon paths (lnd.svg → lnd.png and 15 others) against real assets.
- containers-scanned: true so app cards never sit on 'Checking…'.
- 8 new installed demo apps with placeholder dashboard UIs (btcpay-server,
grafana, nextcloud, jellyfin, vaultwarden, nostr-rs-relay, searxng,
uptime-kuma) via the previously unused demoAppShell.
- WS heartbeat 45s → 20s (+ping 25s) so idle-timeout proxies in front of the
public demo stop killing the socket (the 'always reconnecting' report).
- nginx demo proxy: mempool.space → mempool.guide (mempool.space blocks the
proxied embed) + WebSocket upgrade passthrough; txid hydration follows.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 03:39:01 +01:00
|
|
|
# WebSocket upgrade passthrough (mempool live data, etc.)
|
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
|
default upgrade;
|
|
|
|
|
'' close;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-07 19:52:33 +00:00
|
|
|
server {
|
|
|
|
|
listen 80 default_server;
|
|
|
|
|
server_name _;
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html index.htm;
|
|
|
|
|
|
|
|
|
|
# Proxy API requests to backend
|
|
|
|
|
location /rpc/v1 {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.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 WebSocket connections
|
|
|
|
|
location /ws {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
|
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_read_timeout 86400;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Proxy public assets from backend
|
|
|
|
|
location /public {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Proxy REST API requests
|
|
|
|
|
location /rest {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-22 13:55:50 -04:00
|
|
|
# ElectrumX UI status (polled by the electrs-ui shell)
|
|
|
|
|
location /electrs-status {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-22 14:19:38 -04:00
|
|
|
# LND UI endpoints (polled by the lnd-ui shell)
|
|
|
|
|
location /proxy/ {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
location /lnd-connect-info {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-07 22:50:05 +00:00
|
|
|
# Proxy FileBrowser API to mock backend (demo mode)
|
2026-07-15 09:44:56 +01:00
|
|
|
# ^~ on every /app/ prefix: the .css/.js/.img cache regex below must
|
|
|
|
|
# never swallow app-shell assets (they live on the backend, not in the
|
|
|
|
|
# web root — without ^~ nginx prefers the regex and 404s them).
|
|
|
|
|
location ^~ /app/filebrowser/ {
|
2026-03-09 18:12:28 +00:00
|
|
|
client_max_body_size 10G;
|
2026-03-07 22:50:05 +00:00
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
2026-03-09 18:12:28 +00:00
|
|
|
proxy_request_buffering off;
|
2026-03-07 22:50:05 +00:00
|
|
|
}
|
|
|
|
|
|
feat(demo): whole-origin IndeeHub proxy on :2101 with sign-in seeding
- nginx-demo.conf: new :2101 server block reverse-proxying the live
indee.tx1138.com site with no path prefix (fixes the old sub_filter
path-rewrite breakage), X-Frame-Options/CSP stripped, WS upgrade
passthrough, and a demo sign-in script injected into <head>
- indee-demo-signin.js: PUBLIC-DEMO-ONLY seeder that writes a labelled
throwaway "nsec" account (freshly generated keypair, not a secret) into
the :2101 origin's indeedhub-accounts/indeedhub-active-account
localStorage keys, idempotently, so IndeeHub boots signed in
- Dockerfile.web: copy the seeder into the demo web image, EXPOSE 2101
- docker-compose.demo.yml + demo-deploy/docker-compose.yml: publish 2101
(DEMO_INDEE_PORT override documented in the thin deploy stack)
Verified: nginx -t clean in nginx:alpine; live proxy smoke shows 200 with
no framing headers, injected tag, seed script served, assets proxied.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 12:23:18 -04:00
|
|
|
# IndeeHub is NOT proxied under a /app/indeedhub/ path prefix — the
|
|
|
|
|
# old sub_filter path-rewrite approach broke the SPA's runtime-built
|
|
|
|
|
# absolute-root asset URLs. Instead, a dedicated WHOLE-ORIGIN reverse
|
|
|
|
|
# proxy of https://indee.tx1138.com listens on :2101 (see the second
|
|
|
|
|
# server block below): the SPA sees itself at '/' so every asset and
|
|
|
|
|
# router path just works, framing headers are stripped, and a demo
|
|
|
|
|
# sign-in seed script is injected. useDemoIntro.demoAppUrl points the
|
|
|
|
|
# in-app iframe at http://<demo-host>:2101/.
|
2026-06-22 16:34:12 -04:00
|
|
|
|
2026-07-14 11:44:36 -04:00
|
|
|
# Mempool is NOT proxied upstream anymore — the mock backend serves a
|
|
|
|
|
# branded placeholder page for it (see DEMO_APP_PAGES in mock-backend.js),
|
|
|
|
|
# so /app/mempool/ falls through to the generic /app/ location below.
|
2026-06-22 16:34:12 -04:00
|
|
|
|
2026-06-22 12:39:33 -04:00
|
|
|
# Proxy every other app UI (/app/<id>/) to the mock backend, which serves
|
|
|
|
|
# the per-app mock UIs (bitcoin-ui, electrumx, lnd, fedimint) and the
|
|
|
|
|
# generic "Not available in the demo" notice for the rest.
|
2026-07-15 09:44:56 +01:00
|
|
|
location ^~ /app/ {
|
2026-06-22 12:39:33 -04:00
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-07 19:52:33 +00:00
|
|
|
# Serve AIUI SPA
|
|
|
|
|
location /aiui/ {
|
|
|
|
|
alias /usr/share/nginx/html/aiui/;
|
2026-04-02 01:28:11 +01:00
|
|
|
try_files $uri $uri/ =404;
|
2026-03-07 19:52:33 +00:00
|
|
|
|
|
|
|
|
location ~* /aiui/assets/ {
|
|
|
|
|
expires 1y;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-07 23:24:27 +00:00
|
|
|
# Proxy AIUI API requests (web-search, etc.) to backend
|
|
|
|
|
location /api/ {
|
2026-03-07 23:22:30 +00:00
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-08 01:48:23 +00:00
|
|
|
# Proxy Ollama (local AI) requests to backend
|
|
|
|
|
location /aiui/api/ollama/ {
|
|
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
proxy_buffering off;
|
|
|
|
|
proxy_cache off;
|
|
|
|
|
proxy_read_timeout 300s;
|
|
|
|
|
proxy_set_header Connection "";
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-07 23:07:38 +00:00
|
|
|
# Proxy Claude API requests to backend (which handles API key + streaming)
|
2026-03-07 19:52:33 +00:00
|
|
|
location /aiui/api/claude/ {
|
2026-03-07 23:07:38 +00:00
|
|
|
proxy_pass http://neode-backend:5959;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
2026-03-07 19:52:33 +00:00
|
|
|
proxy_buffering off;
|
|
|
|
|
proxy_cache off;
|
|
|
|
|
proxy_read_timeout 300s;
|
|
|
|
|
proxy_set_header Connection "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Serve static files
|
|
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-15 11:53:14 +01:00
|
|
|
# Cache static assets (media too — the intro video/audio are versioned
|
|
|
|
|
# with ?v=N query busters, so immutable is safe)
|
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|webp|mp4|webm|mp3|woff2?)$ {
|
2026-03-07 19:52:33 +00:00
|
|
|
expires 1y;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
}
|
|
|
|
|
}
|
feat(demo): whole-origin IndeeHub proxy on :2101 with sign-in seeding
- nginx-demo.conf: new :2101 server block reverse-proxying the live
indee.tx1138.com site with no path prefix (fixes the old sub_filter
path-rewrite breakage), X-Frame-Options/CSP stripped, WS upgrade
passthrough, and a demo sign-in script injected into <head>
- indee-demo-signin.js: PUBLIC-DEMO-ONLY seeder that writes a labelled
throwaway "nsec" account (freshly generated keypair, not a secret) into
the :2101 origin's indeedhub-accounts/indeedhub-active-account
localStorage keys, idempotently, so IndeeHub boots signed in
- Dockerfile.web: copy the seeder into the demo web image, EXPOSE 2101
- docker-compose.demo.yml + demo-deploy/docker-compose.yml: publish 2101
(DEMO_INDEE_PORT override documented in the thin deploy stack)
Verified: nginx -t clean in nginx:alpine; live proxy smoke shows 200 with
no framing headers, injected tag, seed script served, assets proxied.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 12:23:18 -04:00
|
|
|
|
|
|
|
|
# ── IndeeHub whole-origin demo proxy (:2101) ────────────────────────────
|
|
|
|
|
# Pure reverse proxy of the LIVE https://indee.tx1138.com site on its own
|
|
|
|
|
# port — no path prefix, no URL rewriting, so the SPA's absolute-root
|
|
|
|
|
# asset/router paths work untouched. The upstream's X-Frame-Options
|
|
|
|
|
# (SAMEORIGIN) and any CSP are stripped so the demo can embed it in the
|
|
|
|
|
# in-app iframe session, and a PUBLIC-DEMO-ONLY sign-in seed script is
|
|
|
|
|
# injected into the HTML <head> (it seeds a labelled throwaway demo Nostr
|
|
|
|
|
# account into the :2101 origin's isolated localStorage, so IndeeHub boots
|
|
|
|
|
# signed in). Upstream is pinned to a single fixed hostname — this cannot
|
|
|
|
|
# be used as an open proxy.
|
|
|
|
|
server {
|
|
|
|
|
listen 2101;
|
|
|
|
|
server_name _;
|
|
|
|
|
|
|
|
|
|
# Demo sign-in seeder, served same-origin to the proxied SPA.
|
|
|
|
|
location = /__demo/indee-demo-signin.js {
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
add_header Cache-Control "no-store";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
proxy_pass https://indee.tx1138.com;
|
|
|
|
|
proxy_ssl_server_name on;
|
|
|
|
|
proxy_ssl_name indee.tx1138.com;
|
|
|
|
|
proxy_set_header Host indee.tx1138.com;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
|
proxy_read_timeout 86400;
|
|
|
|
|
|
|
|
|
|
# Allow embedding in the demo's iframe session.
|
|
|
|
|
proxy_hide_header X-Frame-Options;
|
|
|
|
|
proxy_hide_header Content-Security-Policy;
|
|
|
|
|
|
|
|
|
|
# HTML injection: upstream must not compress or sub_filter no-ops.
|
|
|
|
|
# (sub_filter applies to text/html by default — exactly what we want.)
|
|
|
|
|
proxy_set_header Accept-Encoding "";
|
|
|
|
|
sub_filter_once on;
|
|
|
|
|
sub_filter '</head>' '<script src="/__demo/indee-demo-signin.js"></script></head>';
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-03-07 19:52:33 +00:00
|
|
|
}
|