Access to Nextcloud using WebDAV

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
yerc
Posts: 6
Joined: Fri Nov 27, 2020 10:26 pm

Access to Nextcloud using WebDAV

Post by yerc »

(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
    Fail2Ban
    No-IP
    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?
Last edited by yerc on Fri Jan 15, 2021 9:21 pm, edited 2 times in total.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: Access to Nextcloud using WebDAV

Post by Joulinar »

Hi,

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:

Code: Select all

example.com/nextcloud/remote.php/dav/files/USERNAME/
https://docs.nextcloud.com/server/lates ... ebdav.html
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
yerc
Posts: 6
Joined: Fri Nov 27, 2020 10:26 pm

Re: Access to Nextcloud using WebDAV

Post by yerc »

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?
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: Access to Nextcloud using WebDAV

Post by Joulinar »

I'm using file manager https://play.google.com/store/apps/deta ... l=en&gl=US

This is how it looks once connected

Screenshot_20210109-014958.png

I need to say, I tested inside my local network using http and ip address
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
yerc
Posts: 6
Joined: Fri Nov 27, 2020 10:26 pm

Re: Access to Nextcloud using WebDAV

Post by yerc »

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. :D

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 "no-ip.ddns.net/nextcloud/remote.php/dav/files/admin" - 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
Attachments
webdav_error.jpg
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: Access to Nextcloud using WebDAV

Post by Joulinar »

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.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
yerc
Posts: 6
Joined: Fri Nov 27, 2020 10:26 pm

Re: Access to Nextcloud using WebDAV

Post by yerc »

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...
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: Access to Nextcloud using WebDAV

Post by Joulinar »

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
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2914
Joined: Sat Nov 18, 2017 6:21 pm

Re: Access to Nextcloud using WebDAV

Post by MichaIng »

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: https://help.nextcloud.com/
Feel free to ping me there @MichaIng.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: Access to Nextcloud using WebDAV

Post by Joulinar »

it was already open a week ago but no reaction so far https://help.nextcloud.com/t/webdav-error-401/103815
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply