Setup webdav nextcloud filesystem mapping on Linux
Adapted from the official NextCloud instructions:
Shell commands to perform (as your regular user):
Note: replace all occurrences of adjective-noun below with your server’s unique adjective-noun combination indicated in its adjective-noun.local hostname. Replace NCUSERNAME with your NextCloud username, NCPASSWORD with that NextCloud user’s password, and YOURLINUXUSERNAME with your linux username.
sudo apt install avahi-daemon davfs2
usermod -aG davfs2 $USER
mkdir /home/$USER/NextCloud-adjective-noun
chown -R $USER:$USER ~/.davfs
chmod 600 ~/.davfs/secrets
chmod 700 ~/.davfs
echo "/home/$USER/NextCloud-adjective-noun NCUSERNAME NCPASSWORD" >> ~/.davfs/secrets
Copy your cert from System > Root CA into /etc/davfs2/certs/ and then put:
trust_ca_cert /etc/davfs2/certs/adjective-noun.crt
Into: /etc/davfs2/davfs2.conf
Add to /etc/fstab:
#nextcloud webdav folder
https://yournextcloudservice.local/remote.php/dav/files/NCUSERNAME/ /home/YOURLINUXUSERNAME/NextCloud-adjective-noun davfs user,rw,auto 0 0
Then reboot and it should mount at boot.