Nextcloud in a Container
Nextcloud is running as a Docker container on my Home Lab.
Previously, I used to run the container on a dedicated server, and store the data separately on my Synology NAS (Nextcloud Storing Data on NAS. Now since the container runs). Now, everything runs on the NAS.
Maintenance
- When upgrading, make sure to not skip version numbers such as going from 15 directly to 17.
- Always rebuild the
nextcloud-app
container withdocker-compose up -d --build
after upgrading to avoid starting the previously built image (with the old version) - Run the nextcloud
occ
commands in the container with the php user:docker --context server exec --user www-data -it nextcloud-app php occ status
(Nextcloud OCC Commands) - Connect to the database with
docker --context server exec --user www-data -it nextcloud-db mysql -u root -p'MYDBPASSWD' -D nextcloud