<p>Here's how you fix the <code>rpcbind</code> issue with the latest change in version 0.18.0.</p>

<p>Before 0.18,  if you put <code>rpcallowip=0.0.0.0/0</code>, the value of <code>rpcbind</code> didn't need to be set as it defaulted to all interfaces.  </p>

<p>Now that is no longer the case.  Here's my setup, for running bitcoind in a container through Docker compose:</p>

<pre><code>rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
# local DNS name (container name used in my Docker Compose file)
rpcbind=bitcoind
</code></pre>

<p>The first <code>rpcbind</code> is so I can make RPC calls from inside the container.  The second is so other containers can reach the <code>bitcoind</code> container.</p>

<p>I think this does what you want:</p>

<ol>
<li>I can RPC from inside the <code>bitcoind</code> container</li>
<li>I can RPC from another container on the same network (as specified in the compose file) to the <code>bitcoind</code> container</li>
<li>I can RPC from my localhost outside the container.</li>
</ol>

<p>For the last, I exposed port 8332 to my localhost in the compose file and I can curl to the container:</p>



<pre><code>$ curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }'  -H 'content-type: text/plain;' 127.0.0.1:8332/
Enter host password for user 'user':
{"result":"0000000000000000000ece9381a7e0a4020353f4adde7b560a6b2840d5d44cfa","error":null,"id":"curltest"}
</code></pre>

<p>The full details of my container setup are <a href="https://github.com/chanhosuh/docker-bitcoin" rel="nofollow noreferrer">here</a>, in case there's something I missed in writing up my answer.</p>

CC BY-SA 4.0
2022-10-28T19:26:09.160Z
Where to write all this?
Dims
CC BY-SA 4.0
2019-06-15T19:43:19.697Z
2019-06-15T19:43:19.697Z
Chan-Ho Suh
<p>If you take a look of the <a href="https://bitcoin.org/en/release/v0.18.0#configuration-option-changes" rel="nofollow noreferrer">release note</a>, you will find that:</p>

<blockquote>
  <p>The rpcallowip option can no longer be used to automatically listen on all network interfaces. Instead, the rpcbind parameter must be used to specify the IP addresses to listen on. Listening for RPC commands over a public network connection is insecure and should be disabled, so a warning is now printed if a user selects such a configuration. If you need to expose RPC in order to use a tool like Docker, ensure you only bind RPC to your localhost, e.g. docker run [...] -p 127.0.0.1:8332:8332 (this is an extra :8332 over the normal Docker port specification).</p>
</blockquote>

<p>You said in comment</p>

<blockquote>
  <p>because I need to control my node remotely</p>
</blockquote>

<p>I'm afraid for any version >= 18 this would not be doable but rightfully given rpc connection are no encrypted which mean plain-text login/password that's why it is not recommended/possible anymore <a href="https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon" rel="nofollow noreferrer">see</a>. <strong>Using one of both interface remotely RPC or REST looks like not recommended</strong> so you could still do it but has to know it is insecure. </p>

<p>My guess is that <code>rpcbind</code> should be an internal IP on the computer running bitcoin core and you should route external RPC call from the router of your internal network to the <code>rpcbind</code>'s one.   </p>

CC BY-SA 4.0
2019-05-24T07:23:03.977Z
So basically you cannot allow external ip to accept rpc calls? You can accept only local rpc calls? But is there any workaround, because I need to control my node remotely.
Igoris Skinderis
CC BY-SA 4.0
2019-05-24T09:07:41.110Z
@IgorisSkinderis update my answer
onepix
CC BY-SA 4.0
2019-05-23T16:20:41.463Z
2019-05-24T09:26:23.400Z
2019-05-24T09:26:23.400Z
onepix
<p>I recently updated my bitcoin docker image to bitcoing v0.18.0 version and can't allow external rpc connections to it now. It binds to localhost if I set <code>rpcallowip=X.X.X.X</code>, then I tried to used <code>rpcbind</code> parameter also, but couldn't set my docker container to allow external rpc connetions.</p>

<p>This is what I get:</p>

