Nextcloud is a free and open source cloud storage application along the lines of Dropbox or OneDrive but with an emphasis on keeping your data completely under your own control. It’s a PHP application, which means it should run anywhere PHP does, though the official Nextcloud instructions only cover Windows (via virtual machine) and Linux (specifically, Ubuntu and CentOS). If you’re in the mood to try something a little different, the traditional LAMP stack (Linux, Apache, MySQL/MariaDB, and PHP) can easily be adapted for FreeBSD, making it a FAMP stack. This tutorial uses Apache for the web server and MariaDB for the database server, though other options such as Nginx and PostgreSQL are available.
These commands should be run as root or as an unprivileged user using
doas. Tested on FreeBSD 12.0 with Nextcloud 17.0.0.
This guide assumes you have a FreeBSD server already set up and a fully qualified domain name pointing to the server’s public IP address. If you’re looking for a cheap way to get a public FreeBSD server up and running, Vultr offers virtual private servers starting at $2.50 a month. For a local solution, VirtualBox is always a good choice.