Configuration for limited hardware

Nextcloud version: 25.0.2
Setup: Docker-compose with a MariaDB, Redis and the App
Operating system and version: Armbian 22.11.1 Buster
Apache or nginx version: I don’t know, it’s docker-compose with the Nextcloud image
php version: 8.1.13
Users: <5

Hi! My Nextcloud server is running successfully on a ODROID-HC4, which has a 1.8Ghz Cortex-A55 quad core processor with 4GB DDR4 RAM. Initially I thought this would be sufficient for most purposes, but now I have come to realize that for some use cases Nextcloud uses up all the RAM and freezes the server. Among others, I got many problems with scrolling through my pictures and sharing it with other people. I realized that the problem is the generation of the previews. As suggested elsewhere, I installed the following cronjobs:

*/5 * * * * docker exec -u www-data nextcloud-app php /var/www/html/cron.php
30  2 * * * docker exec -u www-data nextcloud-app php /var/www/html/occ preview:pre-generate
30  2 * * * docker exec -u www-data nextcloud-app php /var/www/html/occ files:scan --all

However, this seems to solve the problems only slightly. It seems to me that if I look at the folders on my phone, it runs more smoothly, since the previews to be generated are smaller. However, my goal would be that it does not generate any previews live, but uses only the ones that are already generated. Further, it would be important that I find a configuration which stops Nextcloud to use more memory than available, since in that case it overuses the SWAP and takes hours until the services of the server can be used again. I tried to limit it in docker, but since there are different services, it is not easy to configure. My basic question is, how I can configure my Nextcloud in a way it is suitable for a server with limited hardware, such that it runs smoothly.

Thanks,

v.

I put memory limitation and reservation in my docker-compose file such as,
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 128M

The limits will be hard memory limitation for the container.
My Nextcloud App container have 4GB hard limitation and at the same time, the cron one has ONLY 256MB.

I do not know how to set the CPU limitation, but it looks fine.

1 Like

Hi a3linux, what docker version do you use? How much memory do you give to the database and redis, respectively?

I public my homecloud here,

I run this on an Intel NUC box (with Celeron CPU and 16GB memory). But I still have lot of free memory in normal usage as I will deploy more services in next step.