<pre><code>bitcoin_1       | 2019-05-23T13:39:34Z Bitcoin Core version v0.18.0 (release build)
bitcoin_1       | 2019-05-23T13:39:34Z Assuming ancestors of block 0000000000000000000f1c54590ee18d15ec70e68c8cd4cfbadb1b4f11697eee have valid signatures.
bitcoin_1       | 2019-05-23T13:39:34Z Setting nMinimumChainWork=0000000000000000000000000000000000000000051dc8b82f450202ecb3d471
bitcoin_1       | 2019-05-23T13:39:34Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
bitcoin_1       | 2019-05-23T13:39:34Z Using RdSeed as additional entropy source
bitcoin_1       | 2019-05-23T13:39:34Z Using RdRand as an additional entropy source
bitcoin_1       | 2019-05-23T13:39:34Z Default data directory /root/.bitcoin
bitcoin_1       | 2019-05-23T13:39:34Z Using data directory /home/BTC
bitcoin_1       | 2019-05-23T13:39:34Z Config file: /home/BTC/bitcoin.conf
bitcoin_1       | 2019-05-23T13:39:34Z Using at most 125 automatic connections (1048576 file descriptors available)
bitcoin_1       | 2019-05-23T13:39:34Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
bitcoin_1       | 2019-05-23T13:39:34Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
bitcoin_1       | 2019-05-23T13:39:34Z Using 0 threads for script verification
bitcoin_1       | 2019-05-23T13:39:34Z Binding RPC on address X.X.X.X port XXXX failed.
bitcoin_1       | 2019-05-23T13:39:34Z Unable to bind any endpoint for RPC server
bitcoin_1       | 2019-05-23T13:39:34Z Error: Unable to start HTTP server. See debug log for details.
bitcoin_1       | Error: Unable to start HTTP server. See debug log for details.
bitcoin_1       | 2019-05-23T13:39:34Z Shutdown: In progress...
bitcoin_1       | 2019-05-23T13:39:34Z scheduler thread start
bitcoin_1       | 2019-05-23T13:39:34Z scheduler thread interrupt
bitcoin_1       | 2019-05-23T13:39:34Z Shutdown: done
</code></pre>

<p>My bitcoin.conf file looks like this:</p>

<pre><code>server=1
rpcbind=X.X.X.X
rpcallowip=0.0.0.0/0
rpcport=XXXX
port=XXXX
rpcuser=user
rpcpassword=password
</code></pre>

<bitcoin-core><json-rpc><nodes><bitcoin.conf>
Unable to bind any endpoint for RPC server
Igoris Skinderis
# Unable to bind any endpoint for RPC server

(Asked by: username_0 on 2019-05-23)

I recently updated my bitcoin docker image to bitcoing v0.18.0 version and can't allow external rpc connections to it now. It binds to localhost if I set `rpcallowip=X.X.X.X`, then I tried to used `rpcbind` parameter also, but couldn't set my docker container to allow external rpc connetions.

This is what I get:

```
bitcoin_1       | 2019-05-23T13:39:34Z Bitcoin Core version v0.18.0 (release build)
bitcoin_1       | 2019-05-23T13:39:34Z Assuming ancestors of block 0000000000000000000f1c54590ee18d15ec70e68c8cd4cfbadb1b4f11697eee have valid signatures.
bitcoin_1       | 2019-05-23T13:39:34Z Setting nMinimumChainWork=0000000000000000000000000000000000000000051dc8b82f450202ecb3d471
bitcoin_1       | 2019-05-23T13:39:34Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
bitcoin_1       | 2019-05-23T13:39:34Z Using RdSeed as additional entropy source
bitcoin_1       | 2019-05-23T13:39:34Z Using RdRand as an additional entropy source
bitcoin_1       | 2019-05-23T13:39:34Z Default data directory /root/.bitcoin
bitcoin_1       | 2019-05-23T13:39:34Z Using data directory /home/BTC
bitcoin_1       | 2019-05-23T13:39:34Z Config file: /home/BTC/bitcoin.conf
bitcoin_1       | 2019-05-23T13:39:34Z Using at most 125 automatic connections (1048576 file descriptors available)
bitcoin_1       | 2019-05-23T13:39:34Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
bitcoin_1       | 2019-05-23T13:39:34Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
bitcoin_1       | 2019-05-23T13:39:34Z Using 0 threads for script verification
bitcoin_1       | 2019-05-23T13:39:34Z Binding RPC on address X.X.X.X port XXXX failed.
bitcoin_1       | 2019-05-23T13:39:34Z Unable to bind any endpoint for RPC server
bitcoin_1       | 2019-05-23T13:39:34Z Error: Unable to start HTTP server. See debug log for details.
bitcoin_1       | Error: Unable to start HTTP server. See debug log for details.
bitcoin_1       | 2019-05-23T13:39:34Z Shutdown: In progress...
bitcoin_1       | 2019-05-23T13:39:34Z scheduler thread start
bitcoin_1       | 2019-05-23T13:39:34Z scheduler thread interrupt
bitcoin_1       | 2019-05-23T13:39:34Z Shutdown: done

```

