rootless Docker Nextcloud AIO

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud 32.0.5
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Since installation
  • 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 am having problems installing Nextcloud AIO with docker rootless. Specifically, I have a problems with file permission. This is the situation of my containers:

Apache and Notify Push can’t ping Nextcloud. So I hope that when the Nextcloud work the other two will start to work as well. Yesterday the nextcloud container was not working because of this error:



Connection to nextcloud-aio-database (172.18.0.7) 5432 port [tcp/postgresql] succeeded!

+ '[' -f /dev-dri-group-was-added ']'

++ find /dev -maxdepth 1 -mindepth 1 -name dri

+ '[' -n '' ']'

+ set +x

chown: cannot read directory '/mnt/ncdata': Permission denied

chmod: changing permissions of '/mnt/ncdata': Operation not permitted

chmod: cannot read directory '/mnt/ncdata': Permission denied

rm: cannot remove '/mnt/ncdata/this-is-a-test-file': Permission denied

Connection to nextcloud-aio-redis (172.18.0.9) 6379 port [tcp/redis] succeeded!

touch: cannot touch '/mnt/ncdata/this-is-a-test-file': Permission denied

The www-data user does not appear to have access rights to the data directory.

It is possible that the files are on a filesystem that does not support standard Linux permissions,

or the permissions simply need to be adjusted. Please change the permissions as described below.

Current permissions are:

65534:65534 750

(userID:groupID permissions)

They should be:

33:0 750

(userID:groupID permissions)

Also, ensure that all parent directories on the host of your chosen data directory are publicly readable.

For example: sudo chmod +r /mnt  (adjust this command as needed).

If you want to use a FUSE mount as the data directory, add 'allow_other' as an additional mount option.

For SMB/CIFS mounts as the data directory, see:

  https://github.com/nextcloud/all-in-one#can-i-use-a-cifssmb-share-as-nextclouds-datadir

Connection to nextcloud-aio-database (172.18.0.7) 5432 port [tcp/postgresql] succeeded!

+ '[' -f /dev-dri-group-was-added ']'

++ find /dev -maxdepth 1 -mindepth 1 -name dri

+ '[' -n '' ']'

+ set +x

chown: cannot read directory '/mnt/ncdata': Permission denied

chmod: changing permissions of '/mnt/ncdata': Operation not permitted

chmod: cannot read directory '/mnt/ncdata': Permission denied

rm: cannot remove '/mnt/ncdata/this-is-a-test-file': Permission denied

Connection to nextcloud-aio-redis (172.18.0.9) 6379 port [tcp/redis] succeeded!

touch: cannot touch '/mnt/ncdata/this-is-a-test-file': Permission denied

The www-data user does not appear to have access rights to the data directory.

It is possible that the files are on a filesystem that does not support standard Linux permissions,

or the permissions simply need to be adjusted. Please change the permissions as described below.

Current permissions are:

65534:65534 750

(userID:groupID permissions)

They should be:

33:0 750

(userID:groupID permissions)

I have read then about “Rootless Mapping Math“, and the fact that the folder NEXTCLOUD_DATADIR should belong to `100032:100032` all-in-one/docker-rootless.md at main · nextcloud/all-in-one · GitHub .Changing the permission to that folder fixed the permission error, But now `docker logs nextcloud-aio-nextcloud --tail 50` returns another error.

2026-02-18 14:21:23.51648+01
(1 row)

‘[’ -f /dev-dri-group-was-added ‘]’
++ find /dev -maxdepth 1 -mindepth 1 -name dri

‘[’ -n ‘’ ‘]’

set +x
Connection to nextcloud-aio-redis (172.18.0.7) 6379 port [tcp/redis] succeeded!
The initial Nextcloud installation failed.
For more information about what went wrong, check the logs above.
Please reset AIO properly and try again.
See:


Connection to nextcloud-aio-database (172.18.0.10) 5432 port [tcp/postgresql] succeeded!
now




2026-02-18 14:22:26.240897+01
(1 row)

‘[’ -f /dev-dri-group-was-added ‘]’
++ find /dev -maxdepth 1 -mindepth 1 -name dri

‘[’ -n ‘’ ‘]’

set +x
Connection to nextcloud-aio-redis (172.18.0.7) 6379 port [tcp/redis] succeeded!
The initial Nextcloud installation failed.
For more information about what went wrong, check the logs above.
Please reset AIO properly and try again.
See: https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance



Connection to nextcloud-aio-database (172.18.0.10) 5432 port [tcp/postgresql] succeeded!
now




2026-02-18 14:23:28.98202+01
(1 row)

‘[’ -f /dev-dri-group-was-added ‘]’
++ find /dev -maxdepth 1 -mindepth 1 -name dri

‘[’ -n ‘’ ‘]’

set +x
Connection to nextcloud-aio-redis (172.18.0.7) 6379 port [tcp/redis] succeeded!
The initial Nextcloud installation failed.
For more information about what went wrong, check the logs above.
Please reset AIO properly and try again.
See:
https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance


My question is, what to do now? Am I supposed to change the permission of the volumes too? They are currently 1000:1000

me@host:/data/docker/volumes$ ls -nd *
brw------- 1 1000 1000 252, 0 Feb 15 14:04 backingFsBlockDev
-rw------- 1 1000 1000 32768 Feb 18 13:05 metadata.db
drwx-----x 3 1000 1000 4096 Feb 16 22:43 nextcloud_aio_apache
drwx-----x 3 1000 1000 4096 Feb 16 22:42 nextcloud_aio_database
drwx-----x 3 1000 1000 4096 Feb 16 22:42 nextcloud_aio_database_dump
drwx-----x 3 1000 1000 4096 Feb 16 22:36 nextcloud_aio_mastercontainer
drwx-----x 3 1000 1000 4096 Feb 16 22:42 nextcloud_aio_nextcloud
drwx-----x 3 1000 1000 4096 Feb 16 22:42 nextcloud_aio_redis

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

  1. Try to install nextcloud AIO as docker rootless following the instructions all-in-one/docker-rootless.md at main · nextcloud/all-in-one · GitHub

Hi, please check all-in-one/docker-rootless.md at main · nextcloud/all-in-one · GitHub

Well, that link is the document where I have start from. Which part of the doc you do not see reflected in my post?

Probably this one: all-in-one/docker-rootless.md at c5b088ef3385fb5119f1551b225b275132972b92 · nextcloud/all-in-one · GitHub

I can confirm that all the volumes belong to the user running docker rootless

Did you see the note about the userid and groupid 100032:100032 ?

Btw, this is probably easier to read: all-in-one/docker-rootless.md at main · nextcloud/all-in-one · GitHub

1 Like

yes, this is the tutorial that I was following.
I have removed /data/nextcloud, and created a new folder with a different name, but same permission. I have set the path of that folder for the variable NEXTCLOUD_DATADIR in the compose.yml file.
The permission to the backup and nextcloud folder have been set with sudo chown -R 100032:100032.

I have just reset the instances following this GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Then recreated again the containers with compose up -d.

And it finally worked. What I think was happening is that the content of the nextcloud folder from the previous docker root installation was interferring with the creation process.

2 Likes

Yes, it is in my first post, thanks

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