<p>Yes, run <code>bitcoind</code> instead of <code>bitcoin</code>.</p>

<p>If bitcoind isn't working, but bitcoin-qt is working, then do this instead:</p>

<pre><code>bitcoin-qt -server -datadir=1
bitcoin-qt -server -datadir=2
</code></pre>

<p>This will only work if you run the commands from inside the <code>testnet-box</code> folder.  Alternatively specify full path names to the <code>1</code> and <code>2</code> folders: <code>datadir=/home/chris/testnet-box/1</code> etc.</p>

<p>You need to download the <a href="http://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/testnet-box.zip/download" rel="nofollow">testnet-box.zip</a> file and extract it.  That will make you the two folders <code>1</code> and <code>2</code>.  Both folders have testnet blockchain files, a wallet, and a <code>bitcoin.conf</code>.</p>

<p>Folder 1's <code>bitcoin.conf</code> says:</p>

<pre><code>rpcpassword=123   # Set this yourself.
noirc=1
testnet=1
</code></pre>

<p>so it will run a testnet instance, not connect to IRC, and set the password to '123' for RPC connections.</p>

<p>Folder 2's <code>bitcoin.conf</code> says:</p>

<pre><code>rpcpassword=123   # Set this yourself.
noirc=1
testnet=1
rpcport=19332
nolisten=1
connect=127.0.0.1:18333
</code></pre>

<p>which is the same as the other except that it listens for RPC connections on a different port, doesn't listen for incoming P2P connections at all, and only connects to the other instance.</p>

<p>There shouldn't be a port conflict.  The first will be listening on port 8332 for RPC connections and port 18333 for P2P connections.  The second will be listening on port 19332 for RPC connections, and not listening for P2P connections at all.</p>

<p>Note: if you're running the 0.6.0 release candidate, the <code>nolisten=1</code> in node 2's bitcoin.conf won't work.  You'll need to change it to <code>listen=0</code> due to <a href="https://github.com/bitcoin/bitcoin/issues/846" rel="nofollow">a bug</a> I found and reported while researching this answer.</p>

CC BY-SA 3.0
2012-02-17T03:36:02.787Z
this is awesome, thanks for the response!  btw, I think I spoke too soon on the `sudo port install bitcoin` it seemed to fail, output here https://gist.github.com/debb28925f72f99b3f1f  Is there a similar way to accomplish this with Bitcoin-Qt?
Brian Armstrong
CC BY-SA 3.0
2012-02-17T04:28:33.450Z
I updated my answer with bitcoin-qt commands, and also mentioned that you need to be in the folder which *contains* the '1' and '2' folders.  Note that I've never used OS/X, and am just assuming that things work the same there as on Linux.
Chris Moore
CC BY-SA 3.0
2012-02-17T06:54:02.187Z
Ok great - yep I think this would work.  I actually tried it by downloading a previous (0.3.24) version of bitcoin for mac which had the bitcoin command, and it worked great.  From Gavin's post her it sounds like the command line args might be slightly different for Bitcoin-QT but I will give this a try tomorrow.  Either way thanks for the help I really appreciate it!
Brian Armstrong
CC BY-SA 3.0
2012-02-16T09:35:46.190Z
2012-02-17T04:27:32.220Z
2012-02-17T04:27:32.220Z
Chris Moore
<p>I'm trying to setup testnet-in-a-box and I'm a little unclear on how you get the command line version working for mac as described here:</p>

<p><a href="http://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/" rel="nofollow">http://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/</a></p>

<p>I installed macports and ran <code>sudo port install bitcoin</code> so I have a bitcoind executable now.</p>

<p>Instead of</p>

<pre><code>bitcoin -datadir=1 -daemon
bitcoin -datadir=2 -daemon
</code></pre>

<p>Do I just use?</p>

<pre><code>bitcoind -datadir=1
bitcoind -datadir=2
</code></pre>

<p>Also, since there are two nodes do they have to run on different ports?  Thanks</p>

<mac>
How to setup testnet-in-a-box on Mac OSX?
Brian Armstrong
# How to setup testnet-in-a-box on Mac OSX?

(Asked by: username_0 on 2012-02-16)

I'm trying to setup testnet-in-a-box and I'm a little unclear on how you get the command line version working for mac as described here:

<http://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/>

I installed macports and ran `sudo port install bitcoin` so I have a bitcoind executable now.

Instead of

```
bitcoin -datadir=1 -daemon
bitcoin -datadir=2 -daemon

```

Do I just use?

```
bitcoind -datadir=1
bitcoind -datadir=2

```

Also, since there are two nodes do they have to run on different ports? Thanks

**Tags:** mac


---

## 1 answers

### Answer by username_1 on 2012-02-16. Score: 2 | Accepted answer

Yes, run `bitcoind` instead of `bitcoin`.

If bitcoind isn't working, but bitcoin-qt is working, then do this instead:

```
bitcoin-qt -server -datadir=1
bitcoin-qt -server -datadir=2

```

This will only work if you run the commands from inside the `testnet-box` folder. Alternatively specify full path names to the `1` and `2` folders: `datadir=/home/username_1/testnet-box/1` etc.

You need to download the [testnet-box.zip](http://sourceforge.net/projects/bitcoin/files/Bitcoin/testnet-in-a-box/testnet-box.zip/download) file and extract it. That will make you the two folders `1` and `2`. Both folders have testnet blockchain files, a wallet, and a `bitcoin.conf`.

Folder 1's `bitcoin.conf` says:

```
rpcpassword=123   # Set this yourself.
noirc=1
testnet=1

```

so it will run a testnet instance, not connect to IRC, and set the password to '123' for RPC connections.

Folder 2's `bitcoin.conf` says:

```
rpcpassword=123   # Set this yourself.
noirc=1
testnet=1
rpcport=19332
nolisten=1
connect=127.0.0.1:18333

```

which is the same as the other except that it listens for RPC connections on a different port, doesn't listen for incoming P2P connections at all, and only connects to the other instance.

There shouldn't be a port conflict. The first will be listening on port 8332 for RPC connections and port 18333 for P2P connections. The second will be listening on port 19332 for RPC connections, and not listening for P2P connections at all.

Note: if you're running the 0.6.0 release candidate, the `nolisten=1` in node 2's bitcoin.conf won't work. You'll need to change it to `listen=0` due to [a bug](https://github.com/bitcoin/bitcoin/issues/846) I found and reported while researching this answer.

> **Comments:**
> **username_0**: this is awesome, thanks for the response!  btw, I think I spoke too soon on the `sudo port install bitcoin` it seemed to fail, output here https://gist.github.com/debb28925f72f99b3f1f  Is there a similar way to accomplish this with Bitcoin-Qt?  
> **username_1**: I updated my answer with bitcoin-qt commands, and also mentioned that you need to be in the folder which *contains* the '1' and '2' folders.  Note that I've never used OS/X, and am just assuming that things work the same there as on Linux.  
> **username_0**: Ok great - yep I think this would work.  I actually tried it by downloading a previous (0.3.24) version of bitcoin for mac which had the bitcoin command, and it worked great.  From Gavin's post her it sounds like the command line args might be slightly different for Bitcoin-QT but I will give this a try tomorrow.  Either way thanks for the help I really appreciate it!  

---

