Safe Network Node Installation Guide for ARM servers [Manjaro minimal]

Introduction

This guide will tell you how to install a safe network node on any server computer that runs on an ARM chip. Once running, you will earn safe network tokens. Good luck!

Note 1: For those of you who are absolute beginners when it comes to server computers.
A server computer is not necessarily any different from a client computer. Any computer can be a server computer. What’s often different about ‘server computers’ is that they often lacks support for monitors, speakers and other components aimed at human sensors. Server computers sit in a corner and uploads data to whomever requests it.

Requirements

Client computer

  • A Desktop or laptop

Server computer

Minimal

  • ARM computer (Raspberry Pi 4 in picture)
    • Motherboard
    • Case
    • Power Adapter
  • SD Card - (Endurable recommended)
  • SD Card reader
  • Ethernet cable

Highly recommended

  • A display-providing cable for your ARM server in case it loses connection:

    • Monitor with HDMI cable: USB-C in to HDMI out cable
    • Monitor with displayport cable: USB-C in to Disyplayport out cable (not in picture)
    • No monitor: Raspberry Pi Display (not in picture)
  • For those who use of the Raspberry Pi 4 as their server, the Raspberry Pi 4 Heatsink

Recommended (not in picture)

  • External storage

Steps

Step 1: Download, install and run Manjaro-arm-installer

For Manjaro Linux OS users

Simply install Manjaro ARM installer and run it:

sudo pacman -S manjaro-arm-installer
sudo manjaro-arm-installer

For Windows 10/11 users

Download chocolately. Chocolately is a package manager, which is like an app store full of free adless software. Go to https://chocolatey.org/ and follow the instruction. Once you have downloaded and installed chocolately, downloaded, installed and started choco-gui, you can search for docker-gui and press install.

Open docker-gui and install safenetworkcommunity/manjaro-arm-installer.
Then open manjaro-arm-installer.

For Mac OS users

– Todo

For Arch Linux OS users

Open your terminal and type:

sudo pacman -S docker
docker pull safenetworkcommunity/manjaro-arm-installer
docker -it manjaro-arm-installer

For Debian Linux OS users

Open your terminal and type:

sudo apt install docker
docker pull safenetworkcommunity/manjaro-arm-installer
docker -it manjaro-arm-installer

For Fedora Linux OS users

Open your terminal and type:

sudo yum install docker
docker pull safenetworkcommunity/manjaro-arm-installer
docker -it manjaro-arm-installer

Note 2: During your next step you will encounter choosing the drive where you want to install the OS.
Make sure that you’re not choosing your laptop/desktop drive.
It happened to me once and despite stopping the application from destroying all my files and folders in time, I still ended up deleting everything I held near and dear during the cleanup. :sob:

Note 3: There’s no need for difficult passwords right away, because we’re going to use SSH keys and then via SSH we can change those passwords.

WARNING! If you are not careful with one of the steps during the procedure below, you can overwrite or delete your entire computer. This link leads to an example of what could happen if you are not careful enough.

Step 2: Install Manjaro Minimal onto your SD card

Insert your SD card into your SD card reader and your SD card into any USB port.
Then choose the following:

YOUR_ARM_COMPUTER_MODEL (default: rpi 4)
minimal
YOUR_USERNAME (default: admin, example: folaht)
wheel,sys,audio,input,video,storage,lp,network,users,power
YOUR_FULLNAME (default: John Smith, example: Folât Pjêrsômêj)
SIMPLE_PASSWORD <- (default: password, example: môpâs)
REPEAT
SIMPLE_PASSWORD <- (default: password, example: môpâs)
REPEAT
your_microSD_drive_usually_sdc_or_sdb <- [READ WARNING ABOVE!]
btrfs
YOUR_TIMEZONE (default: UTC, example: Europe/Amsterdam)
YOUR_LOCALE (default: en_US, example: fr_BE)
YOUR_TTY_KEYBOARD_LAYOUT (default: us, example: yr-af) 
YOUR_HOSTNAME (default: Safenetwork-one, example: Rezosur-uq)

Once the installment is finished, enter these commands (ROOT_MNJRO=ROOT_MNJRO):

curl https://link.tardigradeshare.io/s/julx763rsy2egbnj2nixoahpobgq/rezosur/safe_network_dev_environment_setup.sh?download -o safe_network_dev_environment_setup.sh
curl https://link.tardigradeshare.io/s/julx763rsy2egbnj2nixoahpobgq/rezosur/dockerfile?download -o dockerfile
curl https://link.tardigradeshare.io/s/julx763rsy2egbnj2nixoahpobgq/rezosur/sshd_config?download -o sshd_config
mkdir /run/media/$USER/ROOT_MNJRO/@home/YOUR_USERNAME/{safe,safenetwork-node,.ssh} 
mv safe_network_dev_environment_setup.sh /run/media/$USER/ROOT_MNJRO/@home/YOUR_USERNAME/safe/
mv dockerfile /run/media/$USER/ROOT_MNJRO/@home/YOUR_USERNAME/safenetwork-node
sudo mv -b sshd_config  /run/media/$USER/ROOT_MNJRO/@/ssh
ssh-keygen -t ed25519 -N <passphrase> -C "USER@HOSTNAME"
cat ~/.ssh/id_ed25519.pub | tee -a /run/media/$USER/ROOT_MNJRO/@home/YOUR_USERNAME/.ssh/authorized_keys

Step 3: Access your ARM server computer via SSH

Pull your Mirco SD card out of your reader and push it into your ARM server.
Connect your ethernet cable to your modem and turn your ARM server on.

On your client computer terminal type the following command to connect to your server:

ssh YOUR_USERNAME@YOUR_HOSTNAME

This should give you access to your server computer.

Next use a password manager (example: KeepassXC) for generating and managing passwords.
Then type these commands:

passwd
YOUR_PASSWORD
NEWLY_GENERATED_PASSWORD
REPEAT
sudo su
passwd
NEWLY_GENERATED_PASSWORD
REPEAT
exit

Run the safe network script which should download and setup docker on your server computer.
This requires a reconnect in order for Manjaro to provide new user permissions.

sudo sh ~/safe/safe_network_dev_environment_setup.sh
exit
ssh YOUR_USERNAME@YOUR_HOSTNAME

Step 4: Start the node

Go to the safenet node folder and build the docker image.
It should immediately run the node once the build has been completed.

cd ~/safenet_node
docker build -t dockerfile .

Congratulations and welcome to the club!
You can also run the safe command line interface from the server side and take a look inside at your hard earned money from running your server farm.

docker run -it dockerfile

Happy safe networking!


Reminder to myself to add LunarVim to this tutorial once neovim 0.5 is available on the manjaro/arch repositories. LunarVim currently is such a pain to install, I have to exclude it for now.
Reminder to myself to add safenetwork-node dockerfile to docker.
Reminder to myself to add terminal record example.
Reminder to myself to add windows screenshots for chocolately and docker-gui.

16 Likes

This is REALLY awesome @folaht! Small steps like these will allow the testnet to remain online and become more distributed among different types of devices. Right now many people I believe join for just a few hours to check it out, but then quite quickly leave again because it’s just a testnet. Maybe undisrupted online nodes that remain online (read IoT devices like RBP) will ensure that things keep running, versus keeping a heavy duty desktop online all day or forgetting about the testnet when you shut it down.

Raspberry Pi is so easily available and has so many use cases. We should really start to promote the Safe Network on RBP forums as well as many will be easily joining! Good job, power of the community contributing to the Safe Network!

And yes people, please be careful with selecting the right drives when formatting or flashing any images!

Edit: Since RBP can easily access many sensors people could also experiment with providing local weather data to the network.

8 Likes

Thanks.

I get the feeling no one has run this tutorial over yet. I think they get stuck at step 1.
I will try to get a docker image for manjaro-arm-installer soon.

1 Like

Just as soon as i can find a PSU for a Pi that has not been snaffled by the family for charging phones, I will be right with you :slight_smile: