- Ubuntu 16.04.3 x64
- 2 GB Memory / 60 GB Disk
- 200 GB block storage volume
get ip-address
from digital ocean
- ssh root@ip-address
- adduser bitcoin
- usermod -aG sudo bitcoin
- Copy public ssh key
- su - bitcoin
- mkdir ~/.ssh
- chmod 700 ~/.ssh
vim ~/.ssh/authorized_keys
Paste in public ssh key && save- chmod 600 ~/.ssh/authorized_keys
- exit
- exit
- ssh bitcoin@ip-address
Get volume-name
from digital ocean
- sudo parted /dev/disk/by-id/scsi-0DO_Volume_volume-name mklabel gpt
- sudo parted -a opt /dev/disk/by-id/scsi-0DO_Volume_volume-name mkpart primary ext4 0% 100%
- sudo mkfs.ext4 /dev/disk/by-id/scsi-0DO_Volume_volume-name-part1
- sudo mkdir -p /mnt/volume-name-part1
- echo '/dev/disk/by-id/scsi-0DO_Volume_volume-name-part1 /mnt/volume-name-part1 ext4 defaults,nofail,discard 0 2' | sudo tee -a /etc/fstab
- sudo mount -a
- sudo chmod 777 /mnt/volume-name-part1
- sudo add-apt-repository ppa:bitcoin-abc/ppa
- sudo apt-get update
- sudo apt-get install bitcoind
- mkdir /mnt/volume-name-part1/Bitcoin
- mkdir ~/.bitcoin
- vim ~/.bitcoin/bitcoin.conf
- sudo vim /lib/systemd/system/bitcoin.service
# Generated by https://jlopp.github.io/bitcoin-core-config-generator/
# This config should be placed in following path:
# ~/.bitcoin/bitcoin.conf
# [core]
# Specify a non-default location to store blockchain and other data.
datadir=/mnt/volume-name-part1/Bitcoin
# Set database cache size in megabytes; machines sync faster with a larger cache. Recommend setting as high as possible based upon machine's available RAM.
dbcache=1000
# Maintain a full transaction index, used by the getrawtransaction rpc call.
txindex=1
# [rpc]
# Accept command line and JSON-RPC commands.
server=1
# Username for JSON-RPC connections
rpcuser=bitcoin
# Password for JSON-RPC connections
rpcpassword=enterpasswordhere
# [wallet]
# Do not load the wallet and disable wallet RPC calls.
disablewallet=1
[Unit]
Description=Bitcoin's distributed currency daemon
After=network.target
[Service]
User=bitcoin
Group=bitcoin
Type=forking
PIDFile=/mnt/volume-name-part1/Bitcoin/bitcoind.pid
ExecStart=/usr/bin/bitcoind -daemon -pid=/mnt/volume-name-part1/Bitcoin/bitcoind.pid \
-conf=/home/bitcoin/.bitcoin/bitcoin.conf -datadir=/mnt/volume-name-part1/Bitcoin
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=2s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
- sudo service bitcoin start
- bitcoin-cli getblockchaininfo