<p>You can run bitcoind on one machine, and communicate with another over your LAN using bitcoind's JSON-RPC API.</p>

<p>Once bitcoind is running just hit your host machine's <strong>local network IP</strong> on port <code>8332</code> with your API calls. You can find out your local network IP of your host machine by typing <code>ipconfig</code> in your command prompt. </p>

<p>You didn't mention how you were trying to communicate so let's say for example if you're using <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow" title="Python-BitcoinRPC">Python-BitcoinRPC</a> </p>

<pre><code>from bitcoinrpc.authproxy import AuthServiceProxy

access = ServiceProxy("http://USERNAME:PASSWORD@192.168.2.1:8332")
access.getinfo()
</code></pre>

<p>Make sure you update the <code>ServicProxy()</code> function with the host's local IP, and your username and password from your bitcoin.conf.</p>

CC BY-SA 3.0
2016-10-20T12:02:54.047Z
I want just to excute bitcoin-cli commands from a bitcoin client E.g bitcoin-cli -regtest getbalance. I am not writing a program.
katapulte
CC BY-SA 3.0
2016-10-20T12:24:40.160Z
Ok I might have misunderstood your question. You want one machine on your LAN to hold the blockchain, and another machine to run the bitcoin client but NOT store the blockchain, but still be able to execute commands. Perhaps this will help https://bitcoin.stackexchange.com/questions/7455/how-to-setup-a-lan-network-with-only-one-bitcoind-client-downloading-the-blockch?rq=1
m1xolyd1an
CC BY-SA 3.0
2016-10-20T12:36:06.373Z
i want to setup a local private chain so i thought about using a node as a server and the other as a client
katapulte
CC BY-SA 3.0
2016-10-20T01:35:55.013Z
2016-10-20T01:35:55.013Z
m1xolyd1an
<p>I am attempting to run  <code>bitcoind</code> on a computer in my local area network (LAN) and then have <code>bitcoin-cli</code> access/communicate with that computer in lieu of running Bitcoin-QT on the same machine alongside <code>bitcoind</code>.</p>

<p>Is that possible?</p>

<p>Thus far I've tried to modify the bitcoin.conf but without success.</p>

<bitcoind>
Bitcoind and Bitcoin-cli on LAN
katapulte
# Bitcoind and Bitcoin-cli on LAN

(Asked by: username_0 on 2016-10-19)

I am attempting to run `bitcoind` on a computer in my local area network (LAN) and then have `bitcoin-cli` access/communicate with that computer in lieu of running Bitcoin-QT on the same machine alongside `bitcoind`.

Is that possible?

Thus far I've tried to modify the bitcoin.conf but without success.

**Tags:** bitcoind


---

## 1 answers

### Answer by username_1 on 2016-10-20. Score: 1

You can run bitcoind on one machine, and communicate with another over your LAN using bitcoind's JSON-RPC API.

Once bitcoind is running just hit your host machine's **local network IP** on port `8332` with your API calls. You can find out your local network IP of your host machine by typing `ipconfig` in your command prompt.

You didn't mention how you were trying to communicate so let's say for example if you're using [Python-BitcoinRPC](https://github.com/jgarzik/python-bitcoinrpc "Python-BitcoinRPC")

```
from bitcoinrpc.authproxy import AuthServiceProxy

access = ServiceProxy("http://USERNAME:PASSWORD@192.168.2.1:8332")
access.getinfo()

```

Make sure you update the `ServicProxy()` function with the host's local IP, and your username and password from your bitcoin.conf.

> **Comments:**
> **username_0**: I want just to excute bitcoin-cli commands from a bitcoin client E.g bitcoin-cli -regtest getbalance. I am not writing a program.  
> **username_1**: Ok I might have misunderstood your question. You want one machine on your LAN to hold the blockchain, and another machine to run the bitcoin client but NOT store the blockchain, but still be able to execute commands. Perhaps this will help https://bitcoin.stackexchange.com/questions/7455/how-to-setup-a-lan-network-with-only-one-bitcoind-client-downloading-the-blockch?rq=1  
> **username_0**: i want to setup a local private chain so i thought about using a node as a server and the other as a client  

---

