upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/tor.md
diff options
context:
space:
mode:
authorNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-13 11:54:35 -0300
committerNsable-sh <nsable-sh@noreply.git.bitflash.network>2026-08-13 11:54:35 -0300
commit53cc17d621f55b8904812fae5df90ef089bf5aaf (patch)
tree794d251d6bdf51f0d488469ff050ece1846cdbea /docs/tor.md
parentc009e7cc0c5093f4c4add741cb9d131d19956871 (diff)
net: add managed Tor hidden service bootstrap
Diffstat (limited to 'docs/tor.md')
-rw-r--r--docs/tor.md52
1 files changed, 46 insertions, 6 deletions
diff --git a/docs/tor.md b/docs/tor.md
index b4f88f9..1c0f589 100644
--- a/docs/tor.md
+++ b/docs/tor.md
@@ -36,6 +36,47 @@ If both `-tor` and `-socks` are present, Tor mode wins and the node prints a
36warning. That keeps a command line with `-tor` from silently becoming a custom 36warning. That keeps a command line with `-tor` from silently becoming a custom
37proxy route. 37proxy route.
38 38
39## Managed Tor mode
40
41`-managedtor` starts a Tor process for this node, writes a local `torrc`, creates
42a v3 hidden service for the normal Bitflash P2P listener, routes outbound
43discovery through that Tor instance, and signs the generated `.onion:8433`
44endpoint into the node's `.btf` descriptor.
45
46```bash
47bitflash -managedtor
48```
49
50Without a value, Bitflash looks for Tor in this order:
51
521. `tor/tor.exe` or `tor/tor` beside the Bitflash binary;
532. `tor.exe` or `tor` beside the Bitflash binary;
543. `tor.exe` or `tor` on `PATH`.
55
56To point at a specific Tor executable:
57
58```bash
59bitflash -managedtor=/opt/tor/bin/tor
60bitflash -managedtor=C:\Tor Browser\Browser\TorBrowser\Tor\tor.exe
61```
62
63Managed Tor writes its state under the Bitflash data directory:
64
65```text
66managed-tor/
67 torrc
68 data/
69 onion-service/
70```
71
72The private key for the onion address lives in `managed-tor/onion-service/`.
73Back up that directory if you want the same onion address after moving the node.
74Delete it only if you intentionally want a fresh onion endpoint.
75
76`-managedtor` takes precedence over `-tor` and `-socks`, because it must choose
77the local SOCKS port it starts. Diagnostics report the current managed Tor
78state, including the SOCKS port and onion endpoint once Tor has generated it.
79
39When Tor mode is enabled: 80When Tor mode is enabled:
40 81
41- outbound Nostr relay dials use Tor; 82- outbound Nostr relay dials use Tor;
@@ -100,10 +141,10 @@ bitflash -operator -tor \
100 -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434 141 -announcerelay=exampleexampleexampleexampleexampleexampleexampleexample.onion:8434
101``` 142```
102 143
103## Direct full-node hidden service 144## Manual direct full-node hidden service
104 145
105The legacy P2P listener still binds to port `8433`. You can expose it through 146Managed Tor is the preferred path for ordinary nodes. Operators can still expose
106Tor manually: 147the P2P listener through a separately managed Tor service:
107 148
108```text 149```text
109HiddenServiceDir /var/lib/tor/bitflash-node/ 150HiddenServiceDir /var/lib/tor/bitflash-node/
@@ -139,6 +180,5 @@ This means rendezvous relays stop being the only way to reach a node that has
139published a hidden service. They remain useful bootstrap/fallback infrastructure, 180published a hidden service. They remain useful bootstrap/fallback infrastructure,
140but an already-discovered onion-capable peer can be reached directly over Tor. 181but an already-discovered onion-capable peer can be reached directly over Tor.
141 182
142The node does not create or rotate Tor hidden services itself. Tor owns the 183Tor owns the private key under `HiddenServiceDir`; back it up if you want the
143private key under `HiddenServiceDir`; back it up if you want the onion name to 184onion name to stay stable.
144stay stable.