[SOLVED] Blank External Storage UI & CIFS Issues (Docker on Ubuntu)

Hello Nextcloud Community,

I am experiencing extremely persistent and unusual issues with external storage (SMB/CIFS) configuration and display, which has affected two different Nextcloud installations (Snap and Docker) on my Ubuntu server. I’m hoping to get some insight or a solution from the community, as I’ve exhausted standard troubleshooting.

My primary goal is to connect Nextcloud to a CIFS/SMB share located on a Windows Server 2019.

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).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version: 31.0.6.2
  • Operating system and version: Ubuntu 24.04 (Noble Numbat) - Command Line Interface (CLI) only
  • Web server and version: Apache 2.4.62 (Debian) (running inside Docker container)
  • Reverse proxy and version: None (Accessing directly via IP)
  • PHP version: 8.3.22 (running inside Docker container)
  • Is this the first time you’ve seen this error? (Yes / No): Yes, for this specific setup and its persistent nature.
  • When did this problem seem to first start?: Immediately after fresh installation of Nextcloud (both Snap and Docker versions) upon attempting to configure external storage.
  • Installation method: Docker Compose (Previously attempted with Nextcloud Snap, encountering similar issues.)
  • Are you using Cloudflare, mod_security, or similar?: No

Summary of the issue you are facing:

I am consistently unable to configure or view external storage within Nextcloud. The “Administration settings → External storages” page displays as blank (no input fields or table to add/list storage), and attempts to configure via occ commands either result in errors or do not make the external storage contents visible. This issue persisted across both a Nextcloud Snap installation and the current Nextcloud Docker Compose installation.

My primary goal is to connect to a CIFS/SMB share hosted on a Windows Server 2019 at 192.168.1.10 with share name Client Files Server .

Steps to replicate it:

  1. Start with a clean installation of Ubuntu Server 24.04 (CLI).
  2. Install Docker Engine and Docker Compose Plugin following official Docker documentation.
  3. Deploy Nextcloud using docker-compose.yml (MariaDB + Nextcloud image nextcloud:latest ).
  • db.env content (sanitized):
MYSQL_ROOT_PASSWORD=<sanitized_db_root_password>
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=<sanitized_db_password>
  • docker-compose.yml content:
version: '3'

services:
  db:
    image: mariadb:10.6
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    env_file:
      - db.env
    networks:
      - nextcloud-net

  app:
    image: nextcloud:latest
    restart: always
    ports:
      - 80:80
    volumes:
      - nextcloud:/var/www/html
      # Host-side CIFS mount (was attempted here, but later removed)
      # - /mnt/nextcloud_files:/mnt/nextcloud_cifs_in_docker
    env_file:
      - db.env
    environment:
      MYSQL_HOST: db
      NEXTCLOUD_TRUSTED_DOMAINS: localhost 127.0.0.1 192.168.1.250 nextcloud.mxprivate.top
    depends_on:
      - db
    networks:
      - nextcloud-net

volumes:
  db:
  nextcloud:

networks:
  nextcloud-net:
    driver: bridge
  1. Access the Nextcloud web UI via http://192.168.1.250 , complete the initial administrator and database setup.
  2. Navigate to “Administration settings” → “Apps” and confirm “External storage” app (files_external ) is enabled.
  3. Go to “Administration settings” → “External storages”. The page consistently displays as blank, showing “No external storage configured or you don’t have the permission to configure them”, with no input fields or table to add/list storage . (Screenshot available if needed, showing the blank UI).

