How to setup a bitcoin node on Linux without helpers. btcpayserver is a godsend, along with many prebuilt like Umbrel and RaspiBlitz are great experience for end users unconcerned about more than their finances. At a time they weren’t so great, and when looking to integrate a bitcoin node into your existing node using them may not be an option. Here is a simple guide to refresh your setup with. We prepare a Bitcoin node, a Lightning Node, then we remove the Bitcoin node entirely with Neutrino! Light clients are cool.
In this example I’ll be using Arch Linux. The repositories come with bitcoin core and AUR comes with lnd, or you can get them from the source using the following steps.
Download the Bitcoin Core daemon from the official Bitcoin website.
Extract the contents of the downloaded file and move the bitcoind
executable to the /usr/local/bin
directory.
Create a configuration file for Bitcoin Core in the ~/.bitcoin
directory. The file should contain the following lines:
daemon=1
server=1
rpcuser=<username>
rpcpassword=<password>
Start the Bitcoin Core daemon by running the bitcoind
executable.
Use the bitcoin-cli
utility to interact with the Bitcoin network.
git clone https://github.com/lightninglabs/lnd
cd lnd
make release-install
# if you want to start the daemon now, add `--now`
systemctl enable bitcoind lnd
Now you have configured a bitcoind
and lnd
node to start at boot using systemd
!
Currently Bitcoin nodes consume around 1TB of space, and preferably you would rather not waste that space if you can’t spare it on a budget setup. For science lets turn it into a Neutrino light client! In your lnd.conf
, add the following lines.
[Application Options]
feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
[Bitcoin]
bitcoin.node=neutrino
bitcoin.dnsseed=nodes.lightning.directory,soa.nodes.lightning.directory
Now you can disable the bitcoind
entirely and start lnd
!
systemctl disable --now bitcoind
systemctl start lnd
Setting up a Bitcoin node is a kind way of contributing to the largest decentralized financial network’s availability! Adding a Lightning Network node taps you into a vibrant microeconomy build on top of bitcoin’s scrypt contracts!
Using your node in Neutrino mode eliminates one of the biggest barriers to participating in the Lightning Network and expands the scope of budget hardware for your experiments! Consider hooking up your node to ln-service to use your new service for accepting digital payments instantly without on-chain confirmation!