If you get an error Permissions denied
while executing any command, please precede it with sudo
.
Example:
Instead of apt-get install -y gpg curl
please run sudo apt-get install -y gpg curl
mkdir -p $HOME/bitcoin/download
cd $HOME/bitcoin/download
apt-get update
apt-get install -y gpg curl
for key in 01EA5486DE18A882D4C2684590C8019E36C2E964; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
done
curl -SLO https://bitcoin.org/bin/bitcoin-core-0.20.1/bitcoin-0.20.1-x86_64-linux-gnu.tar.gz
curl -SLO https://bitcoin.org/bin/bitcoin-core-0.20.1/SHA256SUMS.asc
gpg --verify SHA256SUMS.asc
grep bitcoin-0.20.1-x86_64-linux-gnu.tar.gz SHA256SUMS.asc | sha256sum -c -
tar -xzf *.tar.gz -C $HOME/bitcoin
mkdir -p $HOME/bitcoin/data
If you run miner on separate machine uncomment following line and replace ip address with the one used by miner rpcallowip=127.0.0.1
.
If you want you can change rpcuser
and rpcpassword
.
cat > $HOME/bitcoin/bitcoin.conf << EOF
server=1
regtest=1
rpcallowip=0.0.0.0/0
rpcallowip=::/0
rpcuser=blockstack
rpcpassword=blockstacksystem
txindex=1
listen=1
debug=1
rpcserialversion=0
datadir=$HOME/bitcoin/data
maxconnections=200
#rpcallowip=127.0.0.1
[regtest]
bind=0.0.0.0:19444
rpcbind=0.0.0.0:19443
connect=bitcoind.krypton.blockstack.org:18444
EOF
$HOME/bitcoin/bitcoin-0.20.1/bin/bitcoind -conf=$HOME/bitcoin/bitcoin.conf
You have to keep bitcoind
process up and running while mining, however if you would like to stop just hit ctrl+c
File miner-Krypton.toml
is usually located in conf
directory inside directory wher mining bot is installed.
If you installed your bot in /home/username/stacks-bot
then you should found it in /home/username/stacks-bot/conf/
.
If your bitcoind node is on a separate machine, repalce 127.0.0.1
with its IP address.
If you modified rpcuser
and rpcpassword
in previous step, update here username
and password
accordingly.
[burnchain]
chain = "bitcoin"
mode = "krypton"
# peer_host = "bitcoind.krypton.blockstack.org"
peer_host = "127.0.0.1"
username = "blockstack"
password = "blockstacksystem"
rpc_port = 19443
peer_port = 19444
burn_fee_cap = 11000
And now restart your miner.