I want to run two instances of bitcoind on my machine.

I know my bitcoin.conf file is in ./bitcoin/bitcoin.conf, and I know (thanks to this thread) that I need to change my .conf file to point to different data dirs and RPC ports, etc.

However there is only one .conf file.

How do I go about pointing my second bitcoind instance to a new bitcoin.conf file? I copied the directory with the compiled code to a new directory, I am making the assumption that compiled code can be copied into another directory and it will work without problems.

3 Answers 3


Change the -datadir flag to a new absolute location. Each instance will follow the bitcoind.conf in their respective directory.

  • 1
    There is little to no documentation on this topic, so I guess I'll just ask here: I specify a datadir flag by typing ./bitcoind -datadir /dir/location/here/, is that correct?
    – bvpx
    Oct 4, 2013 at 14:54
  • That's correct.
    – Anonymous
    Oct 5, 2013 at 4:22
  • ./bitcoind -datadir=/dir/location/here/ don't forget the = Dec 6, 2017 at 23:49

Probably, better to add new user.

Simply create new user:

# adduser bitcoin1
# adduser bitcoin2
# su -l bitcoin1 -c 'bitcoind'
# su -l bitcoin2 -c 'bitcoind'

How to run two instances with same wallet

sudo su -
./xcoind stop
cp -r .xcoin xcoin2

cat .xcoin/xcoin.conf

vi ./xcoin2/xcoin.conf

./xcoind &
./xcoind -datadir=/root/xcoin2 &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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