Manual Deployment documentation.
Requirements:
- Debian or Ubuntu x64 host
- Docker installed
- Port 56740 should be open and available from outside
Expand terminal window for better redability.
Run master image persistently:
$ docker run -it -d -p 56740:56740 --name MASTER dogecash/main-master_x64
Start configuration script, we need to provide masternode private key and external IP address:
$ docker exec -u 0 -it MASTER dogecash.sh 'MASTERNODE PRIV KEY' 'EXTERNAL IP'
Script download full chain snapshot, that can take a long time, depending on your internet connection, for modern VPS host it should not take more than 1 minute or 2.
Start masternode:
$ docker exec -u dogecash -it MASTER run.sh
Wait for the MN to fully sync with the chain ...
Start node from wallet, done.
There comes a time when you have to choose between turning the page or just closing the book.
Run more nodes: ( setting up private network )
All steps are the same as we did with master container, except no need to provide external IP and we won't open port to outside.
Names can be absolutely your choice, like DOGE is the MASTER and CASH is a SLAVE, up to you. For sake of simplicity we going to use SLAVE name as example.
Run container:
$ docker run -it -d --name SLAVE dogecash/main-slave_x64
Start configuration:
docker exec -u 0 -it SLAVE dogecash.sh 'MASTERNODE PRIV KEY'
If you fail at some step or want to learn more by trying different utilities included in the package, here is the way to start from scratch, these commands remove ALL containers and images data and bring docker to virgin state as if it was just installed.
notice: you should stop container before removing it's data, otherwise only offline containers data will be removed.
docker stop MASTER - stop container by NAME ( MASTER in this example )
docker system prune -a - clear up all docker system
docker volume prune - remove all created volumes
docker container prune - remove all containers
Tools documentation:
Most of this tools should be run as root except bootstrap.sh ( -u 0 )
dogecash.sh
One liner all in one setup to run masternode and instantly sync with network.
It's a mandatory recommendation to use this script and avoid any additional setup manipulations.
It will download full chain snapshot, it can take long time and it depends on connection speed. With modern VPS providers should not take longer than about 1 minute or 2.
Only works as root:
docker exec -u 0 -it MASTER dogecash.sh <MASTERNODE PRIVATE KEY HERE>
snapshot.sh
Wipe ALL chain storage and download full stapshot to provide up to block synchronisation. Can take a long time, it depends on connection speed. With modern VPS providers should not take longer than 1 minute or 2.
bootstrap.dat will be deleted, so use in appropriate order !
Only works as root user:
docker exec -u 0 -it MASTER snapshot.sh
bootstrap.sh
Download bootstrap.dat into the DATA folder. Script will not wipe anything, so use wipe.sh before to support your needs.
Use with this command, should not run as root:
docker exec -u dogecash -it MASTER bootstrap.sh
wipe.sh
For advanced users only !
Script will wipe all sort of things, depends on your needs, it can clear addnodes from config, wipe all chain data, delete wllet.dat, delete bootstrap.dat.old or bootstrap.dat to free space above 200M, wipe daemon config to initial stage.
available commands:
wipe.sh stop - stop daemon
wipe.sh data - remove all chain and database data
wipe.sh wallet - remove wallet.dat ( becareful )
wipe.sh bootstrap - removing bootstrap if present ( make container more then 200M lighter )
wipe.sh addnode - remove all addnodes entry
wipe.sh config - remove everything from config, including private node key ( becareful )
If you wipe config this will make node non-functional, so run dogecash.sh to recreate ( recommended ).
This will only work as container root user:'
docker exec -u 0 -it MASTER wipe.sh <option1> <option2> <option3> <option4> ...
Example:
docker exec -u 0 -it MASTER wipe.sh stop data addnode
Debugging and additional commands:
Check ALL containers include offline:
docker container ls -a
Connect to bash in case we need to change something as dogecash user:
docker exec -u dogecash -it <CONTAINER_NAME> bash
Stop and Start container:
( all data are always saved ):
docker stop --time=45 <CONTAINER_NAME>
docker start <CONTAINER_NAME>
Get container IP address:
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <CONTAINER_NAME>
Passing commands to container:
docker exec -u dogecash -it MASTER dogecash-cli getinfo
^^ -u 0 for root !
docker exec -u dogecash -it MASTER dogecash-cli getpeerinfo
^^ everything after container name is the command.
If we need to run one command for all instances:
for i in c1 dm1 dm2 ds1 ds2 gtm_m gtm_sl; do docker exec -u <username> -it $i /bin/bash -c "whatever we need to do"; done
Remove image for people with low HDD space:
docker image rm -f <IMAGE NAME OR ID>
Troubleshooting docker activity:
sudo journalctl -u docker
sudo journalctl -u docker -f
journalctl -xn -u docker | less
Check logs:
docker logs $container_id>