Setting up Nextcloud on the Raspberry Pi

The Raspberry Pi is a really tiny SBC (single board computer). It might not be the most powerful SBC out there, but it does the job for self-hosting servers such as Nextcloud. I got my hands on ruds.io, a really short domain and decided to use the Raspberry Pi for hosting many services on it.

Installing Ubuntu Server

I earlier had a UEFI on this Raspberry Pi to be able to use regular ARM ISOs, but faced issues with the Ubuntu Server ISO. I then decided to try the Ubuntu Server Pi-specific image, and it worked perfectly fine without any other issues.

Installing the nextcloud snap

Many of you might be confused as to why I decided to use the Nextcloud snap and not manually set up Apache or use docker or an LXC container. Ngl the snap does have some issues (such as only being able to access external directories under /mnt). However, it's much easier to manage the snap than managing a docker or LXC container (and I don't think anyone should have to deal with managing a manual installation of Nextcloud).

sudo snap install nextcloud
sudo snap connect nextcloud:removable-media
sudo snap connect nextcloud:network-observe

Enabling SSL

Using Let's Encrypt for an existing domain: sudo nextcloud.enable-https lets-encrypt

Using a self-signed certificate (not recommended unless you don't have a domain): sudo nextcloud.enable-https self-signed

Nextcloud's default login screen Nextcloud's default login screen

I haven't faced any major issues with the Nextcloud install, despite the Pi's abhorrent perfomance. I plan to do a series on hosting services on the Pis (and possibly a Pi cluster) in future, so make sure you follow me on Hashnode and Twitter!