User:Esavier/nextcloud

Nextcloud is Article description::a free and open source cloud suite webapp used for file synchronization and sharing.

This installation document was written with Nextcloud 20 as a target and attempts to provide a fast installation on Gentoo systems. Provisioning the hardware (CPU allocation, data storage, memory, etc.) is outside the scope of this document.

Installation
Nextcloud requires software components from the standard (L)AMP stack: a web server, a database, and PHP interpreter (php-fpm).

Kernel
Kernel support for Nextcloud purposes includes the standard array of subsystems for hosting webapps. Kernel configuration is beyond the scope of this article.

PHP
Before re-emerging PHP in order to get supported modules, see upstream's list of supported PHP versions and associated modules which are necessary for correct operation of Nextcloud. As of March, 2021, Nextcloud runs on PHP 7.2, 7.3, and 7.4. There are currently 14 modules that should be available for Nextcloud. They can be checked with the following command.

Pipe the command to to get a count of 14:

Verify one of three possible modules exist for the database connector. In this instance, MariaDB will be the application's database:

Generally recommended modules (by upstream):

Recommended modules for instances hosting photos/images:

Recommended for enhanced server performance is to pair Nextcloud with memcached. This php module is a PECL extension and is installed separately from php itself. On Gentoo, the php module is available in the following package

memcached package must also be installed:

Verify the module is available to PHP.

Web server
Apache and Nginx are supported web servers.

Signed SSL certificate (Let's Encrypt)
Let's Encrypt can be used to obtain free certificates which have been signed by a recognized signing authority.

Self signed SSL certificate
Nextcloud servers should have a secure connection. Following certificate will be valid for 365 days after generation:

Create the nginx snippets directory (if it does not exist):

Add the following files:

Additional software
In addition to the standard web interface, a Linux native desktop sync client is also available:

Files

 * - Global (system wide) configuration file.

OpenRC
On an OpenRC system Nextcloud does not have a specific service, but runs on services from the AMP stack: