Nextcloud WebDAV Mount
This module allows Drupal users to mount their Nextcloud WebDAV shares into the Drupal private filesystem, making files accessible through modules like IMCE. Each user can configure their own Nextcloud credentials and mount path, while an administrator sets the server URL.
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.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.x-dev | Dev | 10–11 | 2.x ongoing development | Aug 12, 2026 | |
| 2.0.0 | Stable | 10–11 | add external mount mode | Aug 12, 2026 | |
| 1.6.0 | Stable | 10–11 | Add local files nav item + german spelling | Apr 23, 2026 | |
| 1.5.0 | Stable | 10–11 | Apr 23, 2026 | ||
| 1.4.0 | Stable | 10–11 | Added toolbar menu entry | Apr 7, 2026 | |
| 1.3.1 | Stable | 10–11 | Fixed remote_path empty settings | Apr 7, 2026 | |
| 1.3.0 | Stable | 10–11 | fixed rsync code 7 error + drush new option "remote-path" | Apr 7, 2026 | |
| 1.2.0 | Stable | 10–11 | Automated config + drush + small fixes | Mar 17, 2026 | |
| 1.1.0 | Stable | 10–11 | Fix Cron, better security, with directory checks | Mar 16, 2026 | |
| 1.0.0 | Stable | 10–11 | first release | Mar 14, 2026 | |
| 1.x-dev | Dev | 10–11 | Ongoing development branch | Mar 13, 2026 |