Storage Node Operators Storj V3

Storage Node Operators Storj V3

Awhile ago I was a node operator on Storj’s previous decentralized storage network that was meant to compete with the likes of Amazon’s storage services…

Awhile ago I was a node operator on Storj’s previous decentralized storage network that was meant to compete with the likes of Amazon’s storage services…

Due to <insert Storj’s history> it was no longer profitable and shortly after no longer available to run your own Storj nodes as Storj itself was under going changes. Not saying it’s profitable now, not saying it isn’t. I’m doing this for the pure badassery of it all.

Edit: My memory was hazy — it was always possible to run a V2 node: “we (Storj) did limit the upload of new data and new developer accounts”

Why? To earn STORJ — an ERC-20 utility token hosted on the Ethereum blockchain.

I, myself, am in the middle of setting up my node. Currently waiting for rsync to finish so I can re-purpose my 8TB HDD for Storj.

Onward with the tutorial.

If you don’t have your official invite received in your email, you cannot currently join the network!

I’m going to make this as brief as possible, which assumes you have Networking, Linux, and various other hardware/software skills already obtained. Or you know how to Google…

Things you need:
  • Raspberry Pi 3 (sd card & power supply)
  • 8TB External HDD via USB (min 500GB needed)
  • Stable high speed internet (minimums: 25 Mbps down/5 Mbps up, 2TB bandwidth/month)

Pi Setup

You’ll need to enable ssh access to your Pi in one of two ways:

  • Drop a sshfile under the boot partition

or

  • Login as pi:raspberry and run the command raspi-config
    Under Interfaces, enable ssh. sudo reboot to confirm you can ssh into your Pi.

Change your password using passwd

Install ufw

Allow the proper ports & sudo ufw enable to turn on the firewall

sudo ufw allow ssh // SSH port (default 22)

sudo ufw allow 28967 // Default Storj Port

sudo ufw allow 14002 // GUI Dashboard

(If you already turned on the firewall before running the above commands, hit your pi with this command to reload the new rules: sudo ufw reload)

At this point we have a secured (behind your router I’m assuming else you may want to dabble with ssh keys instead of plain-jane passwords) Raspberry Pi 3 Ready for some software.

Don’t forget to setup a static IP for your Pi device on the primary (ethernet > wifi recommended) network. Setup port forwarding to this IP on the port used below: 28967.

Hit your Pi with sudo apt update && sudo apt upgrade

Install Docker

curl -sSL https://get.docker.com | sh

Pull the Storj Image

docker pull storjlabs/sotragenode:beta

Create a script to run docker with proper parameters

nano storjNode.sh

Contents:

docker run -d --restart always -p 28967:28967 -p 14002:14002 \
-e WALLET="0x0000…." \
-e EMAIL="[email protected]" \
-e ADDRESS="externaladdress:28967" \
-e BANDWIDTH="32TB" \
-e STORAGE="7TB" \
--memory=800m \
--log-opt max-size=50m \ 
--log-opt max-file=10 \
--mount type=bind,source=/home/pi/.local/share/storj/identity/storagenode,destination=/app/identity \
--mount type=bind,source=/mnt/storagenode,destination=/app/config \
--name storagenode storjlabs/storagenode:beta

Hit the file with an executable permission change

sudo chmod +X storjNode.sh

Pause.
At this point we have everything but …

  1. 8TB HDD connected & configured
  2. Your Storj Node Identity files on the Pi’s SD card

HDD Setup

Make sure no important files on stored on this drive!
!!! These commands will wipe the drive !!!

Plug in your drive. Leave unmounted.

Make sure this path exists!/mnt/storagenode

mkdir /mnt/storagenode

Find your HDD: sudo fdisk -l

Wipe Partitions:

sudo fdisk /dev/sdX  // enters fdisk utility 
p // print out partition(s)
d // delete partition(s), run several times to delete all
n // new partition, (default partition number) enter, 
  // (default first sector) enter, (default last sector) enter
