Hi all,
i recently installed nextcloud on my raspberry pi 5 following chrisbeardyâs tutorial on github.
Docker is installed using the following docker-compose.yaml:
version: '3'
volumes:
nextcloud-data:
nextcloud-db:
networks:
frontend:
external:
name: proxy
backend:
services:
nextcloud-app:
image: nextcloud
restart: always
volumes:
- nextcloud-data:/var/www/html
environment:
- MYSQL_PASSWORD=REDACTED
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=nextcloud-db
- PHP_UPLOAD_LIMIT=10G
- PHP_MEMORY_LIMIT=512M
networks:
- frontend
- backend
nextcloud-db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
volumes:
- nextcloud-db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=REDACTED
- MYSQL_PASSWORD=REDACTED
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
networks:
- backend
Everything was running fine for approximately 2 months until today i decided to try updating nextcloud to the newest version.
So following the nextcloud docker github documentation i sshâd to my raspberry entered the nextcloud directory (where the afformentioned docker-compose.yml resides) and ran
docker compose pull
docker compose up -d
watching docker compose do the work and thinking to myself "well this is very nice and easy - i wonder why i didnât try to update sooner.
So after docker compose finished without errors, i excitedly opened my nextcloud url (schlichcloud.goip.de
) and somewhat disapointed find an error message telling me that an update is required and that i should run the command line updater.
Well a minor mishap - i somewhat naively think to myself - and off i go to ask doctor google how to run the command line interpreter. A little while later i ran
docker exec --user www-data -it nextcloud-nextcloud-app-1 bash
/usr/src/nextcloud/occ upgrade -v
Okay, easy enough, i guess - but oh no:
Cannot write into "config" directory.
This can usually be fixed by giving the web server write access to the configs directory.
So i exit docker exec and reenter as root using chown to transfer ownership of /var/www/html/config/
to user www-data
, exited and reenter docker exec as www-data and tried to run /usr/src/nextcloud/occ upgrade -v
again. But now it gives me another error:
Nextcloud is not installed - only a limited number of commands are available
Cannot write into "apps" directory.
This can usually be fixed by giving the web server write access to the apps directory or disabling the App Store in the config file.
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /usr/src/nextcloud/lib/private/Console/Application.php:137
Stack trace:
#0 /usr/src/nextcloud/console.php(81): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /usr/src/nextcloud/occ(11): require_once('/usr/src/nextcl...')
So i reentered docker exec as root, thinking "well okay, iâm just gonna chown /var/www/html/apps/
to user áşww-data. But to my surprise it was allready owned by áşww-data
.
I have been googling potential solutens for the past hour and a half or so and am out of my wits.
Any help would be greatly appreaciated.