Nextcloud – The cloud you can run at home


Has Google short the free online storage again or did Dropbox raise prices?
And what exactly happens to your data anyway?
Would you prefer to save your data at home, but still have the possibilities of a modern cloud? Then Nextcloud is right for you!

Dropbox Plus costs around 10 euros per month and you get one user with 2TB of storage. That’s it.
The costs for the Raspberry Pi + accessories + power consumption break even fast and the hardware can also be sold or used differently.
In addition, Nextcloud gives you significantly more options, since the server is operated directly at home, it is as fast as possible and independent of the internet provider plan and you have at least somehow a better feeling about what is happening to your data. In addition, you would also have the option to run far more on the Raspberry Pi, such as a Smart Home control with NodeRED or Home Assistant .

So the arguments are very clear that we should get started now.
Let’s go!

Run Rasberry Pi 4 with USB3.0 und SSD

The current version of the Raspberry Pi OS will boot directly from a SSD, nothing else to do!
First we should prepare the Raspberry Pi 4 to run completely without an SD card:

To do this, we first have to equip an SD card with Raspberry Pi OS. The easiest way to do this is with the tutorial from the ei23- Script .

Then we have to update the Raspberry EEPROM so that an automatic booting from USB storage is possible.
To do this, we have to connect to the Raspberry Pi via SSH and execute the following commands

First an update
SSH console COMMAND:
sudo apt update && sudo apt full-upgrade

Check whether “stable” is used, “critical” should appear at the end, please change [FIRMWARE_RELEASE_STATUS = “stable”] and save with ctrl + o.
SSH console COMMAND:
sudo nano/etc/default/rpi-eeprom-update

Check which EEPROM firmware is the most recent or which one with the most recent date:
SSH console COMMAND:
ls /lib/firmware/raspberrypi/bootloader/stable/
currently it is “pieeprom-2020-07-16.bin”

Install the current EEPROM firmware
SSH console COMMAND:
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-07-16.bin

Then restart:
SSH console COMMAND:
sudo reboot

Now we need an SSD and a USB3.0 SATA adapter
[I get a small commission on your purchase, so you can support the project without costing you more.]
With the following accessories I have already successfully installed NextcloudPi.

When the Pi has started, we can connect the SSD with the USB adapter and use lsblk to check whether “sda” or “sdb” or “sdc” etc. has been integrated.
SSH console COMMAND:
it is usually sda when only one USB device is connected.

RPI-Clone has already been installed with the ei23 script.
With this you can easily copy the SD card to the SSD:
SSH console COMMAND:
sudo rpi-clone sda ​​
(if the mount point of the SSD is not on “sda”, change accordingly)
Now you just have to confirm everything with Enter.
Attention, the SSD is completely formatted!
When the copy is ready, the Raspberry Pi can use
SSH console COMMAND:
sudo poweroff
turned off.
Now the Pi can be started without an SD card, only with the USB-SATA SSD connected.

If not, here are a few more tips:

  • Use a different power supply
  • Connect the Raspberry Pi to a monitor and see what exactly the output shows, maybe the data was not copied completely or correctly so that the boot process fails
  • Check with vcgencmd bootloader_version whether a current EEPROM firmware is installed (newer than August 2020)
  • Study the official documentation for USB Boot

The setup of NextCloudPi is shown in the following video:

Since something can go wrong during the installation for almost an infinite number of reasons, I have another emergency command that resets the NextcloudPi:
SSH console COMMAND:
cd ei23-docker/; docker-compose stop nextcloudpi; docker-compose rm -f nextcloudpi; sudo rm -r volumes/nextcloudpi/; docker-compose up -d

If an update from NextcloudPi does not work, it helps to execute dpkg --configure -a within the NextcloudPi container:
The following command takes you to the container
SSH console COMMAND:
docker exec -it nextcloudpi /bin/bash
Then this command. It may be that you have to answer a few dialogues. If the maintainer is asked, the maintainer version is the best choice.
SSH console COMMAND:
dpkg --configure -a

Good luck and have fun!

If these instructions were helpful to you, recommend and think about supporting the ei23 project.
Thank you!

You want to support this project?

If you want to support this project, you can do it here:

Comments are closed.