Installtion date 26.09.2023. The origins of the automated script come
from
c-rieger.de.
Please consider contributing if you liked it.
;
sudo -s
apt install -y wget dnsutils
wget -O zero.sh https://codeberg.org/criegerde/nextcloud-zero/raw/branch/master/ubuntu.sh
;
chmod +x zero.sh
;
vi zero.sh
...
NEXTCLOUDDATAPATH="/data"
NEXTCLOUDADMINUSER="nc_admin"
NCRELEASE="latest.tar.bz2"
PHPVERSION="8.2"
LETSENCRYPT="n"
NEXTCLOUDDNS="ihre.domain.de"
DATABASE="m"
NCDBUSER="ncdbuser"
CURRENTTIMEZONE='Europe/Berlin'
PHONEREGION='DE'
NEXTCLOUDOFFICE="n"
ONLYOFFICE="n"
UPLOADSIZE='10G'
...
;
./zero.sh
<b>Cloudflare & Let's Encrypt & HAProxy & Nextcloud</b><b>Cloudflare</b>
CNAME <b>SUBDOMAIN.YOUR.DOMAIN</b>
<b>Opnsense</b>
1. ACME Client: Let's Encrypt Wildcard YOUR.DOMAIN
(Optional) Opnsense: Create virtual IP for HA Proxy (Entry point)
2. HAProxy: Redirect to inernal Nextcloud Server
3. Unbound DNS: Local DNS entry for reverse proxying to nextcloud
Error from Nextcloud The OPcache buffer is nearly full. To assure that
all scripts can be hold in cache, it is recommended to apply
opcache.memory_consumption to your PHP configuration with a value higher
than 256. PHP
Documentation
Nextcloud
Documentation
/etc/php/8.2/fpm/php.ini
vi /etc/php/8.2/fpm/php.ini
...
; The OPcache shared memory storage size.
opcache.memory_consumption=``<b>512``</b>
...
systemctl restart php8.2-fpm.service
<b>ATTENTION!</b> please remind yourself, that you;
vi /etc/php/8.2/fpm/pool.d/www.conf
#Edit the following lines according to the previously mentioned FPM Calculator
pm.max_children = 220
pm.start_servers = 55
pm.min_spare_servers = 55
pm.max_spare_servers = 165
;
; Maximum amount of memory a script may consume
; https://php.net/memory-limit
memory_limit = 14G
Nextcloud
Doku
Nextcloud Client
Doku
;
alias ncput='curl -u "otBzHiBQrTZrAtA:" -H "X-Requested-With: XMLHttpRequest" -X PUT "https://cloud.rueti16.com/public.php/webdav/" -T'
Change into Nextcloud directory and enable/disable maintenance mode.
;
# occ command is only available here
cd /var/www/nextcloud
# Enable maintenance mode
sudo -u www-data php occ maintenance:mode --on
# Disable maintenance mode
sudo -u www-data php occ maintenance:mode --off
https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html#maintenance-mode
https://www.c-rieger.de/nextcloud-installationsanleitung/
https://www.c-rieger.de/nextcloud-installation-mit-nur-einem-skript-zero-sh/
How to migrate to a new Nextcloud instance (no HA). Mostly needed
because of security reasons. See Nextcloud
Migration
and Nextcloud
Backup
documentation.
;
rsync -Aavx /data_nvme/ root@192.168.3.110:/data/