pi-dal

pi-dal

All science is either physics or the stamp collecting.
twitter
github
bilibili

Raspberry Pi ArozOS Guide

https://github.com/tobychui/arozos/blob/master/img/banner.png?raw=true

Why Choose ArozOS#

For a long time, many makers have hoped to have their own highly customizable NAS, which is why many manufacturers have adapted to the currently most popular SBC—Raspberry Pi. As a result, NAS applications on Raspberry Pi are diverse, and here are a few main ones:

  1. Nextcloud

Nextcloud

https://raw.githubusercontent.com/nextcloud/screenshots/master/files/Files%20Sharing.png

Perhaps the most popular application at the moment, it has plugin functionality and apps, and is very feature-rich. However, it has a fundamental flaw—it is written in PHP, which is incredibly slow.

  1. pydio

Pydio

https://raw.githubusercontent.com/pydio/cells-dist/master/resources/v3.0.0/home.png

Currently used relatively less in China, it is written in Golang, fast, and has a relatively complete set of features, which was an option I was previously struggling with.

  1. Seafile

Seafile - Open Source Enterprise Private Cloud Storage Software

Written in C language by Chinese developers, a choice of Tsinghua and Peking University, it has complete features and high efficiency.

Having said so much, they are all quite good, so why not use them?

There are roughly the following reasons:

  1. The degree of customization is not high enough; although there is a plugin system, there are still too few places where you can write your own code.
  2. They are all company projects (this point is subjective).
  3. They all have professional versions, which also means that the capabilities of the free versions cannot reach saturation.
  4. They can generally only be considered as cloud storage applications and cannot match the capabilities of Synology DSM.

Now let me truly introduce ArozOS.

General purposed Web Desktop Operating Platform / OS for Raspberry Pis, Now written in Go!

Untitled

Some may ask, isn't this a NAS application? Why is it called an OS?

That's right, you might have thought of it; ArozOS's capabilities far exceed those of Nextcloud-like cloud storage applications. It also has two major weapons: WebApp and Subservice, and it even serves as an IoT controller.

Untitled

Some Applications

Untitled 1

WebApp Management

Untitled 2

Subservice Management

Of course, basic functions such as file sharing and music/video playback are also included.

Untitled 3

File Sharing

Untitled 1

Music and Video Playback

You can even perform file editing and code writing.

This is the NAS system we need!

How to Install ArozOS#

Currently, there are two ways to install ArozOS.

Using the Pre-packaged img#

Web Desktop Operating System for low power platforms, Now written in Go!

Everything is set up for you, ready to use out of the box.

You can directly access http://RaspberryPiIPAddress:8080/ to register a user.

Manual Build#

  1. First, install Golang 1.14+

cd ~/

# Choose the following four steps as needed

# Raspberry Pi 64bit if network conditions allow
wget https://golang.org/dl/go1.17.3.linux-arm64.tar.gz

# Raspberry Pi 32bit if network conditions allow
wget https://golang.org/dl/go1.17.3.linux-armv6l.tar.gz

# Raspberry Pi 64bit for domestic use
wget https://golang.google.cn/dl/go1.17.3.linux-arm64.tar.gz

# Raspberry Pi 32bit for domestic use
wget https://golang.google.cn/dl/go1.17.3.linux-armv6l.tar.gz

sudo tar -C /usr/local -xzf go*

echo 'export PATH=$PATH:/usr/local/go/bin' >> .bashrc

source ~/.bashrc

go version
  1. Clone the entire project
# For domestic use
git config --global url."https://hub.fastgit.xyz/".insteadOf "https://github.com/"
git config protocol.https.allow always

# Necessary
git clone https://github.com/tobychui/arozos.git
  1. Build
# For domestic use
go env -w GOPROXY=https://goproxy.cn,direct

# Build
cd ./arozos/src/
go build
./arozos
  1. Daemon Process
# Before starting, ensure there are no arozos processes running
cd /etc/systemd/system/

sudo nano arozos.service

# Add the following content

[Unit]
Description=ArozOS Cloud Service
After=systemd-networkd-wait-online.service
Wants=systemd-networkd-wait-online.service

[Service]
Type=simple
ExecStartPre=/bin/sleep 30
WorkingDirectory=/home/pi/arozos/src
ExecStart=/bin/bash /home/pi/arozos/src/start.sh

Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

sudo systemctl enable systemd-networkd.service systemd-networkd-wait-online.service

sudo systemctl start arozos.service

sudo systemctl enable arozos.service

At this point, you can access http://RaspberryPiIPAddress:8080/ to register a user.

Launcher and Updates#

ArozOS has supported launcher and OTA updates since 1.119. Next, let's talk about how to use these two features.

How to Migrate to Launcher Mode#

In the previous section, we learned how to build from the source. So how do we use the launcher on top of that?

# Pause Arozos process
sudo systemctl stop arozos

# Enter the directory
cd arozos/src

# Clone the launcher source code
git clone https://github.com/aroz-online/launcher.git launche

# Compile the launcher
cd launche && go build
mv launcher  ../
cd ..

# If you are not on v1.119, please perform the following steps
mkdir updates
cd updates
wget https://github.com/tobychui/arozos/releases/download/v1.119/arozos_linux_arm64 -O arozos
wget https://github.com/tobychui/arozos/releases/download/v1.119/web.tar.gz
tar -zxvf web.tar.gz
cd ..

# Change ./arozos in start.sh to ./launcher
eg: 
#!/bin/bash
sudo ./launcher -port 80 -tls=true -tls_port 443 -hostname "RPI-NAS"

# Restart arozos
sudo systemctl start arozos

If successful, you should be able to see the effect by opening the link in your browser.

OTA Upgrade#

Arozos has supported OTA upgrades since version 1.119, allowing you to directly update the version in Arozos.

WebApp & Subservice#

When it comes to ArozOS, two things cannot be overlooked: WebApp and Subservice.

WebApp#

The WebApp in ArozOS is a web application written in HTML5, allowing installation via a module installer.

Installation#

You can install the WebApp using a git repo URL or a zip file. You can find the installation interface in the "System Settings" > "Add and Remove Modules" tab.

Untitled 4

Deletion#

To delete a WebApp, select the WebApp you want to remove from the WebApp list and click "Uninstall."

Untitled 5

You can also delete it manually; here is an example of deleting a subservice named "MyWebApp."

sudo systemctl stop arozos

cd ~/arozos/web/

rm -rf MyWebApp

sudo systemctl start arozos

Subservice#

The Subservice in ArozOS is an executable file that needs to be compiled during installation.

Installation#

You need to manually install it in the ArozOS directory; here is an example of deleting a subservice named "MySubservice."

cd ~/arozos/subservice

git clone MySubservice's git address

cd MySubservice

./build.sh

Deletion#

Here is an example of deleting a subservice named "MySubservice."

sudo systemctl stop arozos

cd ~/arozos/subservice/

rm -rf ./MySubservice

sudo systemctl start arozos

Enable and Disable#

To enable or disable a subservice, go to the System Setting > Subservice tab, then select the service you want to start/disable.

Untitled 6

Of course, you can also operate manually.

sudo systemctl stop arozos

cd ~/arozos/subservice/MySubservice

touch .disabled

sudo systemctl start arozos

One More Thing#

ArozOS is still actively being developed, and I have had the privilege of contributing some code to it.

Commits · tobychui/arozos

If you have good ideas for this project, feel free to raise issues and PRs, and you can also join the Telegram group to communicate with us.

ArozOS Dev

Thank you for reading!

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.