Is setting NEXTCLOUD_DATA_DIR recommended in Nextcloud AIO to explicitly point user data to a mounted volume, or does NEXTCLOUD_MOUNT alone suffice?

  • Nextcloud Server version: 32.0.6.1

  • Operating system and version: Ubuntu Server 24.04

  • Web server and version: Apache/2.4.66

  • Reverse proxy and version: n/a

  • PHP version (e.g, 8.3): PHP 8.3.30

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

  • When did this problem seem to first start? Today

  • Installation method : AIO Docker

  • Are you using CloudfIare, mod_security, or similar? No

Summary of the issue:

Got Nextcloud setup on my DNS domain. Trying to mount user directories from my Nextcloud install to my DAS without shipping the entire installation over so it can run on my mini pc SSD.

The Nextcloud External Storage UI app has some apparently reported bug in it. It honestly doesn’t appear to mount other directories from what I have seen reported and tried. Also cannot use symlinks instead of bind mounts. Usins only for 3 accounts.

I am debating recreating the whole Nextcloud installation as I have documented my own for ease of setup.

I have not had any success with mapping Nextcloud external storage to my DAS array and have noticed even though I am using AIO I can see in the Nextcloud Docker Github README:

Custom Data directory (datadirectory)

If you don’t want to use the default data directory (datadirectory) location, you can set a custom one:

NEXTCLOUD_DATA_DIR (default: /var/www/html/data)

Configures the data directory where nextcloud stores all files from the users.

I notice that is different to what is mentioned in AIO README:

By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable NEXTCLOUD_MOUNT to the docker run command of the mastercontainer

As I have not made any progress, I am wondering if I should Borgbackup in the server UI and reinstall from scratch as per this github answer about Changing the data directory?

Steps to replicate:

  1. Create /mnt/md1/ncdata/Jordan Nash/files on your DAS or whatever.

  2. You will see these permissions:

    ls -ld "/mnt/md1/ncdata/Jordan Nash/files"

    drwxr-xr-x 7 www-data www-data 4096 Apr 17 07:33 '/mnt/md1/ncdata/Jordan Nash/files'

  3. Instead of using the UI use CLI like this and get these outputs:

    docker exec -it nextcloud-aio-nextcloud php occ files_external:create "Jordan's Files" local null::null -c datadir="/mnt/md1/ncdata/Jordan Nash/files"
    
                                                                        
      There are no commands defined in the "files_external" namespace.  
                                                                        
    
    docker exec -it nextcloud-aio-nextcloud php occ app:enable files_external
    files_external 1.24.1 enabled
    
    docker exec -it nextcloud-aio-nextcloud php occ files_external:create "Jordan's Files" local null::null -c datadir="/mnt/md1/ncdata/Jordan Nash/files"
    Storage created with id 7
    
  4. Use symbolic links:

    sudo ln -s "/mnt/md1/ncdata/Jordan Nash/files" "/mnt/md1/ncdata/Jordan Nash/Shared-Files"
    
  5. Logging into the UI and going to that Shared-FIles folder shows me nothing and uploading files to it also does nothing on the RAID array I setup for it as per that ncdata folder.

Log entries

Nextcloud.log

Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 7:57:24 PM

Warning
PHP
Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 7:55:28 PM

Warning
PHP
Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 7:27:45 PM

Warning
PHP
Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 6:14:21 PM

Warning
PHP
Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 5:39:07 PM

Warning
no app in context
StorageNotAvailableException
Local storage path does not exist "/mnt/md1/ncdata/Jordan Nash/files/"

Apr 17, 2026, 5:27:40 PM

Warning
PHP
Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 5:27:34 PM

Warning
no app in context
StorageNotAvailableException
Local storage path does not exist "/mnt/md1/ncdata/Jordan Nash/files/"

Apr 17, 2026, 5:21:47 PM

Warning
PHP
Undefined array key "node" at /var/www/html/custom_apps/notes/lib/Service/NoteUtil.php#201

Apr 17, 2026, 5:18:20 PM

Configuration

The output of occ config:list system

=== Mastercontainer Log (Last 100 lines) ===
Trying to fix docker.sock permissions internally...
Creating docker group internally with id 988
Initial startup of Nextcloud All-in-One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080
⚠️ Important: do always use an ip-address if you access this port and not a domain as HSTS might block access to it later!

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443
[Thu Apr 16 22:26:16.349239 2026] [mpm_event:notice] [pid 163:tid 163] AH00489: Apache/2.4.66 (Unix) OpenSSL/3.5.5 configured -- resuming normal operations
[Thu Apr 16 22:26:16.349303 2026] [core:notice] [pid 163:tid 163] AH00094: Command line: 'httpd -D FOREGROUND'
[16-Apr-2026 22:26:16] NOTICE: fpm is running, pid 168
[16-Apr-2026 22:26:16] NOTICE: ready to handle connections
Total reclaimed space: 0B

=== System Config ===
{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "consolecommando.duckdns.org",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "consolecommando.duckdns.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "32.0.6.1",
        "overwrite.cli.url": "https:\/\/consolecommando.duckdns.org\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatechecker": true,
        "updatedirectory": "\/nc-updater",
        "app_install_overwrite": [
            "nextcloud-aio"
        ],
        "loglevel": 2,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "DOMAIN": "consolecommando.duckdns.org",
        "AIO_VERSION": "v12.8.0"
    }
}

Apps

The output of occ app:list

=== App List ===
Enabled:
  - activity: 5.0.0
  - admin_audit: 1.22.0
  - bruteforcesettings: 5.0.0
  - calendar: 6.2.2
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.3.8
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.4
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.1
  - files_pdfviewer: 5.0.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - firstrunwizard: 5.0.0
  - logreader: 5.0.0
  - lookup_server_connector: 1.20.0
  - nextcloud-aio: 0.8.0
  - nextcloud_announcements: 4.0.0
  - notes: 4.13.1
  - notifications: 5.0.0
  - notify_push: 1.3.1
  - oauth2: 1.20.0
  - password_policy: 4.0.0
  - photos: 5.0.0
  - privacy: 4.0.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - recommendations: 5.0.0
  - related_resources: 3.0.0
  - richdocuments: 9.0.5
  - serverinfo: 4.0.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.11
  - support: 4.0.0
  - survey_client: 4.0.0
  - systemtags: 1.22.0
  - tasks: 0.17.1
  - text: 6.0.1
  - theming: 2.7.0
  - twofactor_admin: 4.11.1
  - twofactor_backupcodes: 1.21.0
  - twofactor_totp: 14.0.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - whiteboard: 1.5.7
  - workflowengine: 2.14.0
Disabled:
  - app_api: 32.0.0 (installed 32.0.0)
  - encryption: 2.20.0
  - suspicious_login: 10.0.0
  - twofactor_nextcloud_notification: 6.0.0
  - user_ldap: 1.23.0

Hi, have you already tried using NEXTCLOUD_DATADIR instead? 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. · GitHub

PS: you seem to mix docs of different projects.