Don't just copy and paste. Understand what you are doing.
Note: We can't change ownership of files if directory is mounted from a vfat filesystem. You will have to use root user instead of bitcoinuser or set all files in .bitcoin directory to world-writable.
sudo useradd bitcoinusersudo apt-get install ntfs-3gsudo blkid
/dev/sda1: LABEL="My Passport" UUID="3C02BB6502BB2336" TYPE="ntfs" PARTLABEL="My Passport" PARTUUID="3e1d9372-dada-4a7f-9542-ea32591373fd"mkdir -m 2770 -p ~/btcdata
sudo mount -t ntfs-3g -o rw,uid=$(id -u bitcoinuser),gid=$(id -g),umask=007 /dev/sda1 ~/btcdataAdapt the docs and Dockerfiles so that Docker user root will be used. Too bad for you.
mkdir -m 2770 -p ~/btcdata(this cannot be done on a vfat mounted filesystem)
sudo chown -R bitcoinuser:`id -gn` ~/btcdata(this cannot be done on a vfat mounted filesystem)
sudo find ~/btcdata -type f -exec chmod g+rw {} \; ; sudo find ~/btcdata -type d -exec chmod g+rwx {} \;(replacing rpcusername, rpcpassword, 10.0.0.0/24 and others by your actual values)
testnet=1
txindex=1
rpcuser=rpcusername
rpcpassword=rpcpassword
rpcallowip=10.0.0.0/24
#printtoconsole=1
maxmempool=64
dbcache=64
zmqpubrawblock=tcp://0.0.0.0:29000
zmqpubrawtx=tcp://0.0.0.0:29000(replacing Bitcoin Core version by the one you want)
docker build -t btcnode --build-arg ARCH=x86_64 .
docker build -t btcnode --build-arg ARCH=arm .
docker build -t btcnode --build-arg ARCH=aarch64 .docker run --rm -d --name btcnode -p 18333:18333 -p 18332:18332 -p 29000:29000 -v /home/pi/btcdata:/.bitcoin btcnode `id -u bitcoinuser`:`id -g bitcoinuser` bitcoindsudo find ~/btcdata -type f -exec chmod g+rw {} \; ; sudo find ~/btcdata -type d -exec chmod g+rwx {} \;With printtoconsole=1 in bitcoin.conf:
docker logs -f btcnodeWithout printtoconsole=1 in bitcoin.conf:
sudo tail -f ~/btcdata/testnet3/debug.logInvoking bitcoin-cli…
docker exec -it btcnode bitcoin-cli -datadir=/.bitcoin stopA full archival (transactions indexed) Mainnet Bitcoin node needs a lot of disk space. I have a bunch of old USB flash drives… I’d like to combine them all in one big disk and use that virtual disk for my node. Sounds like a fun hacky step!
sudo apt-get install lvm2sudo blkidsudo pvcreate /dev/sda1
sudo pvcreate /dev/sdb1
sudo pvssudo vgcreate btcVG /dev/sda1
sudo vgextend btcVG /dev/sdb1
sudo vgdisplaysudo lvcreate -n btcLV -l 100%FREE btcVG
sudo mkfs -t ext4 /dev/mapper/btcVG-btcLVsudo fsck /dev/btcVG/btcLVsudo mount /dev/btcVG/btcLV ~/btcdata
sudo lvdisplaysudo umount ~/btcdata
sudo vgchange -an btcVG
sudo lvdisplayecho "/dev/btcVG/btcLV ${HOME}/btcdata" | sudo tee --append /etc/fstab > /dev/nullsudo pvcreate /dev/sdc1
sudo vgextend btcVG /dev/sdc1
sudo lvextend /dev/btcVG/btcLV /dev/sdc1
sudo e2fsck -f /dev/btcVG/btcLV
sudo resize2fs /dev/btcVG/btcLV