When I opened the GUI today, I had a recommendation to enable a username and password for the GUI. I did so, and switched on HTTPS while I was there. After navigating back to the GUI using HTTP, all settings were lost. I.e. all peers, shared folders, etc. The GUI looks like it did after initial installation. I tried removing the username and password and switching off HTTPS, but that hasn’t helped. Restarting Syncthing hasn’t helped either.
EDIT: I think the username and password thing was a red herring. When I look at the GUI on another device, it tells me that the last time the problematic device was seen was yesterday. If I look at the logs of the problematic device at that time, I see one log in %localappdata%\Syncthing\syncthing.log with the last entry at the same time the device was last seen, and I see another log in %windir%\System32\Syncthing\syncthing.log with the first entry shortly after.
It’s almost as if Syncthing has switched from %localappdata%\Syncthing to %windir%\System32\Syncthing and lost all its configuration in the process.
I managed to work around the problem by shutting down Syncthing, copying %localappdata%\Syncthing\config.xml to %windir%\System32\Syncthing\config.xml, and restarting Syncthing.
But this is very concerning. Does anyone know why this happened? Should I be concerned about the same thing happening on my other devices?
I suspect you are launching syncthing differently than what you did before. Windir is usually used when syncthing runs as a windows service, and app data is used when it runs as the user.