Project: Setting up a Litecoin p2pool with merged mining on a Debian virtual server part 2
Part 2: Setting up a node for Dogecoin and for merge mining:
Create a new Debian droplet at Digitalocean
Select smallest size droplet and remember to tick off for private network. 32-bit consumes less space and this is important as the blockchain is enormous.
Update the Linux distro
apt-get update apt-get dist-upgrade
Create and mount a swapfile:
dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=2000 mkswap /mnt/myswap.swap swapon /mnt/myswap.swap
To mount the swapfile automatically after reboots
Add the following line at the end of the fstab file:
/mnt/myswap.swap none swap sw 0 0
Install Required Packages:
apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev apt-get install libboost-all-dev git libminiupnpc-dev redis-server libdb5.1-dev libdb5.1++-dev
Setting up a wallet owner, different from root, then adding it to the sudoers group:
You will be asked for a password. This have to be strong as it will be accessible for everyone.
adduser whateveryouwant sudo
now is a good time to reboot before compiling the wallet from the wallet owner user
Download Dogecoin and compile:
git clone https://github.com/dogecoin/dogecoin.git
./autogen.sh ./configure --without-gui make strip src/dogecoind src/dogecoin-cli src/dogecoin-tx cp -a src/dogecoind src/dogecoin-cli src/dogecoin-tx ~/bin
Go back home and try to start Dogecoin:
It will come back with an error stating that you need a username and password for "rpcuser". I usually copy the two lines suggesting username and password to paste it into the dogecoin.config file:
nano -w .dogecoin/dogecoin.conf
You can also add extra nodes that will help your node to find the blockchain. If you have other wallets in your private network it's perfect to add them here as they will have low latency and help you securing blocks that you find.
The smallest droplet on Digitalocean has only 20GB and the Dogecoin blockchain takes 16GB alone. The droplet will soon run full, but the bigger droplet costs twice as much. To make the full blockchain fit at least for a few weeks so that it can be tested, I suggest the following:
Remove things we don't need:
apt-get autoclean apt-get clean apt-get autoremove cd ~ rm -r dogecoin
Reduce the generous swap file:
swapoff -a rm -f /mnt/myswap.swap dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=1024 mkswap /mnt/myswap.swap swapon /mnt/myswap.swap
To see available memory:
To see available diskspace:
Can also reduce the maxconnections setting in .dogecoin/dogecoin.conf to avoid the swapspace running out of memory.
listen=1 daemon=1 server=1 rpcallowip=127.0.0.1 maxconnections=8
If dogecoind is crashing shortly after start, try to reindex the blockchain or sync the node without wallet.