My self hosted cloud solution
There is no Cloud, just other people’s computers.
Free Software Foudation
I know, I know. The Cloud isn’t technically just other people’s computers. Like all slogans, this one also fails to describe reality accurately. But think about this for a second: is it really the goal of a slogan to be accurate? Of course it’s not. This catchphrase is nothing more than a gross representation of the situation we are experiencing today.
Everyone who knows me a little bit knows that as far as privacy is concerned, I tend not to trust companies. Or rather, I try to trust them the least possible.
So yeah, that’s basically the reason why I decided to bring back to life my ten-years-old rusty Acer Aspire 5538, with an AMD Athlon X2 Dual L310, to setup my self-hosted Nextcloud instance. (And some other projects of mine, but I’ll talk about them in future articles.)
Stop right there, I know what you’re all thinking. I’m by no means an expert of the matter. I’m just a free-software enthusiast, who likes to try his hand in these stuff. As I said in my Welcome article, I’m mainly self-taught. This is not a guide. Take this article as a documentation of my experience, with some personal opinions in it. Without further ado, let’s get started!
The Operating System
The first step will obviously be to choose an operating system for our computer. If you’re a beginner, my best suggestion is to install the latest release of Ubuntu Server.
Starting with Ubuntu 20.04 LTS, the server edition of Ubuntu is no longer available for 32-bit architectures. However, previous releases of Ubuntu Server were available for 32-bit hardware. So, if you have 32-bit hardware, you may be able to use an older release, such as Ubuntu Server 18.04 LTS, which was the last long-term support release to support 32-bit architecture. However, keep in mind that running an older version of Ubuntu Server may come with security risks, as older releases may not receive security updates and patches.
You can argue that there are more minimal solutions, such as Alpine Linux, but in my opinion, if you’re just getting started with Linux, Alpine is a little bit overwhelming. Ubuntu Server provides a user-friendly TUI installation, and a lot of tools installed out of the box. Also, the community support for Ubuntu Server is huge. Its only flaw is that it’s kinda bloated, as it eats about 400MiB of RAM in idle.
The Web Server and The Database Engine
Here is where I have some regrets. Ubuntu Server comes with apache2 pre-installed, so I decided to use it without asking questions. Right now I’m thinking about switching to NGINX, since it has better performance and it’s easier to configure.
Yeah, Apache is more popular and it may have slightly better community support, but I can’t stand how it handles the configuration of virtual hosts. My suggestion right now is to take a little more time and configure NGINX.
Now we have to talk about the Database engine, which is used to store and manage the application data, including user accounts, files, calendars, contacts, and more. The database engine is responsible for ensuring that the data is stored securely, and that it can be retrieved quickly and efficiently when needed.
It’s obviously an important choice. As far as I know, Nextcloud supports MySQL/MariaDB, PostGreSQL, SQLite and Oracle. Of these options, MySQL or MariaDB are the most commonly used and recommended database engines for Nextcloud. PostgreSQL is also a popular choice for users who prefer an open-source alternative to MySQL, however it may require more setup and configuration when used with Nextcloud. Furthermore, not all Nextcloud apps and features may be fully compatible with PostgreSQL. SQLite is a lightweight database engine that is included with Nextcloud that can be used for small scale deployments, but it is not recommended for larger deployments or installations with many users. Oracle is another option, but it is less commonly used with Nextcloud.
My recommendation here is to just stick with MySQL or MariaDB. You will find many great guides that use one of these, and I assure you that they work flawlessly with Nextcloud.
Conclusions
That’s pretty much everything I had to say. If I could go back, I would have liked to have some directions like these, so I hope someone will find this useful. If you want a step-by-step guide on how to install Nextcloud on your server there is the official documentation, or this amazing guide by Linode. The latter uses Apache as web server, but it’s very detailed and interesting.