initial commit

This commit is contained in:
2025-06-28 17:24:25 -06:00
parent 1ca5121775
commit c34dec8670
3 changed files with 82 additions and 0 deletions

View File

@ -1,2 +1,53 @@
# 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
```

14
bitcoind.service Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=Bitcoin Knots Daemon
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/home/steven/bitcoin/bin/bitcoind
User=steven
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target

17
electrumx_server.service Normal file
View File

@ -0,0 +1,17 @@
[Unit]
Description=ElectrumX RPC Server
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/home/steven/.local/bin/electrumx_server
User=steven
Restart=on-failure
RestartSec=5
Environment=COIN=Bitcoin
Environment=DB_DIRECTORY=/home/steven/electrum_db
Environment=DAEMON_URL=http://<USER>:<PASS>@127.0.0.1
[Install]
WantedBy=multi-user.target