Bitcoin: What is the proper configuration and command to run bitcoincore and use RPC over LAN?
Setting Up Bitcoin Core Using RPC Over LAN: A Step-by-Step Guide
When setting up your small computer as a Bitcoin node, it is essential to ensure that you can remotely access the node state using the Remote Procedure Call (RPC) protocol to manage and troubleshoot your wallet. In this article, we will look at the proper configuration and command to run Bitcoin Core (BTCS) on a local machine with RPC over LAN capabilities.
Requirements
- A small computer (e.g. Raspberry Pi or a computer with sufficient processing power)
- Bitcoin Core version 0.19.1 or later
- Network adapter compatible with your device
Step-by-step setup

Install Bitcoin Core on your local computer
- Download and install Bitcoin Core from the official repository: “wget RPM”
- Run the installation script:
”hit
sudo rpm -ivf bitcoin-0.19.1-1.x86_64-1.0.2-1.i686.noarch.rpm
- Set your default wallet directory "wallet_dir" to a safe location (e.g. "/var/lib/btc/"):
''hit
echo "/var/lib/btc/" > ~/.bitcoinrc
Configure RPC over LAN
To enable RPC over LAN, you need to configure the server to listen on a specific port. The default RPC port is 8332, but we’ll change it here.
- Update the “~/.bitcoinrc” file:
”hit
rpcserver -p 8332 -a “/path/to/your/wallet” –port=8332
Replace "/path/to/your/wallet" with the path to your wallet directory.
- If you want to listen using a specific IP address or network, use the "listen_address" parameter:
''hit
rpcserver -p 8332 -a "/path/to/your/wallet" --port=8332 --listen_address=0.0.0.0
This will allow RPC connections to be made from anywhere on the local network.
Running Bitcoin Core with RPC
- Start the server:
”hit
sudo systemctl start bitcoin-core
- To check if you can connect to the node using RPC, use the bitcoin-cli command:
''hit
bitcoin-cli --address=0.0.0.0:8332 get new address
A new wallet address will be provided. You can then use this address to send transactions remotely.
Troubleshooting
- If you are having issues with RPC connections, check the Bitcoin Core logs for errors.
- Make sure your network card is configured to listen on port 8332 or a specific IP address.
- If you are using a VPN connection, make sure the VPN server allows RPC traffic.
After following these steps and configuring your Bitcoin Core node with RPC over LAN capabilities, you should be able to remotely access your wallet status from your LAN.
Leave a Comment