Dogecoin Core is the official dogecoin wallet implementation and already operates as a full node by serving data to others. It's essential that volunteers operate full nodes otherwise the network would not function! If you already have Dogecoin Core on your computer, keeping it open for as many hours in the day as possible is already helping. However, you can go a step further by configuring a full node on a computer which operates 24/7 with unrestricted bandwidth.
Table of Contents
- VPS ☁️
- Installation
- Automatic Installer (experimental!) ✨
- Preparation 📚
- Downloading dogecoind ⬇️
- Configuring dogecoind 🔧
- Restricting bandwidth use with
maxuploadtarget
- Restricting bandwidth use with
- Downloading the blockchain ⬇️
- Creating a "dogecoin" user and systemd service 🔁
- Interacting with
dogecoind🔎
You can buy cheap(-ish) servers online at places like Digital Ocean, Linode or UpCloud. Best VPS under $10.
maxuploadtarget).
TODO: add comparison table
👍 Minimum:
- 2.5GB RAM*
- 80GB storage
- 40GB+ blockchain
- Operating system
- Unmetered internet connection
*2GB may be enough if you configure SWAP.
⭐️ Recommended:
- 2 cores
- 4GB RAM
More RAM generally means more blocks can be cached in memory and less reads from disk need to occur.
TODO: determine whether a Raspberry Pi or other SBC can be used.
Want to try out the automatic installer? Run this! (recommend to read the source code here)
curl https://raw.githubusercontent.com/incognitojam/dogecoin-full-node/main/test.sh | shWant to install it manually? You can follow the guide below ⬇️.
It's always a good idea to keep your packages up-to-date 🙂. We will use aria2 to download the bootstrap torrent later on.
sudo apt update && sudo apt upgrade -y
sudo apt install -y aria2We will get the latest Dogecoin Core binaries (1.14.3) and install them.
# Download and extract dogecoin binaries (including dogecoind)
wget "https://github.com/dogecoin/dogecoin/releases/download/v1.14.3/dogecoin-1.14.3-x86_64-linux-gnu.tar.gz" -O dogecoin.tar.gz
tar -zxvvf dogecoin.tar.gz
rm dogecoin.tar.gz
# Installing binaries
sudo install -m 0755 -o root -g root -t /usr/bin dogecoin-1.14.3/bin/*Here we download the template dogecoin.conf, set a secure rpcpassword and then move it to the configuration directory. Take a look inside dogecoin.conf to see the possible configuration options. I've already set some useful defaults:
- Increased max connections to 150 (default is 125, reduce this if your node is falling behind)
- Disabled wallet functionality (not required for full node)
- Added some extra nodes
# Download the template dogecoin.conf
wget https://raw.githubusercontent.com/incognitojam/dogecoin-full-node/main/dogecoin.conf
# Set a long random password for RPC
dogepw=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 64`
echo rpcpassword=$dogepw >> dogecoin.conf
mkdir -p /etc/dogecoin
mv dogecoin.conf /etc/dogecoinIf you want to change the configuration later, simply edit the configuration file at /etc/dogecoin/dogecoin.conf, save it, and then restart dogecoind.
You can reduce the network upload usage by setting a target for Dogecoin Core. This will limit the amount of data served each day.
sudo nano /etc/dogecoin/dogecoin.conf
# un-comment the line below to enable a max upload target.
# the number is measured in MiB per day.
# for example, if you have a 10TiB monthly limit on your VPS
# you could set this to: 10 TB / 30 = 9536740 MiB / 30 = 317890
# maxuploadtarget=100000
(Note: to save and exit nano press CTRL+X and then type y and hit Enter to confirm)
This torrent is a "bootstrap" for the blockchain, a copy of all the blocks you can use instead of getting them from the network (torrent is faster than the dogecoin core software right now).
This step will take a while, depending on your connection speed and the number of seeders of the torrent.
aria2c --seed-time=0 "magnet:?xt=urn:btih:d7a6e8b70bf50121ecf119be87684620ebd31198&dn=dogecoin-bootstrap-2021-04-11&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80"Go and make a cup of coffee! ☕
When it's done, you can move the bootstrap.dat to the Dogecoin Data directory.
# Create the data directory for dogecoind
mkdir -p /var/lib/dogecoind
# Move the bootstrap to the correct location and then delete the torrent folder
mv dogecoin-bootstrap-2021-04-11/bootstrap.dat /var/lib/dogecoind
rm -r dogecoin-bootstrap-2021-04-11
# Create the dogecoin user
sudo useradd -r -s /bin/false dogecoin
# Add the systemd service and enable it to start at boot
wget https://raw.githubusercontent.com/incognitojam/dogecoin-full-node/main/dogecoind.service
sudo cp dogecoind.service /etc/systemd/system/dogecoind.service
sudo chmod 644 /etc/systemd/system/dogecoind.service
sudo systemctl enable dogecoindNow that the service is created you can start it!
sudo systemctl start dogecoind
# Check the status
sudo systemctl status dogecoindYou can use dogecoin-cli to interact with the Dogecoin daemon. Make sure to provide the path to your config file so that it knows your rpcuser/password.
getinfo is a useful RPC command to get the current status. You can use it to monitor the current number of connections and the block height. The "blocks" will increase as the bootstrap is processed until it catches up with the network. You can check the current network block height at dogechain.info.
# Run getinfo
dogecoin-cli -conf=/etc/dogecoin/dogecoin.conf getinfo
# Manually addnode
dogecoin-cli -conf=/etc/dogecoin/dogecoin.conf addnode core0-eu.dogecoin.gg addIf it looks like the block height gets stuck (stops indexing the bootstrap, or stops syncing from the network) you can just restart the dogecoind service.
sudo systemctl restart dogecoind