Update 01-en.md

This commit is contained in:
Your Name 2023-04-23 18:19:20 +02:00
parent 70295457e0
commit 1d1cd429a8

View file

@ -0,0 +1,218 @@
---
title: Setting Up and Running a Bitcoin Full Node with a Lightning Network Node
description: Learn how to set up and run a Bitcoin full node along with a Lightning Network node on a server.
level: [intermediate]
updated_at: 2023-04-23
slug: bitcoin-full-node-lightning-network-node-setup
author_name: ffaex
author_url: https://github.com/ffaex/
tags: [bitcoin, lightning network, linux]
netcup_product_url: https://www.netcup.eu/bestellen/produkt.php?produkt=2969
language: en
available_languages: [en]
---
# Setting Up a Bitcoin Full Node with a Lightning Node
This tutorial explains how to set up a Bitcoin full node with a Lightning node on your server. Running a full node contributes to the strength and security of the Bitcoin network, and a Lightning node enables faster, cheaper transactions.
The most important requirement for implementation is a basic understanding of the Linux command line.
## Requirements
To set up a Bitcoin full node and a Lightning node, you need a server with the following characteristics:
* Sufficient storage (about 500 GB)
* Good CPU power
* A stable internet connection
The [RS 2000 G8 SSD from netcup](https://www.netcup.de/bestellen/produkt.php?produkt=2969) meets these requirements.
## Step 1 - Ordering the VPS
Order the [RS 2000 G8 SSD from netcup](https://www.netcup.de/bestellen/produkt.php?produkt=2969) if you haven't done so already. Existing customers can add the product easily and quickly.
## Step 2 - Basic configuration of the server
After provisioning the server and logging in with the username `root` and the password sent by email, update the basic configuration of the server.
1. Change the root password with `passwd`.
2. Download the current security updates with `apt-get update && apt-get upgrade -y`.
## Step 3 - Download and install Bitcoin Core
1. Download the latest Bitcoin Core release from the [official website](https://bitcoincore.org/en/download/).
```
wget https://bitcoincore.org/bin/bitcoin-core-24.0.1/bitcoin-24.0.1-x86_64-linux-gnu.tar.gz
```
2. Extract the downloaded archive.
```
tar xvf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz
```
3. Change to the extracted directory.
```
cd bitcoin-24.0.1
```
4. Add the binaries to your path.
```
nano $HOME/.bashrc
```
Go to the end of the file and paste the following:
```
export PATH="$HOME/bitcoin-24.0.1/bin/:$PATH"
```
Save with Ctrl+O and exit with Ctrl+X.
Reload the changes with:
```
source $HOME/.bashrc
```
5. Create a default bitcoin.conf file.
```
mkdir $HOME/.bitcoin
nano $HOME/.bitcoin/bitcoin.conf
```
Paste the following:
```
server=1
daemon=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
```
Save with Ctrl+O and exit with Ctrl+X.
6. Start Bitcoin Core by typing `bitcoind` in the terminal.
```
bitcoind
```
At this point Bitcoin Core should start synchronizing with the network. It will download and verify the entire blockchain, which can take several hours to a few days.
7. Track the progress of your Bitcoin node synchronization.
```
tail -f $HOME/.bitcoin/debug.log
```
When the Bitcoin node is done synchronizing, you can continue with the next steps.
## Step 4 - Install and configure LND (Lightning Network Daemon)
1. Download the latest release of LND from the [official GitHub repository](https://github.com/lightningnetwork/lnd/releases).
```
wget https://github.com/lightningnetwork/lnd/releases/download/v0.16.0-beta/lnd-linux-amd64-v0.16.0-beta.tar.gz
```
2. Extract the downloaded archive.
```
tar xvf lnd-linux-amd64-v0.16.0-beta.tar.gz
```
3. Change to the extracted directory.
```
cd lnd-linux-amd64-v0.16.0-beta.tar.gz
```
4. Move the LND binaries to the `~/bin` directory (create the directory if it doesn't exist).
```
mkdir -p $HOME/bin
mv lnd lncli $HOME/bin
```
5. Add the LND binaries to your path.
```
nano $HOME/.bashrc
```
Go to the end of the file and paste the following:
```
export PATH="$HOME/bin/:$PATH"
```
Save with Ctrl+O and exit with Ctrl+X.
Reload the changes with:
```
source $HOME/.bashrc
```
6. Create a default lnd.conf file.
```
mkdir $HOME/.lnd
nano $HOME/.lnd/lnd.conf
```
Paste the following:
```
[Application Options]
debuglevel=info
maxpendingchannels=10
alias=YourNodeAlias
color=#68F442
listen=localhost
[Bitcoin]
bitcoin.active=true
bitcoin.mainnet=true
bitcoin.node=bitcoind
```
Save with Ctrl+O and exit with Ctrl+X.
Replace `YourNodeAlias` with a custom alias for your node.
7. Start LND with the following command:
```
lnd
```
8. Create a wallet using `lncli create`.
After setting up your Bitcoin full node and Lightning Network node, open another terminal window and create a wallet using the following command:
```
lncli create
```
Follow the steps described by the command-line interface to create a new wallet, including setting a wallet password, generating a seed, and backing up your seed phrase.
Congratulations! You now have a functioning Bitcoin full node with a Lightning Network node and a newly created wallet.
For more information and basic usage of LND, check out the [official LND documentation](https://docs.lightning.engineering/lightning-network-tools/lnd/first-steps-with-lnd).
Remember to keep your seed phrase secure and make sure to have a backup, as losing it will result in the loss of your funds. Also, keep your server secure and up-to-date to ensure the safety of your Bitcoin full node and Lightning Network node.
With your new setup, you can now participate in the Bitcoin and Lightning Network ecosystems, send and receive transactions, and contribute to the overall health and decentralization of the network. Enjoy exploring the world of cryptocurrencies and the Lightning Network!
Now you have a Bitcoin full node with a Lightning node up and running. You can use `lncli` to interact with your LND node, and you can connect your Lightning wallet to your node for sending and receiving payments.