Access to Nextcloud using WebDAV

(Still) Happy New Year everyone!

I need help with the above subject matter.

I’m in the process of moving my important data from third party cloud to my personal cloud.

I was able to set up a Nextcloud server on my RPi4 with DietPi. It’s a fresh DietPi 6.34.3 installation with only the following added from the Optimised Software List:

  • Nextcloud
    Certbot/Let’s Encrypt

Setting up WebDAV access to Nextcloud in my Android password manager app fails with a HTTP 405 Method Not Allowed error.

**Update 16 Jan 2021 - the error code has changed to 401:

  • Keepass2Android app - code 401,message=Unauthorized
    Joplin android app - OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden…Code 401

The NC Troubleshooting WebDAV page says lighttpd (which I understand the DietPi Optimised NC uses) is not recommended so I thought I would come here to ask.

Is anyone using WebDAV to access their own NC server?

Can you please share if you made any change to make it work?

1 Like


many thanks for your message. I did a test installation with NextCloud/Lighttpd on my RPi3b+ to test WebDav. I was able to access NextCloud from my Android device without issues. What URL you are using to connect? According NextCloud Docs it needs to be following, which is workingt for me:

Hi Joulinar,

I’m using the WebDAV url from my Nextcloud Files, Settings page.

I confirm it is in line with the guidance from the Nextcloud Docs link you sent.

I want to try with the Android app you used for testing. What app is it?

I’m using file manager

This is how it looks once connected

I need to say, I tested inside my local network using http and ip address

Thank you!

That’s a nice file manager app. Too bad I’m very much invested in MiXplorer by Hootan Parsa of XDA to even consider changing. :smiley:

Back to my problem. I installed File Manager + to test and still no go.
At this point I have tried two password manager apps and two file manager apps with no success.
For the sake of clarity I have used both the No-IP url and my internal IP address using HTTP then HTTPs.

Next thing I tried was put the url in my mobile browser address bar -

with “internal.ip/nextcloud” - the Nextcloud web UI login screen came up (this is not what I want, I have the Nextcloud client app)
with “internal.ip/nextcloud/remote.php/dav/files/admin” - the Nextcloud WebDAV login screen presented, key details, then error.
with “” - the Nextcloud WebDAV login screen presented, key details, then error.

Login forbidden. This is crazy.

I’m happy to explore other suggestions.

*LATER: I added 2nd scenario for mobile browser

maybe you could raise the question as well on NextCloud board? Probably they have some more idea where to look into. Not sure if we have that many users using WebDAV on NextCloud.

I’m still looking for a solution to this.

In the process, the error code has changed from 405 to 401 (see updated original post).

I have found possible causes:

  1. WebDAV 401 error for some with TOTP 2FA. The iOS app had the 2FA issue with WebDAV too. Turning off TOTP 2FA didn’t work for me .
  2. Special characters in the password or logging in as regular user. I was making the connection as user admin with no special character in the password, therefore, this does not apply in my case.
  3. A lot more possible causes that don’t seem related to mine.

My post in the Nextcloud forum has hot been responded to after 5 days now.

I intend to test with another Nextcloud server instance…

I need to say I did no test 2FA. I just simply installed NextCloud and tried it right after installation, which was working in my case. Maybe I will find time to test 2FA

Indeed, since this is beyond the control of our implementation, I suggest you raise a thread at the Nextcloud forum, to get targeted help faster:
Feel free to ping me there @MichaIng.

it was already open a week ago but no reaction so far

Saw this post and got errors as mentioned above accessing NC on Dietpi / NCP, using the WebDav URL.

Discovered that I had to download and enable the “External User Authentication” to enable WebDav.

After this was able to access via the WebDav app on iPhone and Android (Pixel)

Hmm, this app is not required as long as you don’t use (and manually configure) an external authentication server. This app is not to allow external application connecting to the Nextcloud’s internal WebDAV server, but to allow users connect to Nextcloud by authenticating against an external WebDAV (or IMAP, SSH, HTTP auth, …) server:

This means that user passwords are not stored on the Nextcloud server, but you’re using accounts on an external service the authenticate against, which can enhance security or simplify user management, when you run such an external service already and if used correctly.

The strongest argument why installing this app can fix NC WebDAV access, is that it is ineffective as long as you don’t configure it with, e.g. which external WebDAV server to authenticate against :wink:.