Backup and restore the gateway key from your Helium Hotspot
Marc Pous
Posted on February 26, 2022
If you have a Helium Hotspot it's very important to backup the gateway_key of your hotspot. If you loose this key and something happen to your SD card or secure element, you will not be able to use this hotspot anymore. In conclusion, backup your key, store it in a safe place and you will be able to restore it in the future in case it's needed.
This tutorial it's compatible with DIY Helium Hotspots
and Data-Only Hotspots
managed with balena.
DIY Helium Hotspots
Backup your swarm key
- Open an SSH session to the "host-os"
- Type this command and keep note of the (YOUR INSTANCE)_miner-data information:
ls /var/lib/docker/volumes
- Type this command to get a link to download the swarm key (note to replace the YOUR INSTANCE part with the container number that you got from the previous command)
curl -F "file=@/var/lib/docker/volumes/(YOUR INSTANCE)_miner-data/_data/miner/swarm_key" https://file.io
- Use the outputted file.io link to securely download your swarm key. The file is deleted once downloaded.
Restore your swarm key on your new hotspot
- Open an SSH session to the "host-os"
- Type this command and keep note of the (YOUR INSTANCE)_miner-data information:
ls /var/lib/docker/volumes
- Navigate to where the swarm_key is stored
cd /var/lib/docker/volumes/(YOUR INSTANCE)_miner-data/_data/miner/
- Remove the original swarm_key file
rm swarm_key
- Upload your swarm_key that you wish to restore onto file.io and do
curl -LJO [FILE.IO UPLOAD LINK]
- Reboot miner and you will see it restored successfully.
Helium Data-Only Hotspot
To build the Helium Data-Only Hotspot using a Raspberry Pi and balena follow these intructions
Backup your gateway_key.bin file
- Open an SSH session to the "host-os" on balenaCloud Terminal.
- Type this command and keep note of the (YOUR INSTANCE)_miner-storage:
ls /var/lib/docker/volumes
- Type this command to get a link to download the gateway key (note to replace the YOUR INSTANCE part with the container number that you got from the previous command)
curl -F "file=@/var/lib/docker/volumes/(YOUR INSTANCE)_miner-storage/_data#/gateway_key.bin" https://file.io
- Use the outputted file.io link to securely download your
swarm key
. The link only works one time.
Restore your gateway_key.bin file on your new hotspot
- Open an SSH session to the "host-os" on balenaCloud Terminal.
- Type this command and keep note of the (YOUR INSTANCE)_miner-storage information:
ls /var/lib/docker/volumes
- Navigate to where the swarm_key is stored
cd /var/lib/docker/volumes/(YOUR INSTANCE)_miner-storage/_data#/
- Remove the original gateway_key.bin file
rm gateway_key.bin
- Upload your gateway_key.bin that you wish to restore onto file.io and do
curl -LJO [FILE.IO UPLOAD LINK]
- Reboot miner and you will see it restored and working :)
Acknowledgements
Thank you for the inspiration made by bottxrnife and Mithun. Also give the credits to olieman.eth for the picture of the blogpost.
If you have other methods to backup and restore gateway keys, feel free to share them on the comments.
Posted on February 26, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 29, 2024