My bitcoin.conf file looks like this:

```
server=1
rpcbind=X.X.X.X
rpcallowip=0.0.0.0/0
rpcport=XXXX
port=XXXX
rpcuser=user
rpcpassword=password

```

**Tags:** bitcoin-core, json-rpc, nodes, bitcoin.conf


---

## 2 answers

### Answer by username_1 on 2019-06-15. Score: 3

Here's how you fix the `rpcbind` issue with the latest change in version 0.18.0.

Before 0.18, if you put `rpcallowip=0.0.0.0/0`, the value of `rpcbind` didn't need to be set as it defaulted to all interfaces.

Now that is no longer the case. Here's my setup, for running bitcoind in a container through Docker compose:

```
rpcallowip=0.0.0.0/0
rpcbind=127.0.0.1
# local DNS name (container name used in my Docker Compose file)
rpcbind=bitcoind

```

The first `rpcbind` is so I can make RPC calls from inside the container. The second is so other containers can reach the `bitcoind` container.

I think this does what you want:

1. I can RPC from inside the `bitcoind` container
2. I can RPC from another container on the same network (as specified in the compose file) to the `bitcoind` container
3. I can RPC from my localhost outside the container.

For the last, I exposed port 8332 to my localhost in the compose file and I can curl to the container:

```
$ curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }'  -H 'content-type: text/plain;' 127.0.0.1:8332/
Enter host password for user 'user':
{"result":"0000000000000000000ece9381a7e0a4020353f4adde7b560a6b2840d5d44cfa","error":null,"id":"curltest"}

```

The full details of my container setup are [here](https://github.com/chanhosuh/docker-bitcoin), in case there's something I missed in writing up my answer.

> **Comments:**
> **username_2**: Where to write all this?  

---

### Answer by username_3 on 2019-05-23. Score: 0

If you take a look of the [release note](https://bitcoin.org/en/release/v0.18.0#configuration-option-changes), you will find that:

> The rpcallowip option can no longer be used to automatically listen on all network interfaces. Instead, the rpcbind parameter must be used to specify the IP addresses to listen on. Listening for RPC commands over a public network connection is insecure and should be disabled, so a warning is now printed if a user selects such a configuration. If you need to expose RPC in order to use a tool like Docker, ensure you only bind RPC to your localhost, e.g. docker run [...] -p 127.0.0.1:8332:8332 (this is an extra :8332 over the normal Docker port specification).

You said in comment

> because I need to control my node remotely

I'm afraid for any version >= 18 this would not be doable but rightfully given rpc connection are no encrypted which mean plain-text login/password that's why it is not recommended/possible anymore [see](https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon). **Using one of both interface remotely RPC or REST looks like not recommended** so you could still do it but has to know it is insecure.

My guess is that `rpcbind` should be an internal IP on the computer running bitcoin core and you should route external RPC call from the router of your internal network to the `rpcbind`'s one.

> **Comments:**
> **username_0**: So basically you cannot allow external ip to accept rpc calls? You can accept only local rpc calls? But is there any workaround, because I need to control my node remotely.  
> **username_3**: @username_0 update my answer  

---

