Nextcloud Docker Permissions

  • Nextcloud Server version (e.g., 29.x.x):
    -Nextcloud AIO v11.6.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu Server 24.04.3 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • ? New Install
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • None
  • PHP version (e.g, 8.3):
    • ? New Install
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • When I messed around with permissions
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I have been using nextcloud snap up until this install, whereby I would use a third party app to backup the database and user data. This would also backup things like the tasks, users, email settings, etc
On reinstall I could use the same backup app to reinstate the files, database etc, start snap and job done. I don’t want to go back to snap as more people are starting to use my server and snap is showing its limitations.

I would like to do the same / similar with docker AIO, however I know there is the extra step of permissions.

Also I have not found where tasks, settings and database are stored.

Steps to replicate it (hint: details matter!):

  1. Install AIO and get it up and running.
  2. in Terminal - sudo systemctl stop docker
  3. use nautilus to copy files and folders to /var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/
  4. sudo chown -R www-data:www-data /var/lib/docker/volumes/nextcloud_aio_nextcloud_data
  5. sudo systemctl start docker; allow it to start and make sure website is accessible.
  6. sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all

So, the above works perfectly. However, in anticipation (Bull at a gate) of finding the tasks and database I changed item 4. to /var/lib/docker/volumes
This seems to have broken the containers Apache, Nextcloud, Database, Notify Push.

Therefore, can anyone tell me what I should be backing up in future and what permissions the containers require.

I know there is a built in / downloadable backup solution but I would prefer to keep using my third party app as it will still be used for other parts of my server.

Thanks,
Dave

The migration doc for AIO should offer some hints (though it’s for the reverse of what you’re doing I guess).

1 Like

use search many topics exist e.g. 101: backup what and why (not how)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.