<p>For any of <code>addnode</code>, <code>connect</code>, <code>port</code>, <code>bind</code>, <code>rpcport</code>, <code>rpcbind</code>, and <code>wallet</code> you should move them into the <code>[test]</code> and/or <code>[main]</code> sections of your <code>bitcoin.conf</code>. You can also move any other setting that you want only applied to mainnet or testnet into the appropriate section.</p>

<p>Example:</p>

<pre><code>server=1
daemon=1

[main]
prune=1000

[test]
rpcport=55555
</code></pre>

CC BY-SA 4.0
2018-09-27T17:16:39.213Z
2018-09-27T17:16:39.213Z
Chris Moore
<p>Was there a recent change where it is no longer possible to specify rpcport?</p>

<p>I noticed these two warnings:
Warning: Config setting for -addnode only applied on test network when in [test] section.
Warning: Config setting for -rpcport only applied on test network when in [test] section.</p>

<p>After trying adding a [test] section I got very mixed results as some times it disregarded all options and in general rpcport was still not set.</p>

<p>I could not find any documentation on how to do this.</p>

CC BY-SA 4.0
2018-07-26T16:25:52.023Z
What software are you running exactly?
JBaczuk
CC BY-SA 4.0
2018-07-27T08:13:37.677Z
I am building the bitcoin daemon from source.
Nikos Kostoulas
CC BY-SA 4.0
2018-07-30T16:58:04.400Z
Can you post your bitcoin.conf file? Also, please read https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes-pr12823.md
Ava Chow
<bitcoin-core><bitcoind><network><testnet>
Can't specify rpcport for testnet
Nikos Kostoulas
# Can't specify rpcport for testnet

(Asked by: username_0 on 2018-07-26)

Was there a recent change where it is no longer possible to specify rpcport?

I noticed these two warnings:
Warning: Config setting for -addnode only applied on test network when in [test] section.
Warning: Config setting for -rpcport only applied on test network when in [test] section.

After trying adding a [test] section I got very mixed results as some times it disregarded all options and in general rpcport was still not set.

I could not find any documentation on how to do this.

**Tags:** bitcoin-core, bitcoind, network, testnet

> **Comments:**
> **username_1**: What software are you running exactly?  
> **username_0**: I am building the bitcoin daemon from source.  
> **username_2**: Can you post your bitcoin.conf file? Also, please read https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes-pr12823.md  

---

## 1 answers

### Answer by username_3 on 2018-09-27. Score: 5

For any of `addnode`, `connect`, `port`, `bind`, `rpcport`, `rpcbind`, and `wallet` you should move them into the `[test]` and/or `[main]` sections of your `bitcoin.conf`. You can also move any other setting that you want only applied to mainnet or testnet into the appropriate section.

Example:

```
server=1
daemon=1

[main]
prune=1000

[test]
rpcport=55555

```


---

