Windows 11 cannot reconnect to Nexcloud WebDav drive on login

Nextcloud client version: 3.7.3
Operating system and version: Windows 11 Home 64-bit
Apache or nginx version (eg, Apache 2.4.25): don’t know, managed Nextcloud at Hetzner
PHP version (eg, 7.4): don’t know, managed Nextcloud at Hetzner

The issue you are facing:
Windows won’t automatically reconnect on login to my Nextcloud mapped as a network drive.

I mapped my Nextcloud as a network drive on Windows 11 following the instructions here: Accessing Nextcloud files using WebDAV — Nextcloud latest User Manual latest documentation. Made sure to select “Remember credentials” in the sign-in dialog that Windows pops up, and also made sure to select “Reconnect at sign-in” during setup. However, Windows shows a “broken drive” icon in its taskbar after rebooting and tells me it can’t reconnect.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Map Nextcloud as network folder using WebDAV addresses provided in web interface
  2. Make sure to select “Reconnect at sign-in” during setup
  3. Make sure to select “Remember credentials” in login dialog
  4. Optional: enjoy the network drive for a bit
  5. Reboot

The output of your Nextcloud log in Admin > Logging:


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!): I don’t think I have access to this. It’s a managed Nextcloud at Hetzner.

The output of your Apache/nginx/system log in /var/log/____: I don’t think I have access to this. It’s a managed Nextcloud at Hetzner.

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary. > I don’t think I have access to this. It’s a managed Nextcloud at Hetzner.

Do you use 2 factor authentication? In that case, I’d try to use an app password for the client to connect. If you are already doing that, without logfiles it’s hard to say if Windows 11 is trying again (the guides were written with Win10 in mind, perhaps some things changed on that side) or if there is a problem on the server side. Not sure if the instances on live long enough to test, but these should be properly configured.

I don’t have Win11 to test for myself, if someone can check an confirm, we can open a ticket on the documentation to properly check and test proper instructions for Win11.

Hey tflidd, thanks for your detailed response. To the best of my knowledge, I’m not using 2FA. My Nextcloud is at and I can log into the web interface with just my user name and password, there’s no other step. Same for the desktop client (which I use on 3 PCs on Linux Mint, Windows 10 and Windows 11).

I’m not quite sure what you mean by using an app password for the client to connect. I can say this much, the Nextcloud desktop client has no trouble connecting on any of my machines. I’m gonna try this on my laptop that has Win 10 though and report back here!

Update: I have the same problem on my Windows 10 PC. On every login, this is what I see:


If there is any log I can provide, I’ll be happy to. Just not sure what exactly you need and how to get it.

Did you use this URL?

I just tried again with my setup (NC 25) and Windows 10. Since I am using 2FA, I need an app password (you shouldn’t need this).

In hosted environments, you don’t have access to it. In that case, you need to ask the customer support of your provider. They on their side can then reach out to Nextcloud for further support if needed.

Yup, I used that URL. But actually, I found a workaround today! I used the Windows Task Scheduler to make a task using the net command (learned from here: Accessing Nextcloud files using WebDAV — Nextcloud latest User Manual latest documentation):


Executes with a 30 second delay after login. Works like a charm!

I had the same issue on Windows 10 and here the problem was that the WebClient service was not started.
So setting the WebClient server to start automatically at startup solved the issue.
Maybe, this could be added as a note to the documentation?

When connecting to the Webdav server via the explorer first, the WebClient service is started by the explorer…

Thanks, Matthias! This is good to know. In fact, my solution that I posted above stopped working out of the blue after a week or so, the command was simply no longer executed on login. I tried your suggestion and found that the WebClient service was indeed set to start manually. I switched it to “Automatic” and put the network drive back using Windows Explorer.

Now, I’m back to the point where the network drive will appear in my explorer after login, but it’s not connected. I need to click on it and put in my credentials to connect.

I’ve resigned myself to the fact this is as good as it gets. I spend most of my time on my Linux partition anyway, where I’ve got my whole Nextcloud synced.

It’s good to have the drive there in case I need it, and Windows does auto-fill my credentials in the login dialog, so that’s good enough.

Maybe this adds value to your search:

Hey @ernolf, thanks so much for this. I had actually tried running that net command from a batch script before and it won’t connect that way.

If I run this in a cmd prompt…

net use Y: https://[mynextcloud].de/remote.php/dav/files/[myusername]/ /user:[myusername] [mypassword]

…it works perfectly. Yet, as soon as I put that same command into a .bat file verbatim and execute that .bat file, this happens:

System error 1244 has occurred.

The operation being requested was not performed because the user has not been authenticated.

I tried your exact script with the same result.

even with the initial deletion of all old connections:

net use * /delete /yes

prior to the connection part?

Did you create an app token special and only for that connection?

Hey, yeah, I’m using the exact contents of your script, including the initial deletion.

However, I don’t know what an app token is and how to create one. I looked it up real quick and I don’t think I found an answer that makes sense in our context.

I found something from Azure (Register an App to request authorization tokens and work with APIs - Azure Monitor | Microsoft Learn) and my eyes glazed over. :-/ Looks like it’s over my head.

You must create your app token aka “app password” in the Security tab of your personal settings: https://yourcloud.tld/settings/user/security:


Manual: Manage connected browsers and devices — Nextcloud latest User Manual latest documentation

Give it an App name like “Drive Z:\ on %MachineName%” like in this example:


for anyone struggling with this im using nextcloud 28 and it works, here is the script i use, follow it exactly, its works solid. I spent 2 days struggling with this and almost forked out good money for a already free solution, i tried it with 30 second delay it didnt work , 60 seconds was the right number.

@echo off
ping -n 60 > nul
echo Deleting all network drives…
net use * /delete /yes
echo Network drives deleted.
echo Terminating explorer.exe…
taskkill /f /IM explorer.exe
echo Explorer.exe terminated.
echo Restarting explorer.exe…
start explorer.exe
echo Explorer restarted.
net use Z: https://yourserver/remote.php/dav/files/admin /user:youruser apppassword
echo Drive mapped.

call it mapdrive.bat or whatever you want

put this in the startup directory by typing run in the search box of windows 10 and typing in shell:startup in the run dialogue box.