4

Is it possible to run another instance of bitcoin-qt dedicated to testnet/regtest? If so, how do i do this?

My question is similar to "Running two bitcoind instances for different nets," but I want to associate bitcoin-qt, not just bitcoind, with the testnet/regtest.

Geremia
  • 4,469
  • 4
  • 37
  • 75

1 Answers1

6

Depending on your OS you can start a 2nd bitcoin-qt acting on a non-mainnet with ./bitcoin-qt -testnet or ./bitcoin-qt -regtest (from a shell). You can also define a custom datadir and place a bitcoin.conf there (use bitcoin-qt -datadir=<path>).

On OSX/Mac you would need to use Terminal and run something like /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -regtest

morsecoder
  • 14,008
  • 2
  • 42
  • 92
Jonas Schnelli
  • 5,992
  • 1
  • 20
  • 33
  • Oh, I didn't know it was that easy! thank you! The `datadir` flag was just what I was looking for, too, although don't testnet/regtest have their own dedicated directories anyways? (At least regtest does, according to the [Bitcoin Developer Examples documentation](https://bitcoin.org/en/developer-examples#regtest-mode): "Regtest wallets and block chain state (chainstate) are saved in the regtest subdirectory of the Bitcoin Core configuration directory.") – Geremia Jun 11 '15 at 01:21
  • I just ran `bitcoin-qt -regtest`, and it launched with a green icon, distinguishing it from my already-running red one! Nice! – Geremia Jun 11 '15 at 01:30
  • 2
    Right. Testnet and regtest has their own subdirectories. But not for the bitcoin.conf. So if you'd like to set `-regtest` (or similar) within the config and only set `-datadir` while executing the binary, this would require different data directories (which is always a good idea if you run multiple nodes). – Jonas Schnelli Jun 11 '15 at 05:16