diff options
| author | bitflash-coin <bookofshamers@outlook.com> | 2026-08-04 06:34:32 -0700 |
|---|---|---|
| committer | bitflash-coin <bookofshamers@outlook.com> | 2026-08-04 06:34:32 -0700 |
| commit | 5ce650382352c1503f40abf08129ada69402af55 (patch) | |
| tree | 6a18198901f1e2c4933f1ac53c9365eec512bf63 /relay/README.md | |
| parent | f34113291da7e5e3dc7d2468d4f9c212c05c584b (diff) | |
public commit
Diffstat (limited to 'relay/README.md')
| -rw-r--r-- | relay/README.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/relay/README.md b/relay/README.md new file mode 100644 index 0000000..abf0f8d --- /dev/null +++ b/relay/README.md | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | # bitflashd — Bitflash rendezvous relay (the "meeting node") | ||
| 2 | |||
| 3 | This is the small always-on server that lets Bitflash nodes behind CGNAT reach | ||
| 4 | each other. Both sides connect **out** to this relay; it pairs them by their | ||
| 5 | `.btf` pubkey and forwards ciphertext. It holds **no keys** and reads nothing — | ||
| 6 | the two nodes are encrypted end-to-end (X25519 + ChaCha20-Poly1305) over it. | ||
| 7 | |||
| 8 | Run it on any machine with a public IP (a cheap VPS). It has **no dependencies** | ||
| 9 | beyond a C++ compiler. | ||
| 10 | |||
| 11 | ## Build (on the VPS, Linux) | ||
| 12 | |||
| 13 | ``` | ||
| 14 | sudo apt-get update && sudo apt-get install -y g++ # if needed | ||
| 15 | bash build.sh | ||
| 16 | ``` | ||
| 17 | |||
| 18 | ## Run | ||
| 19 | |||
| 20 | ``` | ||
| 21 | ./bitflashd 8434 | ||
| 22 | ``` | ||
| 23 | |||
| 24 | Open the port in the firewall (both the VPS provider's panel and the OS): | ||
| 25 | |||
| 26 | ``` | ||
| 27 | sudo ufw allow 8434/tcp # if ufw is enabled | ||
| 28 | ``` | ||
| 29 | |||
| 30 | ## Keep it running (systemd) | ||
| 31 | |||
| 32 | Create `/etc/systemd/system/bitflashd.service`: | ||
| 33 | |||
| 34 | ``` | ||
| 35 | [Unit] | ||
| 36 | Description=Bitflash rendezvous relay | ||
| 37 | After=network.target | ||
| 38 | |||
| 39 | [Service] | ||
| 40 | ExecStart=/root/bitflash/relay/bitflashd 8434 | ||
| 41 | Restart=always | ||
| 42 | User=root | ||
| 43 | |||
| 44 | [Install] | ||
| 45 | WantedBy=multi-user.target | ||
| 46 | ``` | ||
| 47 | |||
| 48 | Then: | ||
| 49 | |||
| 50 | ``` | ||
| 51 | sudo systemctl daemon-reload | ||
| 52 | sudo systemctl enable --now bitflashd | ||
| 53 | sudo systemctl status bitflashd | ||
| 54 | ``` | ||
| 55 | |||
| 56 | The relay's address for clients is then `YOUR_VPS_IP:8434` — that is what goes | ||
| 57 | into a node's descriptor as its `meeting_node`. | ||