What different options are there to start bitcoin on command line?

0

I had troubles with my client on a Raspberry because it was using the wrong configuration file and I could not find any entry in the configuration file that referred to the right location of the data directory, but I knew it was beeing used correctly in the past.

I was trying to use -printtoconsole to debug the problem but that did also not work.

Ben

Posted 2019-08-28T11:12:20.980

Reputation: 245

Answers

0

On command line bitcoin can be started in several ways

bitcoind starts a process with the current user. This way the home directory of this user will be searched for a config file and will be used as data directory as default.

service bitcoin start will use the startup script /etc/systemd/system/bitcoind.service. This might contain a link to a configuration file. In my case this config file did not contain of a data directory which I found troubling. But the solution is that it contains a user. This user's home directory is then automatically referred to.

So, in my case I was using the terminal as user pi and had to start the process as user bitcoin instead. This can be done by

sudo runuser -l bitcoin -c 'bitcoind'

Ben

Posted 2019-08-28T11:12:20.980

Reputation: 245