How To Run A DIY Helium Miner on DigitalOcean

Utilising the power of DigitalOcean to deploy a DIY miner on the Helium network

Get $100 credit when using the selected link https://m.do.co/c/8555d4e0c259

Unlike the all in one official helium hotspot, setting up a DIY hotspot for the helium network is split into two parts.

The first part is setting up a miner to connect to the helium network on a server, and in this tutorial, I will show you how to do this on DigitalOcean.

DigitalOcean offers $100 in free credit and their base droplet for $5 with 1 CPU core and 1GB of ram is enough for you to get started and the credit works out to 20 months of free running.

$100 in free DigitalOcean credit https://m.do.co/c/8555d4e0c259

Once signed up to to DigitalOcean you can create a droplet. We're going to select ubuntu, and the closest region to you (in my case london). For ease of use here, we're going to select password under authentication.

Once you have set a password, click the create button.

Once created, make note of the public IP, we'll need this to connect to the server via SSH.

To login to the droplet on windows via SSH, I recommend putty.
https://www.chiark.greenend.org.uk/~sgtatham/putty/

Open the putty app, enter your servers IP and click open. You will be prompted to enter a username which is root.

Enter your password previously chosen but a note here, the field will not show any input when you're entering it, so enter your password and press enter to submit it.

You are now in the main command line for the droplet and can begin the installation process for the helium miner software.

First, update the package manager registry:

sudo apt-get update

Now we open up ports for the helium miner in the firewall

ufw allow 44158
ufw allow 1680

Next we install Docker which manages and deploys the image for the helium miner:

sudo apt-get install docker.io

At this stage, you're logged in as root which is a bad idea. I suggest you create a user and if you ever need to login with via ssh in the future make sure you use this user:

useradd miner

You will be prompted for a password, and user information, on the user information section feel free to press enter to skip through.

add the user to the sudo group

usermod -aG sudo miner

Next we make sure the docker user can perform commands without the need for sudo

sudo usermod -aG docker miner

At this point, login with the new user you just created.

SU miner

Now we're going to create a directory for the miner to store files.

mkdir ~/miner_data

We now need to visit https://quay.io/repository/team-helium/miner?tab=tags and grab the latest version of the miner. For our case, we're going to use the latest image: miner-amd64_2020.09.21.1_GA. when selecting the new version, note that ARM is for Pi's and others AMD is for both intel and amd x86 systems.

MAKE SURE YOU VISIT THE URL AND GRAB THE LATEST VERSION - then in the following command, update the last line to match the latest version.

Also in the following command, it's important you set the REGION_OVERRIDE= field to the right one, here is a list of options:

US915 | EU868 | EU433 | CN470 | CN779 | AU915 | AS923 | KR920 | IN865

In my case, I'm in Europe, so I'm using the EU868

docker run -d \
--env REGION_OVERRIDE=EU868 \
--restart always \
--publish 1680:1680/udp \
--publish 44158:44158/tcp \
--name miner \
--mount type=bind,source=/home/miner/miner_data,target=/var/data \
quay.io/team-helium/miner:miner-amd64_2020.09.21.1_GA

Run the command above, and that's it, your miner is now on the helium network! Your miner should be active, and you can test this by running:

docker exec miner miner info height

this will show the block height and currently synced height

Showing connected peers:

docker exec miner miner peer book -s

Check the log to see progress live!

docker exec miner tail -F /var/log/miner/console.log

press ctrl + x to close

Backing up your Swarm key

It's important you back this key up, if you need to upgrade the miner, or move it, you'll need this private key to do so.

cp swarm_key ~/swarm_key.backup

This gives us a local backup on the server, but we're going to download it as a second backup.

python -m SimpleHTTPServer 8000

Visit your servers IP eg http://SERVER_IP:8000 in the browser to have a directory listing, select the swarm_key and download it.

Once done, press ctrl + x in ssh to close the web server, we don't want to leave this open.

Author

Neil Skoglund
Avid WordPress fan and founder of WPOwl - home of the best managed WordPress hosting. Neil has 3 passions in life,  coding, guitars & family.

Leave a Reply

Your email address will not be published. Required fields are marked *

Registered in England and Wales with company number 12201331.

Registered Office: 252 High Street, Aldershot, 
United Kingdom, GU12 4LP
How To Run A DIY Helium Miner on DigitalOcean | WPOwlHow To Run A DIY Helium Miner on DigitalOcean | WPOwlHow To Run A DIY Helium Miner on DigitalOcean | WPOwl