This is my blog now

How To: Set up NextcloudPi with Docker

I've been successfully running a Nextcloud instance for a while now and it's quite useful. When I did the setup the first time I installed the entire stack on bare metal by hand. Raspberry Pi with Raspbian (now Raspberry Pi OS), Apache, MariaDB, PHP, the works. I closely followed tutorials on it because I knew very little of what I was doing and there's a lot to keep in mind in terms of performance, security, configuration of various things and so on.

Eventually it became clear to me that I wanted my instance to be as low-maintenance as possible because I don't want to deal with breakage a lot and also don't want to have extended downtimes.

At one point I discovered that there are several ways to run a Nextcloud server apart from what I had done. There's a snap package for it, some distributions like Arch have a dedicated package in their repos and then there's NextcloudPi.

I considered the former two but I had trouble with Ubuntu on my 32 bit ARM architecture and I didn't want to run an Arch server. Just no. NextcloudPi on the other hand seemed quite interesting because it promises to be an all-inclusive package with basically the entire installation and configuration being automated and/or easily accessible via a web interface. All you need is a machine running a fresh install of Debian 10 (Buster) and you can run a script taking care of everything for you.

I did this and ran it for quite some time without significant issues. Over time though, I noticed a few things that bothered me:

A solution to these things is, you may have guessed it, using a container. I realized that there's a dedicated NextcloudPi Docker image that you can just download and run with very little setup required. This abstracts the application away from the underlying operating system and makes migrations, backups and the various update processes much easier.

Here's a rundown of all the steps involved, as usual for anyone who might be interested or for future me, who may want to retrace their steps.

A nice thing about this whole setup is that updating the Nextcloud version is quite easy with this. You just pull and run the updated container as soon as it is available. Like so:

Enjoy!

How To, Linux, Software, Self-hosting

⬅ Previous post
On Open Worlds in Gaming

Next post ➡
How To: Run Several Services Behind a Reverse Proxy