The "data center" in the kitchen
Tags: pinerockpro, selfhosting, yunohost, backup
Published: 2022-03-14 17:17:22

I have been involved in website building for more than 25 years. As these sites have to be stored and operated somewhere, I inevitably also deal with the "high art" or "honest craft" of server hosting. 
In principle, not much has changed in this area during that period. That is actually incredible in the ICT sector with so many innovations every day.  In order to offer a website or a service like a messenger, you needed a computer with fast internet access, a stable operating system, 24/7 power supply, a regular backup and, if possible, a fixed IP address and a domain like [hagen.cocoate.com](https://hagen.cocoate.com).
I have all that now and it has been in the device pictured above for a few weeks. When you visit, e.g. my [blog](https://hagen.cocoate.com) or my [Pixelfed feed](https://pixel.cocoate.com/hagengraf) all the characters you read and the photos you see are sent directly from my kitchen to your browser ... The more I think about it, the more fascinating it is for me.
The little wonder in the picture above and below is called [Pine RockPro64](https://www.pine64.org/rockpro64/). The Pine RockPro64 is virtually the single-board equivalent of a "hot kebab with really everything".

![ROCKPro64 Single Board Computer released by Pine64](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mii6f1wm63fgqu7tuzwk.jpeg)
_The ROCKPro64 is the most powerful Single Board Computer released by Pine64. It is powered by a Rockchip RK3399 Hexa-Core (dual ARM Cortex A72 and quad ARM Cortex A53) 64-Bit Processor with a Mali T-860 Quad-Core GPU._

Now I don't want to organise a technology buzzword orgy here and simply point out that the above graphic with the many arrows shows the device roughly in its original size. Behind each of the arrows are features on which one could write several books. The possibilities offered by such a "universal machine" make my brain soften a little at the sheer quantity of them.
Here comes a single example to get a sense of the size. 
You might ask yourself, where is the hard disk on which the operating system and my blog are stored? 
**Answer:** At the moment, a 64GB [microSD card](https://en.wikipedia.org/wiki/SD_card#Micro) is inserted at the arrow with the number 14. This card has the dimensions 11.0 mm × 15.0 mm × 0.7 mm. Such cards have been around since 2005! My blog of the last few years currently needs about 640MB of storage space, so it could easily grow almost 100 times larger without this little card getting full. And if that happens - no problem - microSD cards are now available in sizes up to 2 terabytes! ( = 2,000 gigabytes = 2,000,000 megabytes).

![enlarged microSD Card](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k759qzbi4lcmjqwyp040.jpeg)
_enlarged microSD Card_

The microSD card contains [Armbian](https://www.armbian.com) as the operating system and [Yunohost](https://yunohost.org/#/) as the administration software. 

## What does a server like this actually do?
Before I clarify that I first a list the "things" and "software" you need to be able to read this blog post now.
- To read the blog post, you need a client. In concrete terms, this means that you need a browser (Firefox, Chrome, Safari, ...) with which you can access the article directly or via a search engine.
- This client (browser) is a software programme (also called an app) that is installed on an operating system. Known operating systems are Microsoft Windows, Apple MacOS, Linux, Apple iOS, Google Android.
- An operating system is installed on a piece of hardware. This can be a phone, a PC, a tablet, a clock or an "Internet of Things" device such as a smart light bulb or a weather station with sensors.
- The hardware must be connected to a network, the internet, in order to be able to address other hardware.
So far the process is probably familiar, as it represents the customer side and customers (clients) are, after all, all of us.


> A single server can serve multiple clients, and a single client can use multiple servers. A client process may run on the same device or may connect over a network to a server on a different device. Typical servers are database servers, file servers, mail servers, print servers, web servers, game servers, and application servers.
[Wikipedia: Server (computing)](https://en.wikipedia.org/wiki/Server_(computing))

## What is Armbian?
Armbian is a base operating system platform for single board computers like my Pine RockPro64. It is a lightweight Debian based Linux distribution specialized for ARM development boards.
Debian GNU/Linux is, in my opinion, something special in the operating system world. It was launched in 1993 and is still the most influential and widespread GNU/Linux distribution today. Linux distributions such as Ubuntu or Linux Mint are based on the Debian project.  
So if you want a very stable and reliable operating system, take Debian. Of course, stability and reliability have a price. Logically, Debian only contains stable and reliable software packages. Stable and reliable software packages, however are often, how shall I put it kindly, a little bit "dusty" and "unfashionable". Not necessarily outdated, but not the "new, hot shit" either. Debian provides security patches, but the versions of the software packages used are rather low. This is also one of the reasons why Debian is taken as a basis by so many distributions. The derivatives then often offer more modern software packages than Debian and are gladly taken for this reason.

## What is Yunohost?
YunoHost is an operating system, based on Debian (and Armbian) aiming for the simplest administration of a server, and therefore democratize self-hosting, while making sure it stays reliable, secure, ethical and lightweight.
- Administer your server through a friendly web interface
- Deploy apps in just a few clicks ([current application catalogue](https://yunohost.org/de/apps))
- Manage users (based on LDAP)
- Manage domain names
- Create and restore backups;
- Connect to all apps simultaneously through the user portal
- Includes a full e-mail stack (Postfix, Dovecot, Rspamd, DKIM) as well as an instant messaging server (XMPP)
- Manages SSL certificates (based on Let's Encrypt) and security systems (Fail2ban, yunohost-firewall)

Trying things out is important to get a feel for them. If you don't have your own device to install, you can try out a working demo. 
The links and access passwords can be found at [https://yunohost.org/en/try](https://yunohost.org/en/try).

## Fibre connection and setup
Since I got a fibre connection in my little village a few weeks ago, I just had to try it out myself. 
I do not want to go into the specific commands here, but I will describe the installation roughly.
- In my case (Pine RockPro), I have to use the original Armbian image. It must be downloaded and flashed onto the MicroSD card. The easiest way to do that is using a software called [Etcher](https://www.balena.io/etcher/).
- Then you have to plugin the microSD card in the board and power ist up. Your computer must be connected to the same local network as your board and you have to figure out its local-IP
- Connect via SSH and with one command you can [install Yunohost](https://yunohost.org/en/install/hardware:arm_unsup)
- You have to find out how you can direct all accesses from outside to the IP address of your server on your router. 

The [Yunohost documentation](https://yunohost.org/en) describes all this in detail and up-to-date. 

...

Congrats! 
If everything works well, your Yunohost administration interface looks like this 

![Yunohost administration interface](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xr9me30oqvr8kbi9l5g1.png)

The Yunohost user portal looks, depending on the installed apps, like this

![Yunohost user portal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i1yno30fmhknz42nn2rv.png)

After the setup I asked on my [Mastodon](https://fimidi.com/@hagen/107723471298551567) and my [Twitter](https://twitter.com/hagengraf/status/1488537102883172363) account whether it works well.
The reactions were very encouraging. 
Access from Europe seems to work wonderfully.

## Isn't it better to have a proper cloud server in a professional data centre? 
This question is not easy to answer. Basically, both variants work well. 
The server in the kitchen needs a stable connection to the network, electricity and the device must of course be purchased. It is therefore a question of individual needs. For example, if you need a lot of hard disk space but have relatively few accesses, this can be "expensive" with a cloud server. For the server in the kitchen, you simply buy a standard x terabyte hard drive, which is probably a "cheaper" solution.
But if you are looking for a "highly" available server that "never" fails, is "always" accessible and requires relatively little hard disk space (20-60GB), then a cloud server might be the better choice.

I was faced with similar questions and simply tried both variations. I currently run a Yunohost server in my kitchen AND a Yunohost instance as cloud solution at IONOS. At IONOS the setup is rapidly done. All "little things" like opening ports or installing an operating system can be done browser-based. In comparison to the [IONOS cloud solution](https://www.ionos.de/cloud/cloud-server) the setup in my home network was much more extensive and time-consuming. I had to configure everything from the DNS to the router to the internal communication in the home network. But it was still worth the work and my small kitchen server definitely helped me to understand the cloud processes at IONOS much better. At the end it was an educational and valuable experience to me.

In the meantime, I moved the small kitchen server to the attic and use an older Raspberry Pi II with a large hard drive for backup. The whole self hosting project starts to become a more and more interesting project for me.