0

Just built no gui, no wallet bitcoin on WSL Ubuntu Bionic, Bitcoin v0.17.1.

I want to experiment with bitcoin-cli.

I followed recommendation to run bitcoind -princonsole and it says: Using config file

/home/<myusername>/.bitcoin/bitcoin.conf

This file doesn't exist.

I followed some dense discussion on how should this behave to make dumb users happier on github, supposedly there were some merges, but frankly, I have no clue what was the final conclusion and what is or isn't in 0.17.1

Eventually, I understood that datadir must be specified first.

But that doesn't work for me.

~/bitcoin$ bitcoind -datadir /mnt/d/blockchain -txindex
Error: Specified data directory "" does not exist.

/mnt/d/blockchain definitely exists.

Thanks for any help.

Many thanks to Nate Eldredge for pointing out a dumb error of mine and hope someone can help parsing and shedding some light on this:

https://github.com/bitcoin/bitcoin/issues/10746

Blockchain download has started and now I am waiting for the end result.

  • Please mark Nate's answer as correct by clicking the checkmark instead of editing your answer – arubi Jan 21 at 18:17
2

The syntax should be

bitcoind -datadir=/mnt/d/blockchain -txindex

Note the = sign.

This will look for the bitcoin.conf file at /mnt/d/blockchain/bitcoin.conf and will store the blockchain, databases, wallet files, etc, all in /mnt/d/blockchain. With this option, Bitcoin Core shouldn't read or write anything in ~/.bitcoin at all.

  • Lol. Feel embarassed. That worked. – Tony Jan 20 at 23:18
1

On Ubuntu your bitcoin.conf file should be located at /home/username/.bitcoin/bitcoin.conf

If that file do not exist create it and fill with standard parameters like:

server=1
listen=1
daemon=1
rpcuser=youusername
rpcpassword=yourpassword
rpcallowip=your ip or the rpc commands sending machine
  • Maybe it should but it isn't: ~/.bitcoin$ ls banlist.dat blocks chainstate debug.log fee_estimates.dat mempool.dat peers.dat wallets – Tony Jan 20 at 23:15
  • Just type 'touch bitcoin.conf' and fill the file with the aforementioned parameters. – AG23 Jan 22 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.