w // write changes to disk
// Create ext4 files system
sudo mkfs.ext4 /dev/sdXN  // Ex: /dev/sda1 (sda = device) 
                          //               (1 = partition)
// Mount device at boot
// Side Note: it's bad practice to use "/dev/sda1" to mount as these // are "pointers" to the UUID of the partition. A reboot when      // different devices are detected can change which "dev/sdXN" gets // assigned to the UUID. Breaking the configuration. 
// List UUIDs
sudo blkid 
// Copy the proper UUID listed for your partition.
// Open fstab
sudo nano /etc/fstab
// add this line, save and exit - filling the UUID with the above
UUID=3b5d3076-caa2-4ad2-9ffb-c8e6263b8e06  /mnt/storagenode ext4    defaults,nofail 0 2
sudo mount -a // mount the drive
df -h // display disk free space by Filesystem, size, used, avail,
      // use%, Mounted on

Reboot your device, re-run the last command above for a sanity check!

Bare with me, we are almost there!

Identity Setup

Look back at the storjNode.sh contents.
Near the bottom

/home/pi/.local/share/storj/identity/storagenode

Make sure this path exists!

mkdir --parents ~/.local/share/storj/identity/storagenode

Now lets create that identity!
You want to use a much more powerful computer (your desktop or laptop) as it will reportedly take the Pi device 24 hours to create.

Download the identity binary for your platform:

Assuming Windows, open cm or powershell and run

./identity_windows_amd64.exe create storagenode

These file are located here:

$Env:APPDATA/Storj/Identity/storagenode

Sign your identity with your official invite!

Format: email:key replace the text below with yours

./identity_windows_amd64.exe authorize storagenode [email protected]:ohihioHiohohIOhUyTUfyufVJHvufUyvJHvyFTYdhVJGionOoHib

Copy these files (via WinSCP) to the Pi directory we created earlier.

~/.local/share/storj/identity/storagenode

Run it!

sudo ./storjNode.sh

Check status: sudo docker ps

Navigate to the UI screen → IP:14002

#MicDrop

Bonus Tip:
Want your docker image to update automatically?
Hit your Pi terminal with this:

sudo docker run -d --restart=always --name watchtower -v /var/run/docker.sock:/var/run/docker.sock storjlabs/watchtower storagenode watchtower --stop-timeout 300s --interval 21600

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

What’s new in HTML6

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top Node.js Development Companies and Expert NodeJS Developers

Top Node.js Development Companies and Expert NodeJS Developers

A thoroughly researched list of top NodeJS development companies with ratings & reviews to help hire the best Node.JS developers who provide development services and solutions across the world. List of Leading Node.js development Service Providers...

A thoroughly researched list of top NodeJS development companies with ratings & reviews to help hire the best Node.JS developers who provide development services and solutions across the world.
List of Leading Node.js development Service Providers & Developers...

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step)

Node.js for Beginners - Learn Node.js from Scratch (Step by Step) - Learn the basics of Node.js. This Node.js tutorial will guide you step by step so that you will learn basics and theory of every part. Learn to use Node.js like a professional. You’ll learn: Basic Of Node, Modules, NPM In Node, Event, Email, Uploading File, Advance Of Node.

Node.js for Beginners

Learn Node.js from Scratch (Step by Step)

Welcome to my course "Node.js for Beginners - Learn Node.js from Scratch". This course will guide you step by step so that you will learn basics and theory of every part. This course contain hands on example so that you can understand coding in Node.js better. If you have no previous knowledge or experience in Node.js, you will like that the course begins with Node.js basics. otherwise if you have few experience in programming in Node.js, this course can help you learn some new information . This course contain hands on practical examples without neglecting theory and basics. Learn to use Node.js like a professional. This comprehensive course will allow to work on the real world as an expert!
What you’ll learn:

  • Basic Of Node
  • Modules
  • NPM In Node
  • Event
  • Email
  • Uploading File
  • Advance Of Node

Top 7 Most Popular Node.js Frameworks You Should Know

Top 7 Most Popular Node.js Frameworks You Should Know

Node.js is an open-source, cross-platform, runtime environment that allows developers to run JavaScript outside of a browser. In this post, you'll see top 7 of the most popular Node frameworks at this point in time (ranked from high to low by GitHub stars).

Node.js is an open-source, cross-platform, runtime environment that allows developers to run JavaScript outside of a browser.

One of the main advantages of Node is that it enables developers to use JavaScript on both the front-end and the back-end of an application. This not only makes the source code of any app cleaner and more consistent, but it significantly speeds up app development too, as developers only need to use one language.

Node is fast, scalable, and easy to get started with. Its default package manager is npm, which means it also sports the largest ecosystem of open-source libraries. Node is used by companies such as NASA, Uber, Netflix, and Walmart.

But Node doesn't come alone. It comes with a plethora of frameworks. A Node framework can be pictured as the external scaffolding that you can build your app in. These frameworks are built on top of Node and extend the technology's functionality, mostly by making apps easier to prototype and develop, while also making them faster and more scalable.

Below are 7of the most popular Node frameworks at this point in time (ranked from high to low by GitHub stars).

Express

With over 43,000 GitHub stars, Express is the most popular Node framework. It brands itself as a fast, unopinionated, and minimalist framework. Express acts as middleware: it helps set up and configure routes to send and receive requests between the front-end and the database of an app.

Express provides lightweight, powerful tools for HTTP servers. It's a great framework for single-page apps, websites, hybrids, or public HTTP APIs. It supports over fourteen different template engines, so developers aren't forced into any specific ORM.

Meteor

Meteor is a full-stack JavaScript platform. It allows developers to build real-time web apps, i.e. apps where code changes are pushed to all browsers and devices in real-time. Additionally, servers send data over the wire, instead of HTML. The client renders the data.

The project has over 41,000 GitHub stars and is built to power large projects. Meteor is used by companies such as Mazda, Honeywell, Qualcomm, and IKEA. It has excellent documentation and a strong community behind it.

Koa

Koa is built by the same team that built Express. It uses ES6 methods that allow developers to work without callbacks. Developers also have more control over error-handling. Koa has no middleware within its core, which means that developers have more control over configuration, but which means that traditional Node middleware (e.g. req, res, next) won't work with Koa.

Koa already has over 26,000 GitHub stars. The Express developers built Koa because they wanted a lighter framework that was more expressive and more robust than Express. You can find out more about the differences between Koa and Express here.

Sails

Sails is a real-time, MVC framework for Node that's built on Express. It supports auto-generated REST APIs and comes with an easy WebSocket integration.

The project has over 20,000 stars on GitHub and is compatible with almost all databases (MySQL, MongoDB, PostgreSQL, Redis). It's also compatible with most front-end technologies (Angular, iOS, Android, React, and even Windows Phone).

Nest

Nest has over 15,000 GitHub stars. It uses progressive JavaScript and is built with TypeScript, which means it comes with strong typing. It combines elements of object-oriented programming, functional programming, and functional reactive programming.

Nest is packaged in such a way it serves as a complete development kit for writing enterprise-level apps. The framework uses Express, but is compatible with a wide range of other libraries.

LoopBack

LoopBack is a framework that allows developers to quickly create REST APIs. It has an easy-to-use CLI wizard and allows developers to create models either on their schema or dynamically. It also has a built-in API explorer.

LoopBack has over 12,000 GitHub stars and is used by companies such as GoDaddy, Symantec, and the Bank of America. It's compatible with many REST services and a wide variety of databases (MongoDB, Oracle, MySQL, PostgreSQL).

Hapi

Similar to Express, hapi serves data by intermediating between server-side and client-side. As such, it's can serve as a substitute for Express. Hapi allows developers to focus on writing reusable app logic in a modular and prescriptive fashion.

The project has over 11,000 GitHub stars. It has built-in support for input validation, caching, authentication, and more. Hapi was originally developed to handle all of Walmart's mobile traffic during Black Friday.