This project is not covered by Drupal’s security advisory policy.
Introduction
Integrates a Nextcloud WebDAV share into the Drupal private (or public) filesystem so IMCE and other modules can use it via private:// / public://. Three operation modes are supported:
- Mount — Drupal runs rclone
mount(FUSE): remote files appear locally in real time. Needs/dev/fuse(and typically elevated capabilities in Docker). - Sync — Drupal runs rclone
sync/bisync: files are copied on demand or via cron. No FUSE, safe in unprivileged containers. - External — The mount is provided outside Drupal (host process, sidecar, bind-mount, …) at a fixed path. This module only reports status; no rclone, no FUSE, and no Nextcloud credentials in Drupal.
Settings are split between a global admin form (operation mode, server URL, sync options) and a per-user form (credentials and path in Mount/Sync; status only in External).
When to use: Browse or manage Nextcloud files from Drupal (e.g. via IMCE). Prefer Sync or External in Docker/Kubernetes if the PHP container must stay unprivileged; use Mount when PHP may use FUSE (e.g. bare metal). See the README section Choosing an operation mode.
Features
- Three operation modes — Mount (rclone FUSE), Sync (rclone copy, no FUSE), External (mount outside Drupal).
- Per-user credentials — In Mount/Sync, each user sets Nextcloud login + app password and mount path; External skips credentials in Drupal.
- IMCE integration — Optional IMCE profile folder as mount/sync target; toolbar links when permitted.
- Token support — Paths support Drupal tokens such as
[user:name]and[user:uid]. - Drush commands — Configure mode/paths, mount/unmount, sync, and status checks from the CLI.
- Live status — Mode-appropriate checks (server/rclone/FUSE, or external path + mount state).
- Optional remote subpath — Limit to a subdirectory within the Nextcloud WebDAV root (Mount/Sync).
Post-Installation
- Configure private files — Set
$settings['file_private_path']insettings.php. - Global settings — Go to
/admin/config/services/nextcloud-webdav-mount, choose the operation mode, and (for Mount/Sync) set the Nextcloud server URL / WebDAV path. - Per-user settings — For Mount/Sync, each user opens
/user/{uid}/nextcloudand enters credentials (and path). In External mode this page is status-only. - Activate — Mount/Unmount or Sync now on the user form, or Drush (
nc-mount,nc-sync, …). For External, ensure the mount already exists atexternal_mount_path(defaultprivate://nextcloud).
Important (Mount mode only): PHP-FPM must access /dev/fuse. Default systemd settings often block this. See FUSE_SETUP.md. For Docker without device/cap passthrough, use Sync or External instead.
Additional Requirements
- rclone — Required for Mount and Sync; on the system PATH (
pacman -S rcloneorapt install rclone). - FUSE — Required for Mount inside PHP (
fuse3+/dev/fuse). For External, FUSE (or another mount) runs outside Drupal. Sync needs neither. - Drupal private files —
$settings['file_private_path']insettings.php.
Recommended modules
- IMCE — Profile folder as mount/sync target and file browser for the local path.
Similar projects
-
NextCloud WebDAV Client:
Integrates Drupal with Nextcloud over WebDAV (create folders, upload, manage content from Drupal). -
Nextcloud DAM:
Uses Nextcloud as a media source in Drupal.
Supporting this module
Contributions welcome. Report issues and submit merge requests in the project repository.
Community documentation
- README.md — Operation modes, configuration, Drush reference, troubleshooting.
- FUSE_SETUP.md — systemd drop-in and Docker notes when using Mount mode inside PHP.
Project information
- Project categories: Integrations
- Ecosystem: SODa SCS Manager
72 sites report using this module
- Created by rnsrk on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.

