Banana Pi M2 Berry: Your cloud service on your server – nextcloud

Cloud services are very popular and the offer is big.

Not all your data you want to save on thirt-party servers. So, then you can use own cloud service on your server.

This tutorial will be working on Banana Pi M2 Berry (SBC with SATA interface), but the tutorial is the same for another SBC like Raspberry Pi, Orange Pi or Nano Pi.

I used this tutorial which I modified for my setting.

Other articles about BananaPi M2 Berry:
Banana Pi M2 Berry: first start, iperf, sysbench and thermal imaging picture
Banana Pi M2 Berry: SATA interface and speed test (dd, hdparm, rsync)
Banana Pi M2 Berry: Your cloud service on your server – nextcloud

The OS is running on microSD card, but as I mentioned the Banana Pi M2 Berry contains SATA interface. So I used it.

The HDD is used like storage only for Nextcloud data.

If you have some single-board computer and HDD we can start.

Is not neccessary to use HDD with SATA, you can use the bridge for SATA-to-USB.

The first and also important step is format of HDD. Use some usable filesystem. E.g. don not use NTFS. It is complicate for next using. You can choose EXT4 filesystem. There is no problem.

Ok, let’s update & upgrade the OS
sudo apt-get update

sudo apt-get upgrade

Install the Apache 2:
sudo apt-get install apache2

If you have OS based on Debian Jessie, use this command:
sudo apt-get install php5 php5-gd sqlite php5-sqlite php5-curl

If Debian Stretch, then this:
sudo apt-get install php7.0 php7.0-gd sqlite php7.0-sqlite php7.0-curl

Restart the Apache 2:
sudo service apache2 restart

Link to a new folder:
cd /var/www/html

Download the nextcloud:

Maybe now is available the newer release, so check the website https://download.nextcloud.com/server/releases/

If there is a new version of nextcloud, change the path from https://download.nextcloud.com/server/releases/nextcloud-11.0.2.tar.bz2 e.g. to https://download.nextcloud.com/server/releases/nextcloud-11.0.4.tar.bz2
curl https://download.nextcloud.com/server/releases/nextcloud-11.0.2.tar.bz2 | sudo tar -jxv

Link to /nextcloud folder:
cd /var/www/html/nextcloud

Change the owner:
sudo chown www-data:www-data config apps

Plug in the HDD and make the folder /SATA to /var
sudo mkdir -p /var/SATA

Mount the HDD partition (e.g.. dev/sda1) to /var/SATA/ folder
sudo mount /dev/sda1 /var/SATA/

The HDD should be connected to folder. So, make the /nextcloud folder:
sudo mkdir -p /var/SATA/nextcloud

Change the owner:
sudo chown www-data:www-data /var/SATA/nextcloud

Change the rights:
sudo chmod 770 /var/SATA/nextcloud

Open your webrowser and write the IP address of the server:
192.168.1.105/html/nextcloud

IP address you can find by ifconfig command or in the setting of your router.

Fill up the user and password, from the Storage & database combo-box (drop-down menu) fill up the path to nextcloud data /var/SATA/nextcloud/data

And that’s all. Nextcloud shows you the possibility to install App to Android and laptop.

There is address of your nextcloud for App: 192.168.1.105/html/nextcloud

Share the article:
Show your
Maker soul!
Buy a T-Shirt
Coffee for Chiptron
Give a boost to the next article

Related Articles

The single-board computer called Banana Pi M2 Berry is other device by SinoVoip company. The interesting price $34 (with shipping $39.66 in my case) of Banana Pi M2 Berry looks like alternative to Raspberry Pi 3, Orange Pi Prime ?i…

I would like to tell you that I’m not prefessional in security, but i would like to show you article about basic security of linux server. Sources for this article is my own experinces and literature search. With distribution of…

I have been using TMEP.eu, an online service for storing and visualizing long-term statistics from my weather stations, for many years. Over the last six months, however, the service has seen significant improvements and overall greater user-friendliness. I am therefore…

Other articles about single-board computer called Banana Pi M2 Berry by SinoVoip. In this article, we check SATA connection and we test the speed of communication. Other articles about BananaPi M2 Berry: Banana Pi M2 Berry: first start, iperf, sysbench…

The picture tutorial how to set and run Bolt IoT platform. Info about Bolt IoT and kickstarter campaign was mentioned in this news. The base component is ESP8266 chip in ESP12S module. Other components are GREEN LED (cloud indication) and…