Detailed Troubleshooting History & Further Symptoms:

  • Initial Attempt (Nextcloud Snap on Ubuntu 24.04):
    • Experienced the exact same blank “External storages” UI.
    • Also encountered “chmod: changing permissions of ‘/tmp/pids’: Operation not permitted” and “home directories outside of /home needs configuration” errors during occ files:scan , stemming from Snap’s confinement and www-data 's home directory not being under /home . This led to the decision to switch to Docker.
  • CIFS Host Mount & Docker Bind-Mount Issues (Docker Compose on Ubuntu 24.04):
    • Attempted to mount CIFS share on the Ubuntu host and bind-mount it into the Docker container.
    • fstab example (original and modified during troubleshooting): //192.168.1.10/Client\040Files\040Server /mnt/nextcloud_files cifs credentials=/etc/cifs-credentials,uid=www-data,gid=www-data,iocharset=utf8,file_mode=0770,dir_mode=0770,vers=default,acl,nofail,x-systemd.automount 0 0 (Also tested with uid=0,gid=0,file_mode=0777,dir_mode=0777 , and adding nounix,vers=3.0 options.)
    • sudo ls -ld /mnt/nextcloud_files on host consistently showed correct ownership and permissions (e.g., drwxrwx--- www-data www-data or drwxrwxrwx root root ).
    • However, docker exec --user www-data nextcloud-docker-app-1 ls -l /mnt/nextcloud_cifs_in_docker consistently showed total 0 (empty), indicating the contents of the CIFS mount were not propagating into the Docker container’s bind mount . This was the root cause of files not appearing, regardless of Nextcloud UI.
  • occ files_external:create for local storage (bind-mounted):
    • Command: docker exec --user www-data nextcloud-docker-app-1 php occ files_external:create "Client_Files" local null::null --config "datadir=/mnt/nextcloud_cifs_in_docker" --user="administrator"
    • Result: storage created id 1 (success).
    • Nextcloud “Files” app shows Client_Files folder, but it is empty (due to the bind-mount propagation problem).
  • occ files_external:create for smb (direct connect) failures:
    • Confirmed files_external_samba app is not a separate downloadable app for Nextcloud 31.0.6.2 (it’s integrated into files_external ).
    • docker exec --user www-data nextcloud-docker-app-1 php occ app:list shows files_external: 1.15.0 (enabled).
    • Attempts to use occ app:enable files_external_samba resulted in “could not download app files_external_samba”, even though container network connectivity and DNS are confirmed working (docker exec ... curl http://example.com returns HTML).
    • Write permissions in /var/www/html/apps are confirmed (touch command works).
    • docker exec --user www-data nextcloud-docker-app-1 php occ files_external:backends output confirms smb is a storage backend (identifier: smb ) and password::logincredentials is an auth backend.
    • Multiple attempts to create the SMB share via occ files_external:create using provided SMB credentials (username: “Nextcloud SMB user”, password: “Ryan2014”) failed with varying errors, indicating a syntax/parsing issue for passing host/share/user/password parameters directly via occ for SMB. Example failed commands:
      • docker exec ... files_external:create "SMB_Share" smb password::logincredentials --config "host=192.168.1.10" --config "share=Client Files Server" --config "user=Nextcloud SMB user" --config "password=Ryan2014" --user="administrator"Unknown configuration for backends "user"
      • docker exec ... files_external:create "SMB_Share" smb password::logincredentials "192.168.1.10" "Client Files Server" "Nextcloud SMB user" "Ryan2014" --user="administrator"Too many arguments to "files_external:create" command, expected arguments "mount_point" "storage_backend" "authentication_backend".

Log entries

Nextcloud

(Note: Full log output is omitted here for brevity in this document. I will provide the entire raw nextcloud.log content on the actual forum post if requested, or link to a pastebin/gist. The log generally shows INFO/DEBUG messages and deprecation warnings, but no critical errors directly related to files_external or UI rendering during troubleshooting attempts.)

Example relevant log line:

{"reqId":"QYX7FRz0ad0LpkHL9YZl","level":0,"time":"2025-06-18T21:57:07+00:00","remoteAddr":"192.168.1.27","user":"administrator","app":"settings","method":"GET","url":"/settings/ajax/checksetup","message":"Can not connect to local server for running setup checks","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36","exception":{"Exception":"GuzzleHttp\\Exception\\ConnectException","Message":"cURL error 7: Failed to connect to 192.168.1.250 port 443 after 0 ms: Couldn't connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://192.168.1.250/data/.ncdata","Code":0,"Trace":[...]}}

Console output (no red errors, only warnings):

[NC] core: Clipboard API not available, using clipboardfallback.js:13 (Warning)
[SJS] DEBUG: Heartbeat polling started session-heartbeat.js:13 (Debug message)
Deprecated feature used: unload event listeners are deprecated and will be removed core-common.js:1 (Warning)

Web server / Reverse Proxy

(Note: Full web server logs from inside the Docker container are omitted here for brevity. They show normal Apache access logs (HTTP 200 OK for page loads) and no critical errors related to serving the external storage UI. The Apache FQDN warning is present but not related to the issue.)

Example log line:

192.168.1.27 - - [18/Jun/2025:21:35:30 +0000] "GET /settings/user/externalstorages HTTP/1.1" 200 12774 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"

Configuration

Nextcloud

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => 'ocfmboq73mxd',
  'passwordsalt' => '<SANITIZED_PASSWORDSALT>',
  'secret' => '<SANITIZED_SECRET>',
  'trusted_domains' =>
  array (
    0 => '192.168.1.250',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '31.0.6.2',
  'overwrite.cli.url' => 'http://192.168.1.250',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '<SANITIZED_DB_PASSWORD>',
  'installed' => true,
  'maintenance' => false,
);

Apps

# Output of docker exec --user www-data nextcloud-docker-app-1 php occ app:list
Enabled apps:
- activity: 2.21.0
- audioplayer: 4.1.0
- autofill: 1.0.0
- bruteforcesettings: 2.1.0
- calendar: 5.3.0
- circles: 24.0.0
- cloud_federation_api: 1.12.0
- comments: 2.15.0
- contacts: 5.6.0
- contactsinteraction: 1.11.0
- cookbook: 0.16.0
- dashboard: 7.7.0
- dav: 2.25.0
- deck: 1.13.0
- federatedfilesharing: 1.15.0
- federation: 1.15.0
- files: 2.18.0
- files_external: 1.15.0 (This is the "External storage" app)
- files_pdfviewer: 2.10.0
- files_reminders: 1.5.0
- files_rightclick: 1.10.0
- files_trashbin: 1.15.0
- files_versions: 1.18.0
- files_videoplayer: 1.14.0
- firstrunwizard: 2.17.0
- forms: 2.4.0
- groupfolders: 15.1.0
- logreader: 2.10.0
- lookup_server_connector: 1.13.0
- mail: 3.8.0
- metadata: 0.1.0
- nextcloud_announcements: 1.14.0
- notifications: 2.14.0
- oauth2: 1.13.0
- password_policy: 1.15.0
- photos: 2.2.0
- privacy: 1.10.0
- provisioning_api: 1.15.0
- recommendations: 2.1.0
- related_resources: 1.0.0
- richdocuments: 8.6.0
- serverinfo: 1.15.0
- settings: 1.0.0
- sharebymail: 1.15.0
- sharing: 2.10.0
- spreed: 20.0.0
- survey_client: 1.10.0
- systemtags: 1.15.0
- text: 3.10.0
- theming: 1.16.0
- twofactor_backupcodes: 1.14.0
- updatenotification: 1.15.0
- user_external: 1.15.0
- user_ldap: 1.15.0
- user_status: 1.3.0
- viewer: 1.9.0
- weather_status: 1.3.0
- workflowengine: 2.10.0
Disabled apps:
- app_api: 1.2.0
- user_key_manager: 1.0.0
- user_oidc: 1.15.0

Couple things stand out:

  • Samba is not built into the micro-services image, but easily added (see Examples)
  • You stated you’re not using a reverse proxy but you appear to have https configured somewhere
  • Use occ config:list system to see your real config; do not just look at/post your config/config.php file
  • There is no such thing as files_external_samba. Not sure where you found that reference.
  • The UI matter (blank page): it’s only this settings page? Did you check the Network tab of your browser inspector while doing a full shift-refresh? how about a different browser? or maybe private browsing mode w/o any extensions enabled? etc.
  • Any warnings or errors under Admin settings->Overview?
  • The Snap version has its own documentation and instead of occ use sudo nextcloud.occ

Thank you so much for the incredibly helpful and insightful reply!

I really appreciate the clarification that Samba is not built into the Nextcloud Docker image by default . That explains a lot. I’ll search the official Docker documentation (like the nextcloud/docker GitHub repo) for “Examples” on how to properly add Samba support to the nextcloud:latest image.

Regarding the UI issue:

  • With the Snap version , the “External storages” page was initially working , allowing me to create a local test storage. However, it went permanently blank after I deleted that test storage via occ .
  • With the current Docker setup , the “External storages” UI has never worked from the start; it’s always been blank.

I’ve already tried all the suggested browser troubleshooting steps (different browser, private mode, console tab shows no red errors, only warnings). The general warnings on the Admin settings → Overview page are present, but no other critical errors.

I’m quite new to self-hosting and Ubuntu server admin, but I do have some scripting experience and I’m very keen to learn. Thanks again for pointing me in the right direction!

I’ll update if I get it working!

Hello everyone,

I’m thrilled to report back that with the community’s help, my issue is now 100% solved!

A huge thank you to [jtr] for their reply. The insight that “Samba is not built into the micro-services image” was a critical clue that helped re-frame the problem. It led me down the path to the correct and now perfectly working solution.

For anyone else facing a similar array of issues, here is a summary of my journey and the final, successful configuration.

The Winning Strategy

The solution was to not try and connect to the SMB/CIFS share from inside the Nextcloud Docker container (which would require a custom Docker image with Samba tools).

Instead, the successful method was:

  1. Mount the Windows CIFS share directly onto the Ubuntu host server.
  2. Pass that host mount point into the Nextcloud container as a simple bind-mount volume.
  3. Configure Nextcloud’s External Storage app to use this as a Local storage type.

Summary of Problems & Final Solutions

Here are the steps that fixed every issue from my original post:

1. The Host CIFS Mount (fstab): The first step was getting a stable mount on the Ubuntu host itself.

  • Problem: Permission denied and No such file or directory errors.
  • Solution: After much troubleshooting, the key was to rename the Share on the Windows Server from "Client Files Server" to a simple name without spaces (ClientFiles). This instantly solved the mounting problems.
  • Final /etc/fstab entry: //192.168.1.10/ClientFiles /mnt/nextcloud_files cifs credentials=/etc/cifs-credentials,uid=www-data,gid=www-data,iocharset=utf8,file_mode=0770,dir_mode=0770,nofail 0 0 The uid=www-data,gid=www-data was also critical.

2. Docker Bind-Mount: Making the host mount visible to the Nextcloud container.

  • Problem: The container couldn’t see the files in the host’s /mnt/nextcloud_files directory.
  • Solution: We added a volume bind-mount to the app: service in the docker-compose.yml file.
  • Final volumes section for the Nextcloud app: `YAMLvolumes:
    • nextcloud:/var/www/html
    • /mnt/nextcloud_files:/media/windows_share`

3. The Blank “External Storages” UI & Internal Server Errors: This turned out to be a cascade of different issues.

  • Problem 1: Port Conflict. When setting up a reverse proxy, I got an address already in use error.
    • Solution: The command sudo lsof -i :80 revealed a default nginx service was running on the host. Stopping and disabling it with sudo systemctl stop nginx and sudo systemctl disable nginx freed the port for Docker.
  • Problem 2: Nextcloud Application Crash. The docker logs command showed a PHP Parse error in config/config.php.
    • Solution: We had to use docker exec to get a shell inside the container, install nano (apt-get update && apt-get install nano), and then manually fix the syntax error in the config file.
  • Problem 3: Blank Page After Login. The login page was blank because of incorrect file ownership inside the container.
    • Solution: Running sudo docker exec --user root <container_name> chown -R www-data:www-data /var/www/html fixed the rendering of the UI.

4. Final HTTPS & Reverse Proxy Configuration: After setting up Nginx Proxy Manager, I got a final “Access through untrusted domain” error.

  • Problem: The NEXTCLOUD_TRUSTED_DOMAINS environment variable was not being correctly applied from the docker-compose.yml file.
  • Solution: The definitive fix was to manually add my domain using Nextcloud’s occ tool from the host’s command line: Bashsudo docker exec --user www-data <container_name> php occ config:system:set trusted_domains 1 --value=your.domain.com

After all these steps, I was finally able to go to Administration settings → External storages, and the UI appeared correctly. I added the storage as type Local, with the configuration path set to the in-container path (/media/windows_share), and it worked instantly.

It was a long and complex journey, but the setup is now working flawlessly. I hope this detailed summary can help others who might be struggling with a similar configuration.

Thank you again to the community!

1 Like

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