In this walk-through we will take you through the steps on how to install NextCloud on your Raspberry Pi.
This walk-through will include:
1) How-to format and mount an external usb disk for data storage.
2) How-to install and setup MariaDB for the SQL backend.
3) How-to instal the NextCloud Software.
Steps – Pdf – NextCloud Setup – Raspberry Pi or follow below.
NextCloud Setup – Raspberry Pi !
Url’s used: Rasbian
- Raspberry Pi 3
- 32 GB SD Card
- USB Keyboard
- Monitor with HDMI
- 2TB External HDD (usb)
- Download the arm image from https://www.raspberrypi.org/downloads/raspbian/
- Extract the image from the file you have downloaded.
- Flash your SD Card with the image you extracted using Etcher. (Or your preferred tool)
- Remove the SD Card from your computer and insert it into the Raspberry Pi.
- Connect all the components to the Raspberry Pi and power it on
- Complete the usual installation / configuration steps. (https://www.raspberrypi.org/documentation/installation/installing-images/README.md)
- Set a static IP. We will use 192.168.1.253 for our lab demosud.
- ssh to your raspberry pi and follow the below sections.
- Before you plug in the usb disk, Tail the messages file with the command below:
We now know that the disk is on ## /dev/sda
- Let us now create a partition.
Our inputs used in order (m | d | F | n | y | w)
- Create the filesystem.
- Create a directory to test the mount.
- Verify the disk is able to mount
- list the currently mounted disks.
You should see the volume mounted:
- If all working as expected, edit the /etc/fstab to make the mount permanent. As per our example we added the following line:
- Install MariaDB and secure it.
Our inputs used in order (y | y | y | y | y)
- Login to the SQL server and provide the password you set in the previous step.
- Create the Database to be used by NexCloud
- Create the user we will use to access the DB we just created
- Grant the user permissions to use the DB we created
- Finalize the setting with
- Install Apache, PHP & PHP SQL Connector.
~$ sudo apt-get install apache2 php-mysql php7.3 php7.3-gd php7.3-curl php7.3-zip php7.3-xml php7.3-mbstring
- Now restart Apache
- Fetch NextCloud and extract it.
At the time of this walk through version nextcloud-17.0.2. is the most current.
To view what is available see: https://download.nextcloud.com/server/releases/
~$ curl https://download.nextcloud.com/server/releases/nextcloud-17.0.2.tar.bz2 | sudo tar -jxv
- We need to set the correct permissions
- Open your browser and navigate to your Raspberry pi ip/nextcloud
- Enter the details requested.