Configure a Tor Hidden Service for Electrs
Tor needs to be active on the RaspiBlitz to use this method.
No port forwarding or dynamicDNS required.
Activate the Hidden Service in the RaspiBlitz terminal
-
Open the Tor configuration file:
$ sudo nano /etc/tor/torrc
-
Insert the lines:
# Hidden Service v3 for the Electrum desktop HiddenServiceDir /mnt/hdd/tor/electrs HiddenServiceVersion 3 HiddenServicePort 50002 127.0.0.1:50002
-
Restart Tor:
$ sudo systemctl restart tor
-
Take note of the Tor address:
$ sudo cat /mnt/hdd/tor/electrs/hostname
-
Start electrum with the Tor Browser open (proxy on port 9150):
$ electrum --oneserver --server Tor_address.onion:50002:s --proxy socks5:127.0.0.1:9150
-
With Tor installed and running (proxy on port 9050):
$ electrum --oneserver --server Tor_address.onion:50002:s --proxy socks5:127.0.0.1:9050
https://electrum.readthedocs.io/en/latest/tor.html#windows
Check for the blue dot when finished:
- Open Orbot
- Add Electrum to the Tor-Enabled Apps
- Start Electrum from Orbot
- In Electrum tap the dots in the right upper corner and select
Network
- Switch
One-server mode:
ON
- In the
Server:
settings:- Fill the
Host:
with the .onion address - Set the
Port:
to50002
and pressOK
- Fill the
- In the
Proxy:
settings set:Proxy mode
socks5
Host
127.0.0.1
Port
9050
and pressOK
- Now should see the
Status; 1 connections.
on the top
Note: if the Android Electrum wallet does not connect it worth trying to switch to a HiddenServiceVersion 2
https://github.com/romanz/electrs/blob/master/doc/usage.md#tor-hidden-service