61 lines
1.7 KiB
Markdown
61 lines
1.7 KiB
Markdown
# bitcoin-fullnode
|
|
|
|
Install Debian and then prepare the system
|
|
|
|
```bash
|
|
|
|
# 1. Install dependency packages - as root
|
|
apt install btop sudo git vim curl wget tmux python3 python3-pip
|
|
|
|
# 2. Add your user to the sudoers
|
|
visudo
|
|
|
|
# 3. Then switch to your regular user account, root not needed
|
|
|
|
# 4. Get and change below the latest tar.gz file from https://bitcoinknots.org/#download
|
|
wget <tar.gz file> -O bitcoin.tar.gz
|
|
tar xvfz bitcoin.tar.gz
|
|
|
|
# 5. Install ElectrumX server w/ pip
|
|
pip install e-x --break-system-packages # don't worry, it just sounds scary
|
|
mkdir ~/electrum_db
|
|
|
|
# 6. Clone this repo and deploy configurations
|
|
git clone https://code.stevenpolley.net/steven/bitcoin-fullnode.git
|
|
|
|
```
|
|
|
|
You will need to make some modifications to some of the files
|
|
|
|
1. bitcoin-fullnode/electrumx_server.service - Update both the <user> and <password> tags which are used by DAEMON_URL
|
|
2. bitcoin/bitcoin.conf - update externalip, and set rpcauth (use the provided script to get salt and hash), use the same password used in the electrumx_server.service file
|
|
|
|
Then get the services installed and start them up and monitor them for a bit.
|
|
|
|
```bash
|
|
# Move bitcoin.conf
|
|
mkdir ~/.bitcoin
|
|
mv ~/bitcoin/bitcoin.conf ~/.bitcoin
|
|
|
|
# Install services
|
|
sudo cp bitcoin-fullnode/bitcoind.service /etc/systemd/system/
|
|
sudo cp bitcoin-fullnode/electrumx_server.service /etc/systemd/system/
|
|
sudo systemctl daemon-reload
|
|
|
|
# Start things up
|
|
sudo systemctl enable bitcoind.service --now
|
|
sudo systemctl enable electrumx_server.service --now
|
|
|
|
# Monitor journalctl for anything that looks wrong. What is wrong? You're on your own.
|
|
sudo journalctl --follow
|
|
|
|
```
|
|
|
|
Clean up some mess
|
|
|
|
```bash
|
|
rm -f ~/bitcoin.tar.gz
|
|
rm -rf ~/bitcoin-fullnode
|
|
```
|
|
|