Post
Topic
Board Bitcoin Technical Support
Re: Sparrow wallet suddenly not connecting to node
by
Mobber
on 28/10/2022, 20:24:45 UTC
I setup a full node a few weeks ago and successfully connected sparrow wallet from a different PC but on same network. It connected fine until yesterday and now sparrow won't connect. When I setup the node I followed the tutorial on bitcoin.org and did the port forwarding. The node I still receiving incoming connections fine. I followed the sparrow tutorial and all info is still correct.

The node is running on a PC with windows 10 and sparrow is on a pc with windows 11. I haven't changed anything but sparrow just won't connect now. Any suggestions?
Since you mention port forwarding, I assume you set up your node in a home network behind NAT. Such networks sometimes get their IP address reassigned by the ISP.
Can you check whether your external IP address has changed?

Otherwise, I generally recommend against port forwarding and for Tor tunneling instead. Sparrow has built-in Tor support, so you just need to install tor on the node machine and tunnel the Bitcoin port through it.

Something like this (change port number and hidden service name):
[5] Log back out into your sudo account, and open the Tor config file.
Code:
exit
sudo nano /etc/tor/torrc

[6] Add the following contents, preferably in the right section (somewhere where there's HiddenServiceDir stuff commented out).
Code:
HiddenServiceDir /var/lib/tor/electrs_hidden_service/
HiddenServiceVersion 3
HiddenServicePort 50001 127.0.0.1:50001

ExitPolicy reject *:* # no exits allowed

[7] Start up Tor and fetch your electrs Tor hostname. The hostname can then be entered in wallets like Wasabi and BlueWallet settings.
Code:
sudo systemctl enable tor.service
sudo service tor restart
sudo cat /var/lib/tor/electrs_hidden_service/hostname

If you followed this guide, you just port forwarded port 8333 though, which shouldn't give you remote access from Sparrow. That should require access to the 8332 RPC port, which you should never port forward to the internet. That's why I'm wondering that your setup ever worked in the first place.

I'd recommend to install electrs and tunnel it through Tor as described above, for better security.

Eventually I'd like to setup a private electrum server. Is that viable to run on a windows PC? And do you have any recommended guides to setup an electrum server? I also have no experience with tor so any recommendations for that? I'm assuming that's a straight forward verify and install?