It’a fine! Yes, it’s for me at the moment but I’ve got one eye on a spec I can recommend to friends and family or maybe even build and give away to them to get them involved. That’s why I’ve become obsessed with fanless and as small as possible.
That case Safemoon has found though is attractive for putting a HDD in though. I can see my credit card getting some more abuse soon.
Above is a work in progress, but slowly incorporating all the old hardware (mostly of any shape or size) into a giant storage cluster (horizontal + vertical scaling) for safe farming. The Power Usage panel is a rough sketch (work-in-progress) currently, but will soon ingest real time power consumption / UPS battery data for all the nodes into that panel.
Hope to then transition to adding Raspberry Pi as nodes to the existing cluster topology, once I get my hands on a few RPI4 compute modules with the appropriate back-plane to support multiple native sata ports via pci-e backbone (want to avoid USB->SATA conversions).
Now that launch is on, I was wondering whether there already is an easy way to setup a Raspberry. I have some old Synology with excess storage which i want to put on to the network where the room would be running the node.
Though I am somewhat comfortable with cli, i am no pro, so clarity of instructions would definitely be a must and ui would be even better. Did anyone already try this for Pi? Also, any minimum standards required for a pi? Or would a rpi1 model b even suffice?
Yes, I’m currently able to run two nodes on a rpi4. Tried to run five, but three were eventually killed off. Even with two nodes, the rpi4 flirts with the 50% CPU ceiling at times. Given the increased resource minimums to run a node nowadays, I’m not sure anything older than a rpi4 would be enough.
Maybe a bit unrelated, but I don’t fully understand the concept of nodes. As in, why would the network want to have multiple nodes from the same resource? Doesnt decentralized and you have the same hardware dependency (ie if power fails, all nodes go down at same time).
It’s the fact that the more nodes there are the harder it is for a bad actor to gain control over all the nodes that are considered close to each other. Someone posted some maths on this. But the point is that a network of 100,000 32GB nodes is a lot safer than 10,000 320GB nodes even if both are run by 10,000 people in 10,000 locations.
The disadvantage is that each node needs to maintain about 200 to 250 connections to other nodes and most people’s home ISP supplied routers can only handle a few thousand connections whatever the bandwidth used is. So there has been a move from small nodes of 2GB to much larger ones of 32GB. Until a few months people were running dozens or hundreds of nodes from home. Now it is a lot less.
Opinions differ! And what is right for one person may not be for another.
Until a couple of days ago I was thinking Raspberry Pi 4 was a really good option. With the increase in CPU requirement for each node I can only run 4 nodes instead of around 10. But I would only be able to run 5 anyway with the increased bandwidth usage anyway.
There are people who think the way to go are the little mini PCs like HP ones.
Others believe in old laptops.
But the dream was to use spare capacity on existing hardware without having to buy anything new. I still think that is justified if it means not having to leave my big computer switched on all the time.
Here is the latest version of the guide I put together for setting up a Raspberry Pi4 in a Argon40 case.
A lot of it is still relevant for other OSs, other platforms and using other cases.
–
Raspberry Pi 4 in Argon One M2 SATA Case + 128GB SSD
V1.3
20241103
This guide assumes:-
You have a Raspberry Pi 4 with an Argon One case with the M2 SATA board.
and
You are using Raspbian Pi OS. The instructions will be good for most other Linux distributions but some commands may need modifying eg. using ‘parted’ instead of ‘fdisk’. The stuff about disabling WiFi will be properly different though.
This case houses a M2 SATA drive in the base of the case and it is powered by a USB dongle that hangs out of the back and connects a USB port in the base to the one of the USB ports on the Pi 4.
It’s a nice case. The whole of the top of the case is made of Aluminium and connects to the heatsink so while it has a fan it doesn’t really need it and you can set it to only come on if the cpu temperature gets to 60C which should be basically never. When I was compiling Safe it only got to 49C.
Argon40 also do a NVMe case:-
But it looks like you have to buy the normal case without space for a SATA or NVMe drive:-
Then add the NVMe case which is definitely the more expensive way of doing it. And there is no need for an NVMe drive as Autonomi doesn’t need a fast drive at all so there is no need for the faster interface.
This guide will also work for Raspberry Pi 4s in some other case with an extra drive attached apart from the bit about using the argon utility to control the Fan. You’ll have to find something else for that if you have a fan.
It also assumes you have an SD card reader/writer on your computer. If you don’t have one get something like this:-
This guide is for setting up the Raspberry Pi with a wired ethernet connection. This is partly to keep Wireless traffic on my network down but also because there is a known problem with the Raspberry Pi 4 and the Argon M2 SATA case in particular. The only option to power the M2 drive is with the Raspberry Pi 4 USB bus and that can’t supply more than 3.0A at 5V. Ethernet and the WiFi chipset is on the USB bus as well and 3.0A at 5V is not really enough to run everything considering that the SSD uses a lot of power. So I’ve disabled the onboard WiFi.
Another solution is to plug the USB port in the base of the Argon One case and the USB port on the Pi 4 that you were going to connect together with the dongle into a powered USB hub. This will then power the SATA drive instead which will lighten the load on the Pi 4’s USB bus enough for all the stuff to work.
It may be possible to get the whole lot working with WiFi as well by using a higher power USB-C mains adapter but that’s not guaranteed at all and it seems the issue is with what the USB bus on the Pi 4 can supply rather than what it is supplied with to start with. I tried it with a PSU that can deliver 20W and the Wifi still doesn’t work.
I’m using a 32GB SD card for the OS. A 16GB one should be fine. 8GB is not enough to download the safenode source code and compile it if you want to do that but that shouldn’t be necessary these days as Autonomi provide binaries now. It should be enough for running the published binary. 16GB or 32GB might be the way to go though because under utilising a SSD is the way to make them last longer. There’s hardly any difference in the price anyway. If you want the Desktop version of Raspberry OS you will definitely need 16GB and 32GB will be nice.
I opted to install the Raspberry Pi OS on the SSD card to leave the maximum amount of the SATA drive free for Safe just run on the OS as well on a SATA or SATA drive.
Any external SSD or magnetic disk would be fine for running Autonomi safenodes. A magnetic drive would need a larger case and be noisier though and half the point of using a RPi4 in this case is that it is small and quiet.
This is a bare bones guide to get people going and other ways of doing things are possible. It does assume a bit of capability like how to edit a config file (I’ve got to draw the line somewhere…). Maybe there will be another How-To on how to use nano and vi (let the text editor wars commence!)
But I’ve gone into the detail of how to use fdisk because that’s something a bit less basic.
I’ll be interested in any suggestions for improvements.
First of all we’re going to put an image of the Raspberry Pi OS onto an SD Card. The easiest way to do this is with the Raspberry Pi Imager.
This can be downloaded for Windows, linux and Mac from:-
Plug the Micro SD card into your SD Card reader and run Raspberry Imager.
Don’t use the recommended option of ‘Raspberry Pi OS (32-bit)’ because Safe will require the 64-bit version of the Raspberry OS.
Go to the ‘Raspberry Pi OS (other)’ section.
For the OS choose either:-
‘Raspberry Pi OS (64-bit)’
If you want to have a Desktop available.
or
‘Raspberry Pi OS Lite (64-bit)’
If you are happy with just CLI access to the Pi.
When there is a GUI available for Safe you may want the Desktop for that but there is no need at the moment.
Click on ‘NEXT’
You are asked, ‘Would you like to apply customisation settings?’
Click on ‘EDIT SETTINGS’
In the ‘General’ tab:-
Set a hostname
Set a username and password
Set the Wireless LAN SSID and Password if you want the Pi to connect via WiFi
Choose your locale settings for Timezone and Keyboard layout.
In the ‘SERVICES’ tab
Enable SSH
Save the settings and click on ‘Write’.
Once the SD Card has been written put it in your Pi and power it on.
Login to the Raspberry Pi for the first time.
You’ll need to use a keyboard and a monitor.
If you are using the Pi in an Argon One case or another similiar one it will convert the Pi’s micro HDMI port to the normal sized one. If not, you’ll need to get an adapter like this one:-
Select the Keyboard layout that suits you.
Enter a username and password for a new user if you didn’t do it during the SD card imaging.
–
The Pi will reboot.
Once it comes up with the Login prompt login with the username and password you set.
Upgrade the OS:-
sudo apt update
sudo apt upgrade
The first thing to do is get the IP address of the Pi.
Run this:-
ip a l
This will give output like this:-
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether e4:5f:01:48:e1:01 brd ff:ff:ff:ff:ff:ff
inet 169.254.141.197/16 brd 169.254.255.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fd02:3107:e840:0:cd21:c2d5:85db:7d89/64 scope global mngtmpaddr noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::4ee1:6add:d09e:405b/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether e4:5f:01:48:e1:04 brd ff:ff:ff:ff:ff:ff
You are interested in the IP address for ‘eth0’ or ‘wlan0’
It will probably be an IP address like 169.254.141.197.
You should be able to login to this from your computer to do the rest of the tasks. Or you can continue using a screen and keyboard.
–
Many people will be happy with the Raspberry Pi getting a DHCP address but I like to know where things are on my network. And because I’m not using the onboard Wifi and the Ethernet interface eth0 is not setup by default at all I had to do these steps from the console. So you’ll need to connect the Pi to a monitor and keyboard for this first bit. Or you could leave the extra drive not connected so WiFi will work and do these bits over WiFi and DHCP and then when it is on Ethernet plug in the drive and reboot before doing the drive related things and the rest.
If you want to continue using DHCP then don’t do this bit.
Set to use eth0 with a static address by adding these lines to:-
/etc/dhcpcd.conf
│ A1 Expand Filesystem Ensures that all of the SD card is available │
Select ‘Yes’ for reboot now or just wait until you next reboot to get the extra RAM.
–
Disable WiFi and Bluetooth.
I like to connect things by cable where possible for reliability and to reduce the usage of the WiFi for things that really need it.
And if you are using the Pi for just running Autonomi you won’t need Bluetooth.
Obviously don’t do this if you want to use WiFi!
Disable WiFi by:-
Editing the file /boot/config.txt
Find the following line:
Additional overlays and parameters are documented /boot/overlays/README
And add these two lines under it:
dtoverlay=disable-wifi
dtoverlay=disable-bt
The second line is for the Bluetooth module so don’t add it if you need Bluetooth and just want to disable WiFi.
That’s the easy way of doing it but a more correct way as the wifi isn’t going to be used at all is to disable the drivers for the wifi hardware in this file:-
/etc/modprobe.d/raspi-blacklist.conf
Paste these two lines in it (the file is probably empty):
blacklist brcmfmac
blacklist brcmutil
These two instructions were lifted from:-
–
Partition the SATA drive with fdisk. I’ll call this the ‘data drive’ from now on.
sudo fdisk /dev/sda
Type ‘d’ to delete any partition that is there.
Type ‘n’ to create a new partition.
Type ‘p’ to create a Primary partition or just press Enter because that is the default.
Accept all the defaults by pressing Enter.
Type ‘w’ to write the new partition table.
Type ‘q’ to quit.
–
Format the SATA drive with mkfs
sudo mkfs.ext4 /dev/sda1
–
Create the directory for mounting the data drive.
sudo mkdir -p /home//.local/share/safe
create the fstab entry for mounting the data drive by adding this to the end of the file:-
/etc/fstab
Check you can write to the filesystem with:-
touch .local/share/safe/testfile
rm .local/share/safe/testfile
This should return nothing for if you can write and delete the file proving that you are the owner of the directory and permissions have flowed down.
Then you should only need to login to the privileged account that can use sudo for things such as upgrading the OS and compiling Safe from source.
–
Reduce the GPU RAM
On a Raspberry Pi some of the RAM is allocated to the GPU for the display. Unless you are using the Desktop install you won’t need much so reduce it to 16GB unless you are using the Desktop version of the OS in which case you might want more.
But you probably don’t want to do this if you have installed the Desktop version and intend using it.
This option seems to have disappeared from raspi-config. Need to do a bit of digging.
│ P2 GPU Memory Change the amount of memory made available to the GPU │
Change the value to be 16.
Select ‘Finish’ and press Enter
Select ‘Yes’ for reboot now or just wait until you next reboot to get the extra RAM.
–
Install iostat so that you can see read and write activity on the drives
sudo apt install sysstat
Then you can run:-
iostat 5
to get an update every 5 seconds of read and write throughput.
–
Install the smartctl utility so you can look at the SMART health of the SSD drive (not the SD card with the OS on it - there is no health monitoring possible for that).
sudo apt install smartmontools
Then run this to see the SMART data:-
sudo smartctl --all /dev/sda
Run this to save the output for reference of what the drive stats were like at the beginning:-
sudo smartctl --all /dev/sda > smartctl_all_20240714
If you are going to run safe using and unprivileged user you might want to do these steps for that user as well.
You might want to do that while compiling the safe software (if you are installing by compiling from source which shouldn’t be necessary these days) or compiling vdash as it is likely the busiest and hottest the CPU will ever be!
If you’re not using the Argon One case there will be some other way of controlling the fan (if you have one).
–
Install Screen
This is very useful for keeping a CLI session open even when you log in and out. It’s essential if you want to use VDash (below).
sudo apt install screen
–
Install VDash
VDash is a tool written by longtime Forum contributor the amazing! @happybeing.
The Forum post where it is discussed is here:-
It can be really useful in seeing how nodes are performing and I like to use it in the early stages. It’s not perfect around tracking earnings and the count of Records doesn’t work until the first StoreCost quote and it may just stop working but it is worth a look. It has to be compiled from source which takes a few minutes and requires the installation of a couple of bits of software first.
To be able to install Vdash these things have to be present:-
Ubuntu Build packages
git (Sourcecode versioning and installation system)
rustc (Compiler for the Rust language)
cargo (Package Manager for Rust)
Install the ‘build-essential’ packages:-
sudo apt install build-essential -y
Install git
Git may already be installed. Check that with:-
git --version
If not, install git with:-
sudo apt install git
Install rustc and Cargo
The following steps onwards can be done as an unprivileged user
Follow the instructions on this page:-
Install rustc and cargo with:-
curl --proto ‘=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh
Choose 1) to do the standard installation.
You will get this message:-
To configure your current shell, run:
source “$HOME/.cargo/env”
Install Vdash with:-
cargo install vdash
Make an image of the state of this SD card and save it somewhere else and also image it to a brand new SD card. Then when the SD card fails you can just pop in the new one. Don’t forget to save all your config as well and especially for Autonomi!
You should now be able to login as the unprivileged user to install and run Autonomi nodes using the instructions for the current Beta or Production network when it is available.