Title: Solved:Need help setting up Bitcoin Core full node over Tor hidden service only. Post by: bobd on December 04, 2021, 11:59:08 AM Hello helpful souls,
Fetching getnetworkinfo should result in IPv4 and IPv6 flags set to false and Tor to `true`. This will ensure that I am operating my node privately. But this is not the case for me. Problem: Need to fix IPv4 and IPv6 flags to set to false. This is what I should get , but am not getting ( see below for more): Code: "name": "ipv4", I am trying to run a full node with Bitcoin Core over Tor (solely) in Ubuntu (no bitcoin-qt) but the steps I am following are from many sources and I feel like I have been missing steps in between, not to mention that my technical skills are fairly basic. Here's where I'm at (Ubuntu 20.04 LTS ; bitcoind ; no bitcoin-qt). I use a static IP address from my ISP. I use an external SATA drive mounted at /mnt/bitcoin to store Bitcoin full node data. .......... desktop:~$ bitcoin-cli getnetworkinfo --- > Output extracts: Code: { ..........This is what is in my ~/.bitcoin/bitcoin.conf Code: assumevalid=0 ..........Running ubuntu and this is my "/etc/tor/torrc" Code: SOCKSPort 9050 ..........This is my "/usr/share/tor/tor-service-defaults-torrc" Code: DataDirectory /var/lib/tor ..........These seem OK to me. desktop:~$ cat /mnt/bitcoin/debug.log --- > Output extracts: Code: 2021-12-02T15:01:11Z Bitcoin Core version v22.0.0 (release build) ..........When I ran this , I get this. May be because my debug.log is at /mnt/bitcoin/debug.log (see above): desktop:~$ tail -f ~/.bitcoin/debug.log Code: 2021-11-14T21:35:25Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements ..........The node seems fully synced desktop:~$ bitcoin-cli getblockchaininfo Code: { Thank you very much. ..........References consulted include , but not limited to: https://www.youtube.com/watch?v=n2IUYL7hCOI https://jlopp.github.io/bitcoin-core-config-generator/ https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service https://stopanddecrypt.medium.com/running-bitcoin-lightning-nodes-over-the-tor-network-2021-edition-489180297d5 https://www.linuxuprising.com/2018/10/how-to-install-and-use-tor-as-proxy-in.html https://ubuntuhandbook.org/index.php/2021/01/install-tor-tor-browser-ubuntu-20-10-20-04/ https://8bitcoin.medium.com/how-to-run-a-bitcoin-full-node-over-tor-on-an-ubuntu-linux-virtual-machine-bdd7e9415a70 https://bitsquabi.medium.com/setting-up-a-tor-hidden-service-knowledge-base-322dca4ce4c0 https://ishaana-misra.medium.com/using-raspberry-pi-to-run-a-full-bitcoin-node-a30c6339b06e https://gist.github.com/nvk/c9f4fdcaa40cf639d157ef2ac45e28a4 https://bitcoin.org/en/full-node#network-configuration https://old.reddit.com/r/Bitcoin/comments/cndynu/help_setting_up_bitcoin_core_node_with_tor_hidden/ https://blog.lopp.net/tor-only-bitcoin-lightning-guide/ Title: Re: Need help setting up Bitcoin Core full node over Tor hidden service only. Post by: vv181 on December 04, 2021, 03:05:00 PM I can't see what is wrong with your configurations. But since your bitcoin.conf is on your home folder, i would try to copy the bitcoin.conf to /mnt/bitcoin/bitcoin.conf, and then run
Code: bitcoind -conf=/mnt/bitcoin/bitcoin.conf Title: Re: Need help setting up Bitcoin Core full node over Tor hidden service only. Post by: AdolfinWolf on December 04, 2021, 04:44:59 PM I don't fully understand the issue, from the looks of your debug.log your RPC can't bind to the port specified in your bitcoin.conf (which is also the default port, so the command is redundant?), though it seems that this has not interfered with the syncing of your wallet and thus does not relate to your networking issues?
It's been a while since i prodded around and I currently don't have my node synced to try and replicate this getnetworkinfo output The only thing I can think of is that the Code: -bind 127.0.0.1 Code: listen=1 Or that your conf file is indeed not loaded at all. Reduce the number of parameters to just Code: -onlynet=onion -bind=127.0.0.1 -listen=1 -proxy=127.0.0.1:9050 Title: Re: Need help setting up Bitcoin Core full node over Tor hidden service only. Post by: bobd on December 05, 2021, 12:54:07 PM I can't see what is wrong with your configurations. But since your bitcoin.conf is on your home folder, i would try to copy the bitcoin.conf to /mnt/bitcoin/bitcoin.conf, and then run Code: bitcoind -conf=/mnt/bitcoin/bitcoin.conf vv181, Thank you very much for the suggestion. It works. I ran this command and it is a success in getting IPv4 and IPv6 flags set to false: Code: bitcoind -daemon -conf=/mnt/bitcoin/bitcoin.conf AdolfinWolf, Your suggestion seems good to use for future problems. I shall remember it. Thank you very much. For those who are new to this. Check out the references I listed in my first post to get started. If I can do it , you can do it. Title: Re: Solved:Need help setting up Bitcoin Core full node over Tor hidden service only. Post by: vv181 on December 05, 2021, 02:03:25 PM Grats, you made it work. ;)
Question: I wonder how actually Bitcoin Core -datadir/bitcoin.conf handling works, does in OP case that the app read the bitcoin.conf from the home folder and then read the datadir config, thus the app read the bitcoin.conf(which I assume is none since the Tor configs aren't loaded properly) on the specified datadir directory? Or it should specifically rely on where was the bitcoin.conf was first set(e.g., in OP case, on the home directory)? Title: Re: Solved:Need help setting up Bitcoin Core full node over Tor hidden service only. Post by: bobd on December 05, 2021, 10:43:27 PM Question: I wonder how actually Bitcoin Core -datadir/bitcoin.conf handling works, does in OP case that the app read the bitcoin.conf from the home folder and then read the datadir config, thus the app read the bitcoin.conf(which I assume is none since the Tor configs aren't loaded properly) on the specified datadir directory? Or it should specifically rely on where was the bitcoin.conf was first set(e.g., in OP case, on the home directory)? vv181, Great question. I tried to figure out an answer to your question by doing these steps. Not sure if it will help in answering your question. Code: desktop:~$ ..........Reboot the computer. Logged back in. No problem getting Bitcoin Core full node as well as Tor running , both automatically. I confirmed this by running the following commands: Code: bitcoin-cli getconnectioncount |