Enhancing Helium Syncing Speeds with a Blockchain Cache
Was this helpful?
Was this helpful?
Improve Helium Syncing Speeds by Creating a Helium Blockchain Cache
Today, we will demonstrate how to install the official Helium Miner Docker container on a VPS or Linux virtual machine. This approach offers the advantage of having a centralized and secure copy of the Helium blockchain, under our control. By implementing this setup, we will also enhance syncing speeds by having multiple devices download blockchain data. This solution is highly scalable and can accommodate multiple miners, simply by duplicating the cron script outlined below.
General Linux Knowledge
A Port Forwarded and Not Relayed Helium Miner
A VPS or Linux VM
I'm going to assume that you have some basic linux skills and know how to set up a VPS or linux vm. If you need some help, check out the following resources to create a ubuntu VPS for as little as $5/month:
> Note: Anywhere where you see "xxx.xxx.xxx.xxx" replace it with your helium miner's public IPv4 address. Run the following commands to install docker and install the docker, the helium docker container, and watchtower for automatic updates:
Now we have the miner docker container setup, we'll need to set up syncing to and from your helium miners. Modify this script with your helium miners public IPv4 addresses:
then run nano ./miner_sync.sh
paste your modified script and hit ctrl+x
and y
to save.
Run the following command:
Select your editor of choice, then paste the following as the last line of the script. */30 * * * * ~/miner_sync.sh >> ~/synclog.txt
Save the file and exit.
Now the script will run every thirty minutes and sync from and to each of your miners.
Now we need to set up a cron job to run this every 30 minutes at least. How long is up to you but use to figure out the cron syntax to change the interval if you'd like.