I self-host Duplicati via Docker Compose (using LinuxServer latest image) on a home server. Recently I found I couldn’t login to the Duplicati Web GUI.
I did some quick reading and realized the required security was changed, so I added DUPLICATI__WEBSERVICE_PASSWORD and SETTINGS_ENCRYPTION_KEY to the Docker compose file.
However, even with the right password, I found that it forced me in an unending loop (even after clearing cookies & using an incognito mode browser) while trying to login where I would constantly get a “Connection lost” dialog. If I pushed Reload, I would get the same thing. If I press Log In, even if I enter the right password again, it would take me through the same loop.
I checked the Duplicati logs and see the following error:
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
Duplicati.WebserverCore.Exceptions.UnauthorizedException: Authorization failed due to missing cookie.
at Duplicati.WebserverCore.Endpoints.V1.Auth.<>c.<<Map>b__3_0>d.MoveNext()
I happened to see a Github post mentioning themes.html and went there and, on a whim, changed the default to the NGClient, and found that I was now able to login after entering my password which suggests that my login information is correct but something strange is going on with NGAX.
Sadly, I previously backed up to OneDrive which is not currently an option in NGClient and it means I can’t configure new options currently. So I guess my questions are:
when will NGClient support OneDrive? OR
is there some other way to fix the issue with NGAX so I can use it again?
The two clients are using the same login logic, but ngclient is not yet using websockets, so I suspect there is a problem with connecting to the websockets. If you use the developer tools in the browser, you should see a connection to /notifications that presumably fails with ngax.
It has been added, but the version bundled with the Duplicati build does not have it.
If my guess is correct, you need to figure out why the websockets are being rejected. It could be due to a proxy or something else in front of the Docker container that is rejecting the request.
I think you’re right — I was doing a simple Nginx proxy pass so I could have a simple local DNS human-readable domain for it and when I access Duplicati directly via IP without the proxy I can now log in. I’ll have to see how I can pass the websocket through…
FWIW, I don’t see a /notifications failure in the Network tab of Chrome web developer tool. The only failure I see is a 401 on the POST to /api/v1/auth/refresh? But when I filter on WS (websocket) in the Network folder I don’t see any requests or anything?
Honestly, not sure but I definitely didn’t see any notifications endpoint in my Network panel.
However, with the Nginx proxy identified as the culprit, I was ultimately able to fix it by updating my .conf file with additional proxy headers (I summarized the changes I made on my blog here). So, thank you for helping me solve the issue!