How To Host A Garlicoin Full Node
How to Host a Garlicoin Full Node on a Ubuntu 20.04 VPS
Why host a Garlicoin Full Node
- Bragging rights
- Interact closest to Garlicoin blockchain
- Create a faucet Demo: How to create a Faucet
If you are instead looking to:
- Create a wallet or look at an existing wallet => Go to Main Page and select the guide for creating a wallet.
Prepare the Host Server
- 1 vCPU or better
- 4 GB of Memory
- 2GB systems may work, but you will need to configure swap space
- ACL or Firewall open to post 42069
Update the Server
sudo apt update
sudo apt upgrade
sudo apt install systemd
Create a Garlicoin User
- Create a new user that will run your node service. This creates a user named "garlicoin".
sudo adduser garlicoin
- Then switch to the new user.
sudo su - garlicoin
Download & Configure garlicoind
Make sure to download the correct files for your system architecture. You can check them here: https://github.com/GarlicoinOrg/Garlicoin/releases
- Download the package to the home folder of the user you created.
- Then untar the package
tar xvzf garlicoin-0.18.0-x86_64-linux-gnu.tar.gz
- Then create a folder to host the garlicoind data and configurations
- Then create the
- Paste in the following
txindex=1 rpcuser=<username> rpcpassword=<password> rpcallowip=127.0.0.1 server=1 listen=1 daemon=1 addnode=freshgrlc.net
- Change the username and password to something secure. They can be arbitrary values. Change the rpcallowip to another server's IP address if you plan to use this remotely.
- Save & exit, then exit to go back to the user with sudo privileges
Configure the Service
- Go to the systemd folder
- Create the service file
sudo touch garlicoind.service
sudo nano garlicoind.service
- Paste in the following text, edited for your purposes
[Unit] Description=garlicoin After=network.target [Service] Type=forking User=garlicoin Group=garlicoin Environment=GARLICOIN_PID=/home/garlicoin/.garlicoin/garlicoin.pid Environment=GARLICOIN_HOME=/home/garlicoin/.garlicoin ExecStart=/home/garlicoin/garlicoin-0.18.0/bin/garlicoind ExecStop=/bin/kill -15 $MAINPID [Install] WantedBy=multi-user.target
- Save & exit, then reload the daemon, enable & start the service.
- IMPORTANT, if you want to use Bootstrap (optional), see the section below, and when finished come back here.
sudo systemctl daemon-reload
sudo systemctl enable garlicoind.service
sudo systemctl start garlicoind.service
Checking Sync Progress
- The progress can be checked via the user running the service
sudo su - garlicoin
- If syncing does not progress, run the following. You can also replace "freshgrlc.net" with any known server.
/home/garlicoin/garlicoin-0.18.0/bin/garlicoin-cli addnode freshgrlc.net onetry
A bootstrap of the Garlicoin blockchain can be found on the Garlicoin.org Website
Start Garlicoind with Bootstrap
- After install but before garlicoind is run for the first time, switch to a user with sudo privileges.
mv bootstrap.dat .garlicoin/bootstrap.dat
- Then start garlicoind with the following
- After garlicoind syncs for the first time, you can kill the process and start it as a service.
Node not syncing?
2021-05-05 19:42:18 0 addresses found from DNS seeds 2021-05-05 19:42:18 dnsseed thread exit 2021-05-05 19:43:18 Adding fixed seed nodes as DNS doesn't seem to be available.
- Check if port 42069 is open to inbound traffic. It may be blocked by a firewall or by security groups (AWS).
- Check ~/.garlicoin/debug.log for info. Some Connection Refused should be fine but there should be successful RPC connections.
- To get more info:
- To manually connect a peer, run:
garlicoin-cli addnode freshgrlc.net onetry