nextcloud_webdav_mount
Introduction
Mounts a Nextcloud WebDAV share into the Drupal private filesystem via rclone, making it available to IMCE and other modules that read from private://. Each user configures their own Nextcloud credentials and mount path; the admin sets the server URL.
Features
- Per-user mounts — Each Drupal user configures their own Nextcloud credentials (username + app password) and mount path.
- IMCE integration — When IMCE is installed, users can choose an IMCE profile folder as the mount target.
- Token support — Mount paths support Drupal tokens like
[user:name]and[user:uid]. - Drush commands — Configure, mount, unmount, and check status from the command line.
- Live status checks — Admin form shows server reachability, rclone availability, and FUSE accessibility.
- Optional subpath — Mount a specific subdirectory within the Nextcloud WebDAV root.
When to use: Use this module when you need Drupal users to browse or manage files from their Nextcloud in the Drupal UI (e.g. via IMCE). Typical use cases: file uploads from Nextcloud, media selection from cloud storage, or integration with existing workflows that use private files.
Post-Installation
- Configure private files — Set
$settings['file_private_path']insettings.php. - Global settings — Go to
/admin/config/services/nextcloud-webdav-mountand set the Nextcloud server URL. - Per-user settings — Each user goes to
/user/{uid}/nextcloudand enters their Nextcloud username and app password. - Mount — Use the "Mount" button on the user form, or run
drush nextcloud_webdav_mount:mount --uid=2.
Important: PHP-FPM must have access to /dev/fuse. Default systemd settings often block this. See the included FUSE_SETUP.md for the required systemd drop-in.
Additional Requirements
- rclone — Must be installed and on the system PATH (
pacman -S rcloneorapt install rclone). - FUSE — Kernel module and
fuse3package (pacman -S fuse3orapt install fuse3). - Drupal private files —
$settings['file_private_path']must be configured insettings.php. - System access — The PHP-FPM process must be able to open
/dev/fuse(systemd drop-in or Docker device passthrough required).
Recommended modules
- IMCE — Enables IMCE profile folder as mount target and lets users browse files via the IMCE file browser.
Similar projects
- NextCloud WebDAV Client: The NextCloud WebDAV Client module provides integration between Drupal and NextCloud servers using the WebDAV protocol. This module enables you to create folders, upload files, and manage content directly from your Drupal application to your NextCloud instance.
- Nextcloud DAM:This module integrates Nextcloud in Drupal in a way that it could be used as a source of media.
Supporting this module
Contributions welcome. Report issues and submit merge requests in the project repository.
Community documentation
- FUSE_SETUP.md — Included in the module; covers systemd drop-in and Docker setup for
/dev/fuseaccess. - README.md — Full Drush command reference and troubleshooting.