NextCloud on your shared VPS

Nextcloud is a suite of client-server software for creating and using file hosting services. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server.

In contrast to proprietary services like Dropbox, the open architecture allows adding additional functionality to the server in form of applications and enables the user to have full control of their data.

The original ownCloud developer Frank Karlitschek forked ownCloud and created Nextcloud, which continues to be actively developed by Karlitschek and other members of the original ownCloud team.

Assumptions

your server is example.com and it is running Ubuntu 16.04;

you already have a configured subdomain in the dns: nextcloud.example.com;

your sudo user is admin;

the user you want to create for NextCloud is nextcloud;

the database main user is root and the password is mysqlpassword;

the database you will use is named nextclouddbwith the user nextclouddbuser with the password password

Create a new user and add it to Apache group

sudo adduser nextcloud

sudo usermod -a -G www-data nextcloud

Create the virtualhost for Apache

Apache specials

Please be sure to have an Apache configuration similar to what the following commands give: