AIO Containers Won't Start - Doesn't seem to be a permissions issue... Maybe?

The Basics

Sorry, I don’t know the versions of the containers within AIO

  • Nextcloud Server version (e.g., 29.x.x):
    • AIO v11.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04.5 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • Apache v?
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • I will be using a Cloudflare tunnel
  • PHP version (e.g, 8.3):
    • I don't know what this is
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • At first laungh
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO docker container within a Linux VM on ProxMox
    • I am also trying to use a NFS share as the data directory
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes, Cloudflare

Summary of the issue you are facing:

When starting the AIO container from the web UI (IPAdd:8080), all containers will start except Apache, Nextcloud, and Notify Push.

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

  1. Within TrueNAS, I set ownership for the Nextcloud dataset to www-data(UID 33):root(GID 0), and access to 750. Both the TrueNAS system and the Ubuntu system have www-data UID and GID set as 33. I checked in the Ubuntu system and this all shows up correctly.
  2. With the configuration below, when I start the containers, I get 3 that won’t start. The first log entry is what I get for the Nextcloud container. (Sorry, I know there are more logs, but I don’t know where they are.)
  3. Seeing that this is a permissions issue, I tried setting the group to www-data(GID 33). No change
  4. I then set access to 777. I know this is bad. I just wanted to see if I could just get passed the issue. This gave me the second log entry. The permissions issue seems to have gone away, but it still won’t load the 3 containers.
  5. The solution that everyone seems to have luck with are the commands sudo chown -R 33:0 /mnt/ncdata && sudo chmod -R 750 /mnt/ncdata. These commands don’t work from the Ubuntu system as TrueNAS manages permissions, but as mentoned earlier, I did make sure this was set correctly.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

2025-06-09T00:03:04.016549564Z Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
2025-06-09T00:03:06.050479797Z               now              
2025-06-09T00:03:06.050528523Z -------------------------------
2025-06-09T00:03:06.050537126Z  2025-06-08 20:03:06.049429-04
2025-06-09T00:03:06.050544671Z (1 row)
2025-06-09T00:03:06.050551974Z 
2025-06-09T00:03:06.059125640Z + '[' -f /dev-dri-group-was-added ']'
2025-06-09T00:03:06.059525607Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-06-09T00:03:06.060520190Z + '[' -n '' ']'
2025-06-09T00:03:06.060560767Z + set +x
2025-06-09T00:03:06.073936537Z chown: cannot read directory '/mnt/ncdata': Permission denied
2025-06-09T00:03:06.077085601Z chmod: changing permissions of '/mnt/ncdata': Operation not permitted
2025-06-09T00:03:06.077949924Z chmod: cannot read directory '/mnt/ncdata': Permission denied
2025-06-09T00:03:06.097236069Z Connection to nextcloud-aio-redis (172.18.0.3) 6379 port [tcp/redis] succeeded!
2025-06-09T00:03:06.498178540Z The initial Nextcloud installation failed.
2025-06-09T00:03:06.498221560Z Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
2025-06-09T00:03:06.498230335Z See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance
2025-06-09T00:04:08.135573041Z Connection to nextcloud-aio-database (172.18.0.4) 5432 port [tcp/postgresql] succeeded!
2025-06-09T00:04:10.172236392Z               now              
2025-06-09T00:04:10.172339104Z -------------------------------
2025-06-09T00:04:10.172349259Z  2025-06-08 20:04:10.171015-04
2025-06-09T00:04:10.172357255Z (1 row)
2025-06-09T00:04:10.172364978Z 
2025-06-09T00:04:10.181068683Z + '[' -f /dev-dri-group-was-added ']'
2025-06-09T00:04:10.181537073Z ++ find /dev -maxdepth 1 -mindepth 1 -name dri
2025-06-09T00:04:10.182537093Z + '[' -n '' ']'
2025-06-09T00:04:10.182568833Z + set +x
2025-06-09T00:04:10.212039582Z Connection to nextcloud-aio-redis (172.18.0.3) 6379 port [tcp/redis] succeeded!
2025-06-09T00:04:10.585524110Z The initial Nextcloud installation failed.
2025-06-09T00:04:10.585583644Z Please reset AIO properly and try again. For further clues what went wrong, check the logs above.
2025-06-09T00:04:10.585595992Z See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance

I know there are other logs and useful information, but I don’t know where to find it. I will provide anything else I can if told how.

Configuration

Nextcloud

docker-compose.yml:

  nextcloud:
    image: ghcr.io/nextcloud-releases/all-in-one:latest
    container_name: nextcloud-aio-mastercontainer
    init: true
    environment:
      NEXTCLOUD_DATADIR: /mnt/nextcloud
      SKIP_DOMAIN_VALIDATION: true
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 80:80
      - 8080:8080
      - 8443:8443
    restart: always

Unfortunately, my ISP uses CGNAT. My plan was to make Nextcloud accessible locally and use a Cloudflare tunnel to access from outside my house. It’s my understanding that I need the SKIP_DOMAIN_VALIDATION line to do this. I am also trying to use a NFS share from TrueNAS Core as my data directory, hence the NEXTCLOUD_DATADIR line. My share will only be accessible by Nextcloud.

Hello @Jay_001,

welcome to the Nextcloud community! :handshake:

your config refers to mnt/nextcloud

but logs complains about /mnt/ncdata

I suppose there is something wrong with your bind mounts/config

Hi Willi, this is correctly configured. NEXTCLOUD_DATADIR: /mnt/nextcloud will mount the chosen directory from the host into '/mnt/ncdata' inside the nextcloud container.

Also see GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

1 Like

Also see all-in-one/manual-install/latest.yml at e0916df031bc6d23412ac799830682f73febc9c3 · nextcloud/all-in-one · GitHub. It is probably a bit more verbose there how things are configured internally

Interesting that apache and Notify Push dont use the environment variable that i set for the data dir. It makes sense. Why would they. I just assumed that the issue would be the same for all 3 containers. I’ll take a look at those to. I need to find the proper log files. I know what im looking at is lacking. We’re taking off for the weekend so hopefully I can get back on it Monday.

It seems I was wrong about there being better logs, which really leaves me stuck. I did look at the other containers. They are waiting for the Nextcloud container to start. Previous comments suggest I have everything set up correctly. Without any other ideas, I tried adjusting permissions again, but this time doing a proper reset per the instructions on git hub between every change. This didn’t seem to make a difference.

What are the permissions of the /mnt directory?

/mnt was root:root 755
I changed its ownership and properties as well with no success. I didn’t do a proper aio reset in between each attempt. This takes a while. I should have the time to try that in the next day or two. Though I don’t know that that is really necessary for permission changes.

Well I never did get it running. If anyone else is having similar issues, my solution was unfortunately switching to FileBrowser Quantum. Sorry, I know this is a Nextcloud forum. Maybe there’s something about my particular setup that’s causing issues.
Thanks for the help.

Hi, I know it doesnt help you anymorw but I had a look another time and I most likely found the issue. Please compare:

And

So in your case you would have needed to adjust the permissions for /mnt/nextcloud and not /mnt/ncdata.

1 Like