Become a Storj Node Operator: Step-by-step tutorial
Author: Yaroslav Koisa
Created on 2 November 2020
Last edit commited on 6 January 2021
Table of Contents
1. Introduction to Storj
Storj is an S3-compatible platform and suite of decentralized applications that allows you to store data in a secure and decentralized manner. Storj pays you for your unused hard drive capacity and bandwidth in STORJ tokens!
Storj is a very nice project with cool concept of data encryption and decentralisation, but I feel like their documentation is overwhelming for new users, especially for those who spent their entire life with Windows OS family or fancy GUIs that abstract the back end. Then one of our subscribers (hi Paul) brought to my attention that he was interested in getting into Storj mining (or hosting, however you want to call it), but was unable to start because of confusing instructions on the main project website. So now comes this blog post (and YouTube video) which is made for people who don’t fully understand the concept of servers, linux, docker and so on, but they really want to contribute to a Storj storage pool and get some rewards in return, of cource.
So where do you start exactly? Well, that’s a good question, and now that you know what the Storj is, let’s dive into the Storj mining.
Link in the form of text:
If you just made up your mind and decided you’d like to start mining Storj, let me cover some basics for you first then. To mine Storj (or host and share Storj data in other words) you need to become a Storj Node Operator. Anyone can do that, the process actually only requires few things, and about 40 minutes of your time. This guide will cover Debian 10 and Raspbian 10/Raspberry Pi OS 10 only, to make it less complicated.
If you need a walk through for any other operating system, please checkout the official documentation.
2. Requirements to become a Storj Node Operator
I am about to walk you through the Storj Node enrolment and installation, but before that make sure you meet the criteria required by the project.
3. Auth token enrolment process and Storj identity generation
If you can pass all the requirements, it’s time for an enrolment process and identity generation. This step was put in place by Storj team in the latest v3 release, to prevent bad actors from easily entering the network. To get the auth token and generate your Storj identity, you need next:
- A working email address, which you’ll use to sing up for an Auth Token. At the earlier Storj v3 development stages I had to wait up to 7 days to get it, but since project got out of beta, tokens usually arrive instantly. To get your own token go to https://documentation.storj.io/before-you-begin/auth-token click “Sign up” and follow the instructions on a page.
- A working installation of Debian 10 or Raspbian 10 (Raspberry Pi OS). Installation guides for these systems are available all over the YouTube.
3.1. Generate your identity
After you receive your auth token, SSH into your debian system and execute next command sequence:
For Debian 10 x64 (VMs or regular computers/laptops)
##login as root, for example: su or sudo su apt update && apt install -y tmux curl unzip cd /root/ curl -L https://github.com/storj/storj/releases/latest/download/identity_linux_amd64.zip -o identity_linux_amd64.zip unzip -o identity_linux_amd64.zip chmod +x identity tmux new "./identity create storagenode"
For Raspbian 10/Raspberry Pi OS 10 (for Raspberry Pi)
##login as root, for example: su or sudo su apt update && apt install -y tmux curl unzip cd /root/ curl -L https://github.com/storj/storj/releases/latest/download/identity_linux_arm.zip -o identity_linux_arm.zip unzip -o identity_linux_arm.zip chmod +x identity tmux new "./identity create storagenode"
Keep the process running until it finds the key. It might take from few minutes, up to few days. You should see something like this:
3.2. Authorize the identity
With an auth token and identity ready to use, we can authorise our identity file on the Storj Network:
./identity authorize storagenode email:characterstring ##For example: ./identity authorize storagenode firstname.lastname@example.org:4UGHKQDP42LNFW5YGM8CPRL84HKXL88YAVZERXCRWTMFZP77DC7
3.3. Confirm the identity
grep -c BEGIN ~/.local/share/storj/identity/storagenode/ca.cert grep -c BEGIN ~/.local/share/storj/identity/storagenode/identity.cert
The first command should return 2, and the second command should return 3:
If your numbers are different, then authorizing the identity was not successful. Please try confirming the identity once again.
Always backup your identity files! This allows you to restore your Node in case of an unfortunate hardware or OS incident.
Your identity folder is located in:
4. Port forwarding
At the moment there is only 1 port you need to forward, and that port is: 28967. If you require a dashboard access over the internet, then port-forward also this one: 14002. As far as I am aware, there are no security issues in doing so, but it’s not usually recommended (I mean exposing the dashboard access port to the internet).
5. Install Docker
curl -s https://get.docker.com/ | bash
Docker is designed to run software inside containers, which are something similar to virtual machines, but much more resource efficient (and a little less secure). Storj Node software was made to run inside a docker container, which works best on linux, that’s why it is not recommended to run it on Windows or Mac systems.
6. Run my helper script to start the Storj Node and watchtower docker containers
Don't forget to add it to /etc/fstab, to mount it automatically on every system start up. Information on how to it, is included in the liked article.
Run oneliner below, which will do the next:
- Will ask you for your wallet address, email address, IP address of your node or dynamic DNS address, how much storage you’d like to share, and the storage path.
- Will check if all the entries were populated, but it will not check if they are right, be extra careful when you are typing them in.
- Will create a file /root/storj.sh with all the entries required. This shell file will be responsible to start and restart your storage node in the future.
- Will create a record inside crontab to autostart and update Storj Node Software during the system startup.
- Will print out the Dashboard address at the end, for you to easily access it.
curl -s https://raw.githubusercontent.com/yaroslav-gwit/storj-node-helper-script/main/storj-node-helper-script.sh -o storj-node-helper-script.sh && bash storj-node-helper-script.sh
Just as a side note: if you run this script again, it will just update the values you’ll give it. It’s safe (and recommended) to use it every time you need to expand your storage, change the wallet address, IP or DNS address, etc.
7. Final words
By now you should have your Storj Node up and running. SSH into this box time to time and apply security patches (
apt update && apt upgrade ), remember it’s exposed to the internet. Ideally, read on how to make Debian auto-update itself with all the security patches automatically, every night. Would love to leave feedback? Get in touch with us in the video comments on YouTube or via email: email@example.com.
Consider donating towards our project, to support a future content release