Persistent Issue: Local External Storage Mount Not Appearing in Nextcloud Container (AIO v10.15.0)

Hello Nextcloud Community,

I’m facing a persistent problem with setting up local external storage using Nextcloud AIO and would be very grateful for any assistance. I’ve been through extensive troubleshooting, including full AIO configuration resets, but the issue remains.

The Basics

Nextcloud Server version:

Nextcloud Hub 10 (31.0.5) (as reported by nextcloud.log and AIO interface v10.15.0)

Operating system and version (Docker Host):

CachyOS (kernel 6.15.0-2-cachyos), Docker version 28.2.0, build 879ac3f88f, Docker Compose version 2.36.2)

Web server and version (inside AIO):

(Apache: Apache/2.4.63 (Unix), Server built: Feb 14 2025 19:15:30), (Caddy: Managed by AIO)

Reverse proxy and version:

Cloudflare, Caddy (internal to AIO mastercontainer, version managed by AIO)

PHP version (inside AIO Nextcloud container):

PHP 8.3.21 (cli) (built: May 9 2025 17:25:07) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.21, Copyright (c) Zend Technologies with Zend OPcache v8.3.21, Copyright (c), by Zend Technologies

Is this the first time you’ve seen this error?

Yes, with this specific attempt to configure local external storage.

When did this problem seem to first start?

Since initiating the setup of local external storage on this AIO instance.

Installation method:

Nextcloud AIO (All-in-One) via Docker Compose.

Are you using Cloudflare, mod_security, or similar?

Yes, Cloudflare is used for external access.

Summary of the issue you are facing:

I am trying to use a local directory on my Docker host (/mnt/mydrive/_-=Audio_Production/) as external storage in Nextcloud AIO. I have configured the NEXTCLOUD_MOUNT environment variable and the necessary volume mount in my docker-compose.yml for the nextcloud-aio-mastercontainer as per AIO documentation patterns.

The nextcloud-aio-mastercontainer correctly sees the host directory at the specified internal path (e.g., /aio-mounts/AudioProduction/) and has the NEXTCLOUD_MOUNT variable set (e.g., to /aio-mounts/). The AIO web interface also indicates it’s aware of this NEXTCLOUD_MOUNT setting.

However, the path is not being propagated or made available inside the nextcloud-aio-nextcloud application container. ls commands for the expected path (e.g., /aio-mounts/AudioProduction/ or /AudioProduction/) inside the nextcloud-aio-nextcloud container result in “No such file or directory.” Consequently, I cannot add this path as local external storage in the Nextcloud UI.

Crucial Context - Current Status of AIO Services:

All are running.

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

Host directory preparation:
    Host path: /mnt/mydrive/_-=Audio_Production/
    Permissions: Initially 1000:1000 with rwxrwxrwx. Later changed to chown -R 33:33 and chmod -R u=rwX,g=rX,o=rX. Also tried chown -R 1000:1000 and setfacl -R -m u:33:rwX and -dR -m u:33:rwX for the host path.

docker-compose.yml for nextcloud-aio-mastercontainer:

YAML

services:
  nextcloud-aio-mastercontainer:
    image: ghcr.io/nextcloud-releases/all-in-one:latest
    container_name: nextcloud-aio-mastercontainer
    restart: always
    init: true
    ports:
      - "8081:8080" # My mapped port
      - "8443:8443"
    environment:
      - APACHE_PORT=11000
      - APACHE_IP_BINDING=0.0.0.0
      - NEXTCLOUD_MOUNT=/aio-mounts/ # Tried /mnt/ as well previously
      # - NEXTCLOUD_DATADIR=/opt/nextcloud/NC_DATA # (Tried with and without this)
      # Other AIO env vars like TALK_PORT, UPLOAD_LIMIT etc. are also set
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock # Changed from :ro to :rw
      - /mnt/mydrive/_-=Audio_Production/:/aio-mounts/AudioProduction:rw
      - /dev/dri:/dev/dri # For hardware acceleration
volumes:
  nextcloud_aio_mastercontainer:
    external: true

Container Management:

    Multiple cycles of docker compose down, docker compose up -d --force-recreate performed after each significant change to docker-compose.yml.
    Complete AIO configuration reset performed multiple times by stopping containers, running docker volume rm nextcloud_aio_mastercontainer, and then docker compose up -d followed by re-running the AIO graphical setup wizard.

Verification Steps & Results:

    docker exec -it nextcloud-aio-mastercontainer printenv | grep NEXTCLOUD_MOUNT confirms NEXTCLOUD_MOUNT=/aio-mounts/.
    docker exec -it nextcloud-aio-mastercontainer ls -la /aio-mounts/AudioProduction/ SUCCESSFULLY lists files and shows correct ownership (either 33:33 or 1000:1000 when using ACLs for UID 33).
    docker exec -it nextcloud-aio-nextcloud ls -la /aio-mounts/AudioProduction/ FAILS: ls: cannot access '/aio-mounts/AudioProduction/': No such file or directory.
    docker exec -it nextcloud-aio-nextcloud ls -la /AudioProduction/ FAILS: ls: cannot access '/AudioProduction/': No such file or directory.
    The Nextcloud UI error when trying to add /aio-mounts/AudioProduction/ as local external storage is "Local storage path does not exist."

Log entries

Nextcloud (nextcloud.log from nextcloud-aio-nextcloud):

The nextcloud.log does not show specific errors related to this particular mount not appearing. The errors present are mostly related to dashboard widgets (Home Assistant, GitHub not configured) or previous issues (Theming job, Collabora previews before I fixed its URL config). The primary error for this issue is the “No such file or directory” from ls inside the nextcloud-aio-nextcloud container. I can provide full nextcloud.log or nextcloud-aio-mastercontainer logs if helpful.

Web Browser (Console/Network for external storage setup page):

No specific browser console errors appear when the UI shows “Local storage path does not exist.” The Network tab shows the API call for checking the path failing, consistent with the path not being accessible to the Nextcloud backend.

Web server / Reverse Proxy (nextcloud-aio-mastercontainer Caddy logs / nextcloud-aio-apache logs):

I can provide these if specific guidance is given on what to look for. The main issue seems to be the volume not being mounted into the nextcloud-aio-nextcloud container by the mastercontainer in the first place.

Configuration

Nextcloud (config.php):

Happy to provide occ config:list system or relevant parts of config.php if needed. Key settings like trusted_domains and overwrite.cli.url appear correct.

Apps (occ app:list):

External storage app (files_external) is enabled. Happy to provide the full list if needed.

I’ve tried to follow the AIO documentation regarding NEXTCLOUD_MOUNT and local storage, including the snippet indicating the path inside the Nextcloud container should be the same as the path configured under NEXTCLOUD_MOUNT in the mastercontainer (e.g., /aio-mounts/AudioProduction).

Given the persistence of this issue despite full resets, I’m wondering if there’s a deeper problem, a subtle misconfiguration I’m still missing, or a bug in how AIO v10.15.0 handles this specific type of volume propagation.

Any guidance or suggestions would be greatly appreciated!

Thank you for your time and help.

NEXTCLOUD_MOUNT should be set to the hosts source folder (/mnt/mydrive/_-=Audio_Production/ or one of its parents). Also, do not mount that volume under volumes. AIO will mount the volumes in the appropriate containers.

2 Likes

Hey there @jtr ! Thanks for the reply!

Interestingly enough, this hasn’t resolved the issue.

I followed your guidance, and was met with the same result. I also removed every container afterwards, and started anew (from the beginning aio setup again after having downed, removed all relevant containers, and then stood them up again using docker compose up -d —build —force-recreate) only to have it tell me the same result when I attempt to add the external storage location again. I have docker sock set with :rw as stated previously, also.

Something seems to be eluding me here?

Any further ideas? Any additional information I could provide to further assist in resolving this?

Hi, after your last change, are you able to see the files if you run LS from the container shell?