====== NextCloud Installation ====== # first, make sure PHP is the latest version available http://kb.unixservertech.com/unix/linux/debian/devuan_sury * https://docs.nextcloud.com/server/20/admin_manual/installation/example_ubuntu.html * https://docs.nextcloud.com/server/20/admin_manual/installation/source_installation.html * https://nextcloud.com/install/#instructions-server apt install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip wget unzip -y a2enmod rewrite a2enmod headers a2enmod env a2enmod dir a2enmod mime a2enmod ssl a2ensite default-ssl **Note**: The following rules need to be fixed in the existing system. On Debian, with their 'conf.d/' directory, it is simplest to just add a file which is sorted to be processed last (thus the 99-). When PHP configuration is read, it will process the standard php.ini, then process each entry in conf.d/ in sorted order, so 99-nextcloud.ini will be towards the end. For non-Debian based systems, you will need to manually edit the php.ini file, generally found in: joe /etc/php/version//php.ini Note: sapi is a subdirectory for different uses of PHP like apache, cli, cgi, ... You can change only one but it will not be carried over, so if you modify under apache/, it will only affect the web browser, not the cli. ; add this in the late-loading PHP override file for Nextcloud ; add this in /etc/php///conf.d/99-nextcloud.ini memory_limit = 512M upload_max_filesize = 512M post_max_size = 512M max_execution_time = 3600 max_input_time = 3600 max_input_vars = 5000 output_buffering = Off opcache.enable = 1 opcache.interned_strings_buffer = 16 opcache.max_accelerated_files = 10000 opcache.memory_consumption = 128 opcache.save_comments = 1 opcache.jit = 0 service apache2 reload mysql_secure_installation # do what needs to be done, then # Create database mysql CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost'; FLUSH PRIVILEGES; chown www-data:www-data /var/www/html mkdir /srv/nextcloud chown www-data:www-data /srv/nextcloud/ wget https://download.nextcloud.com/server/installer/setup-nextcloud.php ===== Links ===== * https://docs.nextcloud.com/server/21/admin_manual/installation/source_installation.html * https://www.howtoforge.com/tutorial/how-to-install-nextcloud-on-debian-10/ * https://tecadmin.net/install-nextcloud-on-debian/