With our Pi prepped the next step is to install the Nextcloud software.
Open a Terminal window and type:
This changes the active directory to the web servers HTML directory.
Next run the following command to donwload the latest version of Nextcloud to the directory:
curl https://download.nextcloud.com/server/releases/nextcloud-18.0.1.tar.bz2 | sudo tar -jxv
Nextcloud requires a directory for files to be stored in, so create this with the following command:
sudo mkdir -p /var/www/html/nextcloud/data
(Don’t worry if you wanted to store your files on an external drive, we’re going to change this later).
Next we need to sort out the permissions for the folder, so type the following two commands:
sudo chown -R www-data:www-data /var/www/html/nextcloud/ sudo chmod 750 /var/www/html/nextcloud/data
With all the pre-requisite sorted we’re now ready to run Nextcloud and do the rest of the setup.
To do this we need to open a browser from any device on our home network and type the following into the address bar:
<YOUR PI IP ADDRESS>/nextcloud
You should see a screen like this one:
You need to provide a username and password for the admin user. Make sure you record this as you’ll need to use it later.
Then click Finish setup.
If all goes well you should see the Nextcloud Dashboard…
For an in-depth guide on how to use this dashboard I recommend you refer to the Nextcloud website. There’s too much for me to cover here and they have the most up-to-date information.
What I will show you how to do here is make use of your external USB drive to store your data.
There are a couple of reasons to do this:
- A USB drive will, in theory, be faster to write to
- USB drives can store more data
- If your Raspberry Pi fails or becomes corrupted, your data is safe