I have NC 15 installed currently in a snap container and a Docker container behind a nginx reverse proxy and both have the same issue. I can login via the web, but sync clients get stuck in a login/grant access loop.
On my Mac I add a new account, enter the HTTPS URL that my proxy terminates, I get a NC login prompt, I enter my credentials, they are accepted and I get a âGrant Accessâ button. Clicking on it takes me back to the âLog inâ button. Pressing that takes me directly to the Grant Access button and so forth. When I login via the web and go to Settings > Security I see a token for my sync client.
I donât see anything odd in the nginx logs or the NC logs. I started out with a Docker but then I decided to stop that and try a snap instead. Exact same issue with both systems.
While troubleshooting things, I tried using the IP to the NC host instead of my domain, hence bypassing my proxy, and I was able to connect without issue (got past grant access). The problem is that will only work if my phone/computer are on the local network, and Iâd prefer to use my domain.
Any suggestions of what I can do to either troubleshoot this or fix it? I should note that my nginx proxy is running in a docker container.
As I mentioned above, my NC install lives behind a proxy. Iâm running nginx inside of a Docker container. When I tail the logs while trying to log in this is what I see.
After a lot of banging, I found out the solution. I had a hunch the issue was with my proxy since I could connect directly via the IP. I used curl to identify the issue: curl -IL nextcloud.example.com. The actual issue was how NC was interacting with my proxy.
What I saw was the proxy was redirecting the http traffic to https, and then NC redirected from https://domain.tld to http://domain.tld/login, back to http. Then the proxy redirected it back to https of that domain, which is when people succeeded. I guessed this bouncing back and forth from http to https is what was causing the issue.
What ended up fixing the issue was updating my NC config so it wouldnât keep redirecting back to http. I did this by adding the following lines to my config.
I added/updated all three lines at the same time so Iâm not sure what actually solved the issue, but I think it was the overwriteprotocol is what did it. In the trusted_proxies line, add the IP of the server that is acting as the proxy in front of Nextcloud.
it seems that I have the same issue as others have in this thread.
I am providing NC 17.0.2 on a kubernetes installation together with a Nginx Ingress ( I made use of the default helm chart).
The proxy is properly set up and I also added the recommended additional settings:
Furthermore, in the Admin settings I observe that all checks have passed.
Before the usage of the above settings NC was complaining about the reverse proxy.
Nonetheless, the iOS NC app is stucked in the grant access step.
This is the output from curl:
However, now I canât connect to my Nextcloud server with my local domain because the overwriteprotocole donât accept when I send http://mycloud.local/. The Web browser overwrite from http to https.
How I do the difference for external https connection and internal http connection ?