A Nextcloud WebDAV mount lets a Linux account use files from the server through a normal local directory. This fits small automation jobs, editor workflows, and tools that need a filesystem path instead of a browser tab or the desktop sync client.
On Linux, davfs2 mounts the user's WebDAV collection through FUSE. The Nextcloud endpoint includes the account name under /remote.php/dav/files/, so the server URL, secrets entry, and mount point must all refer to the same account.
Use an app password instead of the main account password, especially when two-factor authentication is enabled. A WebDAV mount depends on network access and keeps local cache files while data is open, so test the mount manually before relying on the saved /etc/fstab entry for repeated use.
$ sudo apt install --assume-yes davfs2
Use the distribution package for the davfs2 filesystem driver. On Fedora, RHEL, and openSUSE systems, install the package named davfs2 with the native package manager.
$ sudo usermod --append --groups davfs2 "$USER"
Open a new login session before the mount step if this command changed the current account's group membership.
$ mkdir -p "$HOME/nextcloud" "$HOME/.davfs2"
$ nano ~/.davfs2/secrets
https://cloud.example.com/remote.php/dav/files/ada/ ada app-password-value
Store a dedicated app password here, not the main account password. The file is a reusable credential for the mounted account.
Related: How to create a Nextcloud app password
$ chmod 600 ~/.davfs2/secrets
$ sudo cp --archive /etc/fstab /etc/fstab.bak
A malformed /etc/fstab line can delay boot or leave the mount unavailable until the file is corrected.
$ sudoedit /etc/fstab
https://cloud.example.com/remote.php/dav/files/ada/ /home/ada/nextcloud davfs user,rw,noauto,_netdev 0 0
Use the real absolute home path in /etc/fstab because the file does not expand ~. Keep noauto when the user should mount the share on demand; use auto only when the network mount is expected during system startup or login.
$ sudo findmnt --verify --verbose /home/ada/nextcloud /home/ada/nextcloud [ ] target exists [ ] userspace options: user [ ] VFS options: noauto [ ] do not check https://cloud.example.com/remote.php/dav/files/ada/ source (pseudo/net) [ ] do not check https://cloud.example.com/remote.php/dav/files/ada/ FS type (pseudo/net) Success, no errors or warnings detected
Correct any parse, target, or option error before testing the mount.
Related: How to check fstab before rebooting in Linux
$ mount ~/nextcloud
$ findmnt --mountpoint ~/nextcloud --output TARGET,FSTYPE,SOURCE TARGET FSTYPE SOURCE /home/ada/nextcloud davfs https://cloud.example.com/remote.php/dav/files/ada/
$ ls ~/nextcloud Documents Photos welcome.txt
$ printf 'Nextcloud WebDAV check\n' > ~/nextcloud/mount-check.txt
$ cat ~/nextcloud/mount-check.txt Nextcloud WebDAV check
$ rm ~/nextcloud/mount-check.txt
Leave the mount active if the Linux account should keep using it. Run umount ~/nextcloud later when the session is temporary.
Related: How to unmount a disk in Linux