diff --git a/ops/README.md b/ops/README.md index 09fedb9..88e86bd 100644 --- a/ops/README.md +++ b/ops/README.md @@ -7,7 +7,7 @@ web wallet needs: | Piece | Where | Notes | |---|---|---| -| nginx vhost | `/etc/nginx/sites-enabled/digibyte-x` — mirrored in [`nginx-digibyte-x.conf`](nginx-digibyte-x.conf) | SNI-selected on `digibyte.x`, self-signed cert pinned on-chain via the BNS `tls` record. Serves `/web/` (wallet), proxies `/p2p/*` → daemon and `/blockbook/*` → a public DGB Blockbook (Atomic Wallet's since 2026-10-11; NOWNodes before that, API key injected server-side from `/etc/dgb-core/nownodes.env` — switch with [`blockbook-upstream.sh`](blockbook-upstream.sh)), strict Content-Security-Policy on `/web/`. | +| vhost (Angie) | `/etc/angie/http.d/digibyte-x.conf` — served by **Angie** since 2026-09-16 (`systemctl reload angie`; `nginx.service` is inactive and `/etc/nginx/sites-enabled/digibyte-x` is a stale copy) — mirrored in [`nginx-digibyte-x.conf`](nginx-digibyte-x.conf) | SNI-selected on `digibyte.x`, self-signed cert pinned on-chain via the BNS `tls` record. Serves `/web/` (wallet), proxies `/p2p/*` → daemon and `/blockbook/*` → a public DGB Blockbook (Atomic Wallet's since 2026-10-11; NOWNodes before that, API key injected server-side from `/etc/dgb-core/nownodes.env` — switch with [`blockbook-upstream.sh`](blockbook-upstream.sh)), strict Content-Security-Policy on `/web/`. | | `dgb-daemon.service` | `/opt/dgb-wallet`, runs `packages/p2p/bin/dgb-daemon.ts` via tsx, binds `127.0.0.1:5174` | The wallet's only server-side component: header sync with reorg handling, BIP157/158 filter cache (packed 1000/file under `/var/lib/dgb-wallet/.dgb-wallet/p2p/packs/`), incremental balance scans remembered in `scans.json`, Dandelion++ broadcast with relay-echo verification. | | **No DigiByte Core, no Fulcrum** | — | Removed 2026-09-06. A full node with indexes needs ≥40 GB disk and ≥4 GB RAM; the VPS has neither, and the daemon does not use it. | diff --git a/ops/blockbook-upstream.ps1 b/ops/blockbook-upstream.ps1 index d9559e2..9d757c5 100644 --- a/ops/blockbook-upstream.ps1 +++ b/ops/blockbook-upstream.ps1 @@ -5,7 +5,7 @@ # ops/blockbook-upstream.ps1 nownodes # NOWNodes, key from /etc/dgb-core/nownodes.env on the VPS # # Pipes blockbook-upstream.remote.sh through `ssh silentmode`; the -# previous vhost is kept under /etc/nginx/sites-enabled-stale-baks/. +# previous vhost is kept under /etc/angie/stale-baks/. param([Parameter(Mandatory = $true)][ValidateSet('atomic', 'nownodes')][string]$Target) $ErrorActionPreference = 'Stop' switch ($Target) { diff --git a/ops/blockbook-upstream.remote.sh b/ops/blockbook-upstream.remote.sh index 49aa1d2..c608fdf 100644 --- a/ops/blockbook-upstream.remote.sh +++ b/ops/blockbook-upstream.remote.sh @@ -1,14 +1,16 @@ #!/usr/bin/env bash # Runs ON the VPS (piped through `ssh silentmode 'HOST=… KEYHDR=… bash -s'` -# by blockbook-upstream.sh / .ps1). Repoints the digibyte.x vhost's +# by blockbook-upstream.sh / .ps1). Repoints the digibyte.x vhost (served +# by Angie since 2026-09-16: /etc/angie/http.d/digibyte-x.conf — the copy +# under /etc/nginx/sites-enabled is stale, nginx.service is inactive). # /blockbook/ proxy at $HOST, with the NOWNodes api-key header when # KEYHDR=1, tests the config, reloads nginx and proves the route works. set -euo pipefail : "${HOST:?HOST (upstream hostname) is required}" KEYHDR="${KEYHDR:-0}" -F=/etc/nginx/sites-enabled/digibyte-x -mkdir -p /etc/nginx/sites-enabled-stale-baks -cp "$F" "/etc/nginx/sites-enabled-stale-baks/digibyte-x.bak.$(date +%s)" +F=/etc/angie/http.d/digibyte-x.conf +mkdir -p /etc/angie/stale-baks +cp "$F" "/etc/angie/stale-baks/digibyte-x.bak.$(date +%s)" KEY="" if [ "$KEYHDR" = 1 ]; then KEY="$(. /etc/dgb-core/nownodes.env; printf %s "$NOWNODES_API_KEY" | tr -d '\r\n ')" @@ -29,8 +31,8 @@ if key: open(p, 'w').write(s[:a] + blk + s[b:]) print('vhost now proxies /blockbook/ ->', host, '(api-key header)' if key else '(no key)') PY -nginx -t -systemctl reload nginx +angie -t +systemctl reload angie sleep 1 code=$(curl -sk -o /dev/null -w '%{http_code}' --resolve digibyte.x:443:127.0.0.1 'https://digibyte.x/blockbook/') echo "GET /blockbook/ via vhost -> HTTP $code" diff --git a/ops/blockbook-upstream.sh b/ops/blockbook-upstream.sh index 6ffd67e..415b32a 100644 --- a/ops/blockbook-upstream.sh +++ b/ops/blockbook-upstream.sh @@ -10,7 +10,7 @@ # # The work happens in blockbook-upstream.remote.sh, piped over # `ssh silentmode`; the previous vhost is kept under -# /etc/nginx/sites-enabled-stale-baks/. The repo mirror +# /etc/angie/stale-baks/. The repo mirror # ops/nginx-digibyte-x.conf documents the same two blocks. set -euo pipefail here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/ops/push.sh b/ops/push.sh index 56c5ea2..926a8f0 100644 --- a/ops/push.sh +++ b/ops/push.sh @@ -68,7 +68,7 @@ push_web() { live_csp="$(ssh "$HOST" "curl -sk -D - -o /dev/null --resolve $SNI_HOST:443:127.0.0.1 https://$SNI_HOST/web/ | tr -d '\\r' | grep -i '^content-security-policy' || true")" if [[ -n "$live_csp" && "$live_csp" != *"$want"* ]]; then echo "WARNING: live CSP does not contain the current inline-script hash ($want)." >&2 - echo " Update ops/nginx-digibyte-x.conf + /etc/nginx/sites-enabled/digibyte-x, or the wallet will not load." >&2 + echo " Update ops/nginx-digibyte-x.conf + /etc/angie/http.d/digibyte-x.conf (Angie serves 443), or the wallet will not load." >&2 else echo " CSP hash OK ($want)" fi