Post
Topic
Board Bitcoin Technical Support
Re: Solved:Need help setting up Bitcoin Core full node over Tor hidden service only.
by
bobd
on 05/12/2021, 22:43:27 UTC


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 an answer to your question by doing these steps.

Not sure if it will help in answering your question.

Code:
desktop:~$

desktop:~$ sudo nano ~/.bitcoin/bitcoin.conf
/ Deleted everything in ~/.bitcoin/bitcoin.conf

desktop:~$

desktop:~$ cat ~/.bitcoin/bitcoin.conf
/ Nothing is in the file , as expected

desktop:~$

desktop:~$ bitcoin-cli stop
 --- > Output:

error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/home/rasppi3bplus/.bitcoin/bitcoin.conf)

desktop:~$

desktop:~$ sudo nano ~/.bitcoin/bitcoin.conf
/ And added this 1 line only
datadir=/mnt/bitcoin

desktop:~$

desktop:~$ bitcoin-cli stop
/ No problem shutting down. No error messages this time.

..........Reboot the computer. Log 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
bitcoin-cli getblockchaininfo
bitcoin-cli getnetworkinfo
systemctl status tor
ls -lt /mnt/bitcoin
df -h
bitcoin-cli getpeerinfo | grep addr