My first storagenode setup script

Hi,

I’ve been starting a few Linux Docker nodes lately and found the process quite tedious since I’m not a Linux expert - I had to google almost every command every time I set up a new node :smiley:

Here’s my solution: a script to remember all the commands for me!

(Main script is storj-node-setup.sh)

Features:

  • can generate an identity for you (optional)
  • can authorize your pregenerated identity (optional)
  • cleans, partitions and formats your HDD to ext4 for you
  • sets reserved space for the HDD to zero
  • generates a name from HDD vendor and SN
  • set the ext4 filesystem label to the generated name
  • adds the new filesystem to fstab
  • installs docker if needed (currently works only in Ubuntu)
  • asks user for storagenode port, dashboard port, wallet address, email address and external address
  • calculates HDD space for Storj automatically, reserving the recommended 10%
  • generates and runs the docker run command
  • sets up Watchtower for all docker images

There are probably a lot of bugs and weird things since bash scripting is not really something I’m an expert at so feel free to report them.

This took SO MANY HOURS to put together but at least it might save me some time in the future!

8 Likes

Haven’t tested it but it sounds absolutely awesome!
This is what I was suggesting to have for a RPI setup, so non-tech/linux-savy people can easily set up a node.

1 Like

Nice!
I was actually also working on a script for ubuntu!

It’s here but it’s not finished yet :confused:

i’m gonna check yours right away!

Thanks for your work :slight_smile:

1 Like

Looks like we’ve been working on the same thing :grin:

Took a look at your script and your user input handling seems to be way nicer than mine. Mind if I steal that some time? :slight_smile:

Initially, I’m not a developper at all!
I took a look at your script too and it seems a way much clearer an modular :slight_smile:

If my work can help you do an even better script, feel free to steal as much as you want :slight_smile: (just keep a thought for me in your README file :relaxed:).

1 Like

Just a personal opinion (not an Storj one).
Adding a README to the repo will help people to use it and perhaps contribute to it.

6 Likes

Just a personal opinion (not an Storj one).
Adding a README to the repo will help people to use it and perhaps contribute to it.

Good point - I’ll try to remember to add a README!