4

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.

4

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

  • 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 '13 at 14:54
  • That's correct. – Anonymous Oct 5 '13 at 4:22
  • ./bitcoind -datadir=/dir/location/here/ don't forget the = – Badr Bellaj Dec 6 '17 at 23:49
3

Probably, better to add new user.

Simply create new user:

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

How to run two instances with same wallet

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

cat .xcoin/xcoin.conf
---
rpcport=3776
port=3777
---

vi ./xcoin2/xcoin.conf
---
rpcport=3876
port=3877
addnode=127.0.0.1:3777
---

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

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.