Replace remote with local repo
This commit is contained in:
18
DEPLOY.md
18
DEPLOY.md
@@ -1,8 +1,8 @@
|
||||
# CyberLux — production on Tor (.onion)
|
||||
|
||||
This app is designed to run **behind nginx on loopback**, with **one Tor v3 hidden service per logical site** (hub, wiki, dedicated verticals, shadow `/w` node). Nginx listens on `127.0.0.1:8080–8122` (see `scripts/onion-nodes.json`); Tor forwards port 80 on each onion to the matching loopback port. **Next.js binds only `127.0.0.1:3000`** — never expose 3000 or the nginx loopback ports to the public internet.
|
||||
This app is designed to run **behind nginx on loopback**, with **one Tor v3 hidden service for the whole site**. Nginx listens on `127.0.0.1:8080` (see `scripts/onion-nodes.json`); Tor forwards port 80 on the onion to that loopback port. **Next.js binds only `127.0.0.1:3000`** — never expose 3000 or the nginx loopback port to the public internet.
|
||||
|
||||
Onion hostnames are **created locally** when Tor first starts; there are no fixed `.onion` URLs in the repo. Back up `/var/lib/tor/*/hs_ed25519_secret_key` (the install flow uses `scripts/backup-onion-keys.sh`).
|
||||
Onion hostnames are **created locally** when Tor first starts; there are no fixed `.onion` URLs in the repo. Back up `/var/lib/tor/cyberlux/hs_ed25519_secret_key` (the install flow uses `scripts/backup-onion-keys.sh`). A vanity prefix such as `cyberlux...onion` requires generating or importing a matching Tor v3 hidden-service key.
|
||||
|
||||
## One-time server setup (Debian/Ubuntu-style)
|
||||
|
||||
@@ -20,7 +20,7 @@ From the repo root (as the user that will own the process):
|
||||
./start.sh
|
||||
```
|
||||
|
||||
This will: regenerate Tor/nginx maps from `scripts/onion-nodes.json`, `npm install`, `npm run build`, install Tor+nginx configs (`sudo`), wait for hostname files, print every `.onion` URL, then **foreground** `next start` on `127.0.0.1:3000`.
|
||||
This will: regenerate Tor/nginx maps from `scripts/onion-nodes.json`, `npm install`, `npm run build`, install Tor+nginx configs (`sudo`), wait for the hostname file, print the `.onion` URL, then **foreground** `next start` on `127.0.0.1:3000`.
|
||||
|
||||
For a **one-shot prepare** (build + Tor/nginx, no Next.js — for systemd):
|
||||
|
||||
@@ -59,7 +59,7 @@ journalctl -u cyberlux.service -f
|
||||
npm run health:stack
|
||||
```
|
||||
|
||||
6. **List every `.onion` URL** and **check that each nginx loopback vhost answers** (needs Tor running; use `sudo` if hostname files are root-only):
|
||||
6. **List the `.onion` URL** and **check that the nginx loopback vhost answers** (needs Tor running; use `sudo` if hostname files are root-only):
|
||||
|
||||
```bash
|
||||
npm run onions:status
|
||||
@@ -102,6 +102,16 @@ Tor and nginx are working, but **nginx proxies to Next.js on `127.0.0.1:3000`**.
|
||||
|
||||
4. **If it still fails:** `journalctl -u cyberlux.service -n 80 --no-pager` — look for crash loops, missing `.next` (run `npm run build`), or wrong `WorkingDirectory` in the unit.
|
||||
|
||||
## Custom .onion prefix (branded / vanity name)
|
||||
|
||||
v3 hostnames are random unless you **mine** a key with [mkp224o](https://github.com/cathugger/mkp224o) and install it. That is a **separate, long-running CPU** step — not part of a normal deploy.
|
||||
|
||||
1. `bash scripts/mkp224o-build.sh` (or Docker; see `ONION-URLS.md`)
|
||||
2. `bash scripts/vanity-onion-mine.sh <base32_prefix>`
|
||||
3. `sudo bash scripts/install-vanity-onion-key.sh var/vanity-mine`
|
||||
|
||||
Full details: [`ONION-URLS.md`](ONION-URLS.md#vanity-onion-custom-prefix-eg-site-name-at-the-start).
|
||||
|
||||
## Verification
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user