How to build your own Raspberry Pi cloud server with Nextcloud

Host your files on your own cloud server, running on a home or office computer you own. One of the most popular services to achieve this is Nextcloud.

Cloud storage is an essential part of modern life. The downside is that your data is stored on remote servers by an anonymous company that you must trust with the privacy and security of your precious documents and photos.

However, there is another option: Host your files on your own cloud server, running on a home or office computer you own. One of the most popular services to achieve this is Nextcloud.

The following article will show you how to install Nextcloud on Raspberry Pi, attach external memory and choose the appropriate case.

1. Install Nextcloud

There are two main methods to install Nextcloud on Raspberry Pi 4 (or other Pi model). The first is to use Nextcloud Ubuntu Appliance for Raspberry Pi. This requires you to open an Ubuntu SSO account and also to generate an SSH key to remotely access and start your new Nextcloud server.

Additionally, NextCloudPi is a special version of Nextcloud designed to run on Raspberry Pi 3 or 4. That is the method the article is using here.

First, download the latest NextCloudPi operating system image file from the GitHub repo. Choose version for Raspberry Pi. After downloading, extract the file using an extraction tool (for example, WinRAR or 7-Zip for Windows) on your computer; Now, you will have a folder containing the IMG file.

As usual when installing the operating system on Raspberry Pi, the article will use the Raspberry Pi Imager application to flash this file (operating system image) to the installed microSD card - a card with a capacity of 8GB or more is recommended. . To use this tool:

  1. Click Choose OS .
  2. Select Use custom and browse to the NextCloudPi IMG file.
  3. Click Choose Storage and select your microSD card (usually called "Generic Storage Device" ).
  4. Click Write , then wait for it to be written and verified.

How to build your own Raspberry Pi cloud server with Nextcloud Picture 1How to build your own Raspberry Pi cloud server with Nextcloud Picture 1

2. Start Nextcloud on Raspberry Pi

Place the microSD card into the Raspberry Pi and power it on. After a few seconds of displaying the boot sequence (lots of scrolling text), you will be prompted to log in. The default username is pi and password is raspberry. For security reasons, you should change your Raspberry Pi password afterward.

How to build your own Raspberry Pi cloud server with Nextcloud Picture 2How to build your own Raspberry Pi cloud server with Nextcloud Picture 2

 3. WiFi connection

Enter sudo raspi-config and select 2 Network Options , then select N2 Wireless LAN . Select the country, followed by the router's SSID (name) and password. Select Finish to return to the command line.

To discover your Raspberry Pi's IP address, enter:

ip addr

Note down the inet address under wlan0: This is the IP address of the Raspberry Pi. Some routers will reserve the same address for it every time it boots up. Otherwise, you'll want to set up a static IP address for your Raspberry Pi.

At this point, you can also enable SSH for remote access from another computer if you don't want to keep your Raspberry Pi connected to the display while continuing with setup. To do so, use the command:

sudo service ssh start

From the command line or terminal of another computer, you can then enter ssh pi@[Pi's IP address] to access the Raspberry Pi's command line.

4. Activate the Nextcloud web interface

Enter sudo ncp-config and select Yes if prompted to update. In the next menu, select CONFIG and use the down arrow to scroll to the bottom of the list.

Here select nc-webui , then delete no and type yes. Press Enter then press any key. Select Back and Finish to exit the configuration tool.

5. Activate and configure Nextcloud

In a web browser on another computer, enter the address https://[Pi's IP address]:4443 .

If you see a warning that your connection is not private or secure, choose to ignore the warning (by selecting Advanced in Chrome or Firefox) and continue visiting the site.

You will be prompted to log in. The default username is ncp and password is ownyourbits.

How to build your own Raspberry Pi cloud server with Nextcloud Picture 3How to build your own Raspberry Pi cloud server with Nextcloud Picture 3

The NextCloudPi activation screen displays two passwords that you need to copy and paste into a document for safekeeping. The first is the password for the NextCloudPi web panel that allows you to configure server settings. The second is for the Nextcloud web interface itself. You can change these passwords later if you want.

With the passwords recorded, select Activate. After a few seconds, you will be prompted to log in to the NextCloudPi web panel. However, ignore that for now and log in to the Nextcloud web interface.

 6. Access the Nextcloud web interface

Go to https://[Pi's IP address] (without the :4443 suffix) and log in with the ncp username and second password you wrote down.

After continuing past the welcome screen, you will see the main web dashboard. This is your very own Raspberry Pi 4 cloud server!

How to build your own Raspberry Pi cloud server with Nextcloud Picture 4How to build your own Raspberry Pi cloud server with Nextcloud Picture 4

Click N in the top right to access a drop-down menu with options for Settings (all - personal and admin), Users (you can add and manage users) and Apps for settings (such as the Collabora Online office suite and ARM64 server).

In the top toolbar are icons for sections like Files, Photos, Contacts, Calendar and Tasks . There is also a NextCloudPi icon that takes you to the web panel. Click on it and you will be prompted to log in with your ncp username and the first password you wrote down.

A wizard will appear with options to configure USB storage and external access over the Internet.

7. Add USB external storage

Your microSD card will have limited capacity, so it's best to add USB storage to your Nextcloud Raspberry Pi server. Connect your storage device to one of the Raspberry Pi's USB ports.

Before continuing, you need to create a directory for it in the command line on your Raspberry Pi (or via SSH). Enter the following command:

sudo mkdir /media/USBdrive

Access the NextCloudPi web panel in your other computer's web browser. In the wizard that appears (you can open it using the wand icon in the top toolbar), select USB Configuration . Answer Yes to the first question, then click Continue.

You will then be asked if you want to format the USB. If you're sure there are no important files on there that you want to keep, select Format USB . Finally, click Move data to USB .

8. Add external access over the Internet

Until now, you could only access the Nextcloud server from your own local network, which is a bit limited. To access your Nextcloud server over the Internet from any location requires the use of port forwarding and dynamic DNS services.

9. Choose a case for the Nextcloud server

How to build your own Raspberry Pi cloud server with Nextcloud Picture 5How to build your own Raspberry Pi cloud server with Nextcloud Picture 5

Running your Nextcloud server on a bare Raspberry Pi board is not ideal as it will accumulate dust over time. There are many types of cases for standard size Raspberry Pi 3 and 4 models.

 Instead of a cheap plastic case, the article recommends something more sturdy, such as the DeskPi Pro. This option has enough internal room for SATA storage and is supplied with an M.2 to SATA adapter. To prevent your Raspberry Pi from overheating, it also has an ICE Tower heatsink and cooling system.

Another good choice is the Argon ONE M.2 enclosure, which allows you to use any size M.2 SATA drive. Alternatively, you can choose a rugged case for your Raspberry Pi alone and plug in a standard external USB storage drive.

Congratulations, you have now set up a cloud server on your Raspberry Pi using NextCloudPi. You can access its dashboard using a web browser on another device. There's even a Nextcloud app for iOS and Android that you can use.

4 ★ | 1 Vote