Hi! I am trying to setup fresh Nextcloud instance in Docker on Raspberry Pi 4 (4GB RAM). I use docker-compose with Nextcloud fpm image and mariadb. Docker-compose configuration is borrowed from https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/insecure/mariadb/fpm
This is my docker-compose file:
version: '3'
services:
db:
image: mariadb:10.6
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql:Z
environment:
- MYSQL_ROOT_PASSWORD=1234
- MARIADB_AUTO_UPGRADE=1
- MARIADB_DISABLE_UPGRADE_BACKUP=1
redis:
image: redis:alpine
restart: always
app:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
- MYSQL_PASSWORD=123
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
depends_on:
- db
- redis
web:
build: ./web
restart: always
ports:
- 8087:80
volumes:
- nextcloud:/var/www/html:z,ro
depends_on:
- app
cron:
image: nextcloud:fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html:z
entrypoint: /cron.sh
depends_on:
- db
- redis
volumes:
db:
nextcloud:
I took nginx dockerfile and configuration from https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/insecure/mariadb/fpm/web and it is untouched.
After entering admin user name and password, installation takes ~3 minutes and I get timeout in a web browser, but it eventually completes in background. When I log in and navigate for example to the Apps page, it takes around 30 seconds just to show that page and then another 2 minutes to load list of installed apps. Administration / Overiew panel also takes a while to load, and “Checking for system and security issues” eventually times out with “Error occurred while checking server setup”. Interesting fact is that browsing through list of files and folders (in browser) is quite fast.
One important note: on the same device I already have existing Nextcloud installation (directly on host system, not Docker) and it works pretty well for 3 years now. So I don’t think that slowness is caused by Raspberry Pi low computing power. Also, this is how docker stats
looks like while running Nextcloud in Docker (overall memory usage is 1.8 / 4 GB at that moment):
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
b384a8ac8bf2 nextcloud-test-web-1 0.00% 4.598MiB / 3.704GiB 0.12% 3.29MB / 3.62MB 156kB / 12.3kB 5
4956c84b1520 nextcloud-test-app-1 0.17% 94.79MiB / 3.704GiB 2.50% 14.4MB / 7.86MB 1.15MB / 2.97MB 4
6afaa39959bd nextcloud-test-cron-1 0.00% 552KiB / 3.704GiB 0.01% 787kB / 485kB 4.1MB / 4.1kB 1
e42c766fca96 nextcloud-test-db-1 0.03% 83.63MiB / 3.704GiB 2.20% 4.38MB / 12.9MB 18.5MB / 12.1MB 17
baa967863689 nextcloud-test-redis-1 0.37% 3.316MiB / 3.704GiB 0.09% 1.53MB / 1.19MB 4.1kB / 115kB 6
What may be causing such slowness? How can I troubleshoot?