Bitcoin Node / DONE
bitcoincore, bitcoind
Minimum server requirements:
Disk: At least 1 TB SSD (NVMe).
Processor: Minimum 6 cores.
Memory: 8 GB.
Software: It is necessary to have Docker installed.
Creating an environment:
mkdir -p /nodes/btccd /nodes/btcCreate a bitcoind data directory:
mkdir bitcoin_dataCreate a bitcoind configuration:
nano bitcoind.conf[main]
rpcallowip=0.0.0.0/0 # !ALLOWED IP!
rpcbind=0.0.0.0
rpcport=8332
rpcuser=YOUR_USER_NAME
rpcpassword=YOUR_PASSWORD
server=1
#txindex=1
prune=2048 #2GB
datadir=/data/.bitcoin
keypool=2000Create docker-compose.yml
nano docker-compose.ymlx-logging:
&default-logging
driver: "json-file"
options:
max-file: "1"
max-size: "500m"
services:
bitcoin:
image: rg.boxexchanger.net/boxexchanger-utils/docker-bitcoind:main
container_name: bitcoind
volumes:
- ./bitcoin_data:/data/.bitcoin
- ./bitcoind.conf:/data/bitcoind.conf
logging: *default-logging
restart: unless-stopped
stop_grace_period: 15m30s
ports:
- "8333:8333"
- "127.0.0.1:8332:8332"Running bitcoind in docker:
docker compose up -dCMD:
sudo ufw allow 8332
mkdir /nodes
mkdir /nodes/BTC
sudo apt update
sudo apt install supervisor/nodes/BTC/bitcoin.conf
[main]
rpcallowip=0.0.0.0/0 # !ALLOWED IP!
rpcbind=127.0.0.1
rpcport=8332
rpcuser=YOUR_USER_NAME
rpcpassword=YOUR_PASSWORD
server=1
#txindex=1
prune=2048 #2GB
datadir=/nodes/BTC
keypool=2000/etc/supervisor/conf.d/bitcoind.conf
[program:bitcoind]
command=nice /usr/local/bin/bitcoind -conf=/nodes/BTC/bitcoin.conf
autostart=true
autorestart=true
stderr_logfile=/var/log/supervisor/bitcoind.err.log
stdout_logfile=/var/log/supervisor/bitcoind.out.log
stderr_logfile_backups=2
stdout_logfile_backups=2
environment=HOME="/root"CMD:
sudo supervisorctl start bitcoind
sudo supervisorctl stop bitcoind
curl -#o /tmp/bitcoin.tar.gz https://bitcoin.org/bin/bitcoin-core-25.0/bitcoin-25.0-x86_64-linux-gnu.tar.gz
tar -xf /tmp/bitcoin.tar.gz -C /tmp/
cp /tmp/bitcoin-25.0/bin/bitcoind /usr/local/bin/bitcoind
rm -r /tmp/bitcoin-25.0
rm /tmp/bitcoin.tar.gz
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start bitcoindOpening the access port
Create a proxy from port
- localhost:8332 to port 8233 for bitcoind rpc
Opening a port for RPC: To access RPC, you must open port 8233 in the firewall settings for the IP address of the server from which the connection will originate.
Accesses
RPC: http://ip.host:8233/
Last updated