The main issue: The container nextcloud-aio-nextloud takes more than 25 minutes to start. I expect it to start in no more than 2 minutes. There is barely any load on the system while it is starting.
Eventually Nextcloud is starting normally, and it seems to work reanonably well. But I also have a cloud VPS at Hetzner with 4 cores, 8GB and that starts normally - and it has a lot of apps installed and a few hundred GB of data.
I’m running Nextcloud AIO v7.2.1
What is my setup?
At home, behind my router, on a mini-pc with a Ryzen 7 7840HS. I’m running Proxmox 8 with two VMs.
vm1 is running only nextcloud.
vm2 is running SWAG and several services. SWAG is reverse proxy to vm1 as well.
vm1 has 8 virtual cores and 16GB RAM.
I enabled all services for nextcloud, including ClamAV, Talk recording. But without those two it was equally slow. Also, only Apache, Notify push and Nextcloud are still ‘starting’. The first two are just waiting for Nextcloud to start.
My docker compose on vm1:
services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
- /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
ports:
- 8080:8080
- 443:443
- 8443:8443 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
environment: # Is needed when using any of the options below
- APACHE_PORT=11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
- APACHE_IP_BINDING=192.168.2.154 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
- NEXTCLOUD_DATADIR=/home/myuser/nextcloud/data # Allows to set the host directory for Nextcloud's datadir. ⚠️⚠️⚠️ Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
- NEXTCLOUD_MEMORY_LIMIT=1024M # Can be adjusted if you need more. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud
- NEXTCLOUD_ADDITIONAL_APKS=imagemagick # This allows to add additional packages to the Nextcloud container permanently. Default is imagemagick but can be overwritten by modifying this value. See https://github.com/nextcloud/all-in-one#how-to-add-os-packages-permanently-to-the-nextcloud-container
- NEXTCLOUD_ENABLE_DRI_DEVICE=false # This allows to enable the /dev/dri device in the Nextcloud container. ⚠️⚠️⚠️ Warning: this only works if the '/dev/dri' device is present on the host! If it should not exist on your host, don't set this to true as otherwise the Nextcloud container will fail to start! See https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
- SKIP_DOMAIN_VALIDATION=true
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work
I explicitly set NEXTCLOUD_ENABLE_DRI_DEVICE
to false because the log from nextcloud-aio-nextloud starts with something about /dev/dri:
2023-09-22 17:49:36.668909+00
(1 row)
+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Installing imagemagick via apk...
Enabling Imagick...
Configuring Redis as session handler...
Setting php max children...
I set SKIP_DOMAIN_VALIDATION=true
because without that I couldn’t get the proxy server to work. My SWAG/Nginx nextcloud.subdomain.conf on vm2 looks like this:
server {
listen 443 ssl;
#listen [::]:443 ssl;
server_name nc.mydomain.com;
#include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
# resolver 127.0.0.11 valid=30s;
proxy_pass http://192.168.2.154:11000;
}
}
Here is the log from nextcloud-aio-nextcloud after it started.
-------------------------------
2023-09-22 17:49:36.668909+00
(1 row)
+ '[' -f /dev-dri-group-was-added ']'
++ find /dev -maxdepth 1 -mindepth 1 -name dri
+ '[' -n '' ']'
+ set +x
Installing imagemagick via apk...
Enabling Imagick...
Configuring Redis as session handler...
Setting php max children...
Applying one-click-instance settings...
System config value one-click-instance set to boolean true
System config value one-click-instance.user-limit set to integer 100
System config value one-click-instance.link set to string https://nextcloud.com/all-in-one/
support already enabled
Adjusting log files...
System config value upgrade.cli-upgrade-link set to string https://github.com/nextcloud/all-in-one/discussions/2726
System config value logfile set to string /var/www/html/data/nextcloud.log
Config value logfile for app admin_audit set to /var/www/html/data/audit.log
System config value updatedirectory set to string /nc-updater
Applying network settings...
System config value davstorage.request_timeout set to integer 3600
System config value trusted_domains => 1 set to string nc.mydomain.com
System config value overwrite.cli.url set to string https://nc.mydomain.com/
System config value htaccess.RewriteBase set to string /
.htaccess has been updated
System config value dbpersistent set to boolean true
System config value files_external_allow_create_new_local set to boolean false
System config value trusted_proxies => 0 set to string 127.0.0.1
System config value trusted_proxies => 1 set to string ::1
Config value base_endpoint for app notify_push set to https://nc.mydomain.com/push
Config value wopi_url for app richdocuments set to https://nc.mydomain.com/
System config value allow_local_remote_servers set to boolean true
No ipv6-address found for nc.mydomain.com.
Config value wopi_allowlist for app richdocuments set to [my ip4]],127.0.0.1/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,fd00::/8,::1
Config value recording_servers for app spreed set to {"servers":[{"server":"http://nextcloud-aio-talk-recording:1234/","verify":true}],"secret":"somesecret"}
Config value av_mode for app files_antivirus set to daemon
Config value av_port for app files_antivirus set to 3310
Config value av_host for app files_antivirus set to nextcloud-aio-clamav
Config value av_stream_max_length for app files_antivirus set to 104857600
Config value av_max_file_size for app files_antivirus set to 104857600
Config value av_infected_action for app files_antivirus set to only_log
System config value enabledPreviewProviders => 0 set to string OC\Preview\Imaginary
System config value preview_imaginary_url set to string http://nextcloud-aio-imaginary:9000
{
"search_platform": "OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform",
"app_navigation": "0",
"provider_indexed": "{\"test_provider\":\"0\",\"deck\":\"1\",\"files\":\"1\"}",
"cron_err_reset": "1695150093",
"tick_ttl": "1800",
"collection_indexing_list": "50",
"migration_24": "1"
}
{
"elastic_host": "http:\/\/elastic:6a4fba509d1a4bb425cbc620bd33266a86871686fce14b9a@nextcloud-aio-fulltextsearch:9200",
"elastic_index": "nextcloud-aio",
"fields_limit": "10000",
"es_ver_below66": "0",
"analyzer_tokenizer": "standard"
}
{
"files_local": "1",
"files_external": "0",
"files_group_folders": "0",
"files_encrypted": "0",
"files_federated": "0",
"files_size": "20",
"files_pdf": "1",
"files_office": "1",
"files_image": "0",
"files_audio": "0",
"files_chunk_size": "2"
}
[22-Sep-2023 18:16:56] NOTICE: fpm is running, pid 951
[22-Sep-2023 18:16:56] NOTICE: ready to handle connections
Activating Collabora config...
Activated any config changes
The time in this docker is 2 hours behind the time on the vm by the way.
My router is forwarding ports 80 and 443 to vm2 (the reverse proxy). I forwarded port 3478 (Talk) to vm1, although I’m not sure that is correct and it did not solve this problem anyway.
I’m out of my league here. Is it something to do with the reverse proxy settings? Something with the firewall from my router? Is Nextcloud trying to verify something or waiting for something at every step?