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:
Map Nextcloud as network folder using WebDAV addresses provided in web interface
Make sure to select āReconnect at sign-inā during setup
Make sure to select āRemember credentialsā in login dialog
Optional: enjoy the network drive for a bit
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 try.nextcloud.com 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 https://nx30954.your-storageshare.de/ 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!
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.
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.
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.
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 127.0.0.1 > 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.
exit
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.
English
To ensure this tiresome issue is truly and comprehensively resolved, I have developed ā NcDavTray ā
I can highly recommend it to everyone.
Deutsch:
Damit dieses leidige Thema wirklich erschƶpfend gelƶst ist, habe ich ā NcDavTray ā
entwickelt. Ich kann es wirklich jedem nur wƤrmstens empfehlen.