<p>I am not familiar about how to run it on windows but for Ubuntu 12.04 I can help you out first you should remove garbage from the conf file which should be located under ~/.bitcoin folder with the name bitcoin.conf with just following text :</p>

<pre><code>server=1
daemon=1
rpcuser=whatever
rpcpassword=whatever
</code></pre>

<p>^^ is sufficient </p>

<p>now to make bitcoind to reply RPC calls you should have jsonRPCClient files in your computer I am not familiar with ruby but still <a href="https://github.com/Textalk/json-rpc-client-ruby" rel="nofollow">https://github.com/Textalk/json-rpc-client-ruby</a> this link can give you an idea on how to do it. I hope this will help you achieve what you are looking for. And the bonus answer on linux you can use netstat -ntpl to have detailed view on which program is using which port</p>

CC BY-SA 3.0
2014-03-09T20:23:47.750Z
2014-03-09T20:23:47.750Z
Khan Shahrukh
<p>OK, I recently posted trying to get help connecting to BITCOIND using Ubuntu or Windows 7.</p>

<p>In Ubuntu (Virtual Machine under Win7 64bit) 12.04 Desktop LTS I have the following written in my BITCOIN.CONF file located in $HOME/.bitcoin :</p>

<pre><code>server=1
rpcuser=hello1
rpcpassword=12345
rpcallowip=*
</code></pre>

<p>I run BITCOIND with following command:</p>

<pre><code>./bitcoind --server --rpcuser=hello1 --rpcpassword=12345
</code></pre>

<p>But when I try and connect with the Ruby script (see <a href="https://bitcointalk.org/index.php?topic=85495.msg3773215#msg3773215" rel="nofollow">https://bitcointalk.org/index.php?topic=85495.msg3773215#msg3773215</a> ) it gives an error saying it can't connect.</p>

<p>Likewise, under Windows 7 I attempt the same procedure and using NIRSOFT cports app I see Bitcoin daemon is only opened under port 8333, not 833*<em>2</em>* as one would expect if RPC connection was active.</p>

<p>I've opened TCP/UDP port 8332-8333 in port forwarding of router.</p>

<p>What on Earth am I doing wrong here? 
<strong>Why can't I connect to Bitcoin daemon via RPC?</strong> </p>

<p>==> <strong>BONUS QUESTION:</strong> I'm quite new to Ubuntu; how do you check open TCP ports at terminal in Ubuntu? (equivalent of netstat in windows)</p>

<bitcoind><json-rpc><ubuntu><windows>
Cannot get BITCOIND RPC connection working on Ubuntu 12.04 or Windows 7
Wizard Of Ozzie
# Cannot get BITCOIND RPC connection working on Ubuntu 12.04 or Windows 7

(Asked by: username_0 on 2013-12-09)

OK, I recently posted trying to get help connecting to BITCOIND using Ubuntu or Windows 7.

In Ubuntu (Virtual Machine under Win7 64bit) 12.04 Desktop LTS I have the following written in my BITCOIN.CONF file located in $HOME/.bitcoin :

```
server=1
rpcuser=hello1
rpcpassword=12345
rpcallowip=*

```

I run BITCOIND with following command:

```
./bitcoind --server --rpcuser=hello1 --rpcpassword=12345

```

But when I try and connect with the Ruby script (see <https://bitcointalk.org/index.php?topic=85495.msg3773215#msg3773215> ) it gives an error saying it can't connect.

Likewise, under Windows 7 I attempt the same procedure and using NIRSOFT cports app I see Bitcoin daemon is only opened under port 8333, not 833\**2*\* as one would expect if RPC connection was active.

I've opened TCP/UDP port 8332-8333 in port forwarding of router.

What on Earth am I doing wrong here?
**Why can't I connect to Bitcoin daemon via RPC?**

==> **BONUS QUESTION:** I'm quite new to Ubuntu; how do you check open TCP ports at terminal in Ubuntu? (equivalent of netstat in windows)

**Tags:** bitcoind, json-rpc, ubuntu, windows


---

## 1 answers

### Answer by username_1 on 2014-03-09. Score: 1 | Accepted answer

I am not familiar about how to run it on windows but for Ubuntu 12.04 I can help you out first you should remove garbage from the conf file which should be located under ~/.bitcoin folder with the name bitcoin.conf with just following text :

```
server=1
daemon=1
rpcuser=whatever
rpcpassword=whatever

```

^^ is sufficient

now to make bitcoind to reply RPC calls you should have jsonRPCClient files in your computer I am not familiar with ruby but still <https://github.com/Textalk/json-rpc-client-ruby> this link can give you an idea on how to do it. I hope this will help you achieve what you are looking for. And the bonus answer on linux you can use netstat -ntpl to have detailed view on which program is using which port


---

