Issue accessing Nextcloud via WebDav - 401 unauthorized

Hi all,

I’m trying to access my Nextcloud server installed on a Raspberry pi model 3+ via WebDav. I followed the official Nextcloud docs available at this link:, section Creating WebDAV mounts on the Linux command line (I use Debian with xfce so I do not have neither Dolphin nor Nautilus file manager).

So here my secret file (obviously username , password and file path are fictitious):

/home/user/nextcloud john 1234

Then my /etc/fstab file

[...] /home/user/nextcloud davfs user,rw,auto 0 0

Finally, when I try to mount and authenticate running the following command

mount /home/user/nextcloud/

I get the following error:

/sbin/mount.davfs: Mounting failed.
401 Unauthorized

Can anyone help me?

Thank you.

By any chance, do you have 2auth activated in your account? If so, go to settings > Personal > Security and create an app password just for mount.davfs.

That’s exactly the reason. I can confirm.
If your 2FA is turned of in your security settings in Nextcloud, than it should work.
It’s not that great having to shut down 2FA for DAVS:// to work but that’s another discussion, right?

Hello, I’m running against the same issue, I have 2FA turned on, created an app password and when mounting in a linux server I get the same error. Is there anything missconfigured on my side? Or is this issue still not looked into? Thanks