You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problem with login to nextcloud windows client #3707
Nextcloud client should connect with self hosted nextcloud server.
Actual behaviour
I removed old hosted server and create new on new server. I changed DNS to new server. I removed old nextcloud client on Windows and install new version (3.3.1). After installation I get view where I can put address to my server. After click on button "next" I get error message: "The polling URL does not start with HTTPS despite the login URL started with HTTPS. Login will not be possible because this might be a security issue. Please contact your administrator.". There are two links: copy link and open in browser. Both not working
Steps to reproduce
Install new nextcloud client
Put address to nextcloud server
Client configuration
Client version: 3.3.1
Operating system: Windows 10
OS language: PL
Installation path of client: M:\Programy\Nextcloud
I removed old hosted server and create new on new server. I changed DNS to new server. I removed old nextcloud client on Windows and install new version (3.3.1). After installation I get view where I can put address to my server. After click on button "next" I get error message: "The polling URL does not start with HTTPS despite the login URL started with HTTPS. Login will not be possible because this might be a security issue. Please contact your administrator.".
I was having this same issue. Turns out was the wrong setting in config.php
I am running behind a reverse proxy (nginx). Originally I had the following lines:
With the above I was receiving the error you outlined. However when I changed to below, now it works (ie. use the local IP address, not public facing name).
Reacted by Pierre Boudeaud, Samuel Truman, Romain Weeger, Vitaro, Uzair Ali, Karsten Thiemann, Neurohr Bytes Software e.U., olli0815, Thiago Navarro, MLuehn and 5 more
Reacted by majki09, Karsten Thiemann, olli0815 and xkmerlz
I confirm that it was the problem for me. Not sure why everything was working fine with the previous versions...
For reference, the option NEXTCLOUD_OVERWRITEPROTOCOL for the docker container was added as part of this pull. In case you use a dedicated volume (as per persistent data instructions) you will also need to edit the config.php manually.
If I change overwrite.cli.url to local IP address then the browser will not try to use this as url?
Its confusing.
It seems this setting is for "local cli tools" (like occ, cron.php, etc). So I don't fully understand why this would cause logging in from client to fail? Perhaps during the client initiation process, it relies on occ in someway to register the new connection?
In any case, if you are running behind a proxy it seems like this should always be the local IP address, since you wouldn't want occ to try to connect to itself using the external proxy.
@divo1 if it can be any helpful, I have the same URL I use for the nginx reverse proxy. Meaning it's http://<local_address>:<internal_port>
I didn't configure it manually, some script of the docker container did. I also have another container with the same image running cron, everything works fine.
In my case, the problem was caused by the 'overwriteprotocol' option that was completely missing. After setting it to 'https' the login process via the app started working again as expected.
After doing several tests I saw that sometimes the 'overwriteprotocol' => 'https', line is not created.
Reacted by Luis Dunkum, Alexis Silva, Klinc, Henning Häcker, Martin Bauw, alexeynikolaev, Norbert Stüken, Neurohr Bytes Software e.U., Bartosz Bratuś, Clem and 4 more
I had to add 'overwriteprotocol' => 'https', to the config. Some folks said, behind a proxy one would have to set overwrite.cli.url to a local HTTP URL. I did not have to do this with my nextcloud running in a container behind traefik. I left overwrite.cli.url on the external HTTPS address.
Anyways I guess this got broken via an upgrade since someone pointed out that the setting 'overwriteprotocol' got added somewhere. Should have been addressed by the upgrade-procedure when adding this setting or am I wrong?
This thread is very confusing and does not give a clear answer on WHAT is the correct solution. Many "thanks, it solved it for me" - but not HOW!? Could someone please, please give a concise instruction?
The problem:
A reverse proxy with https (and all certs) towards the internet (actually an IIS, works very well for many other apps, IIS is non negotiable)
Inside the proxy in the private domain everything (!) is http. I do not want the extra burden of https, cert maintenance etc privately behind the proxy.
How it works:
Web from the internet, and Android sync apps have NO problems using Nextcloud through the proxy. Works like a charm!
Windows client inside the domain can go directly http towards Nextcloud. Fast and no problems.
BUT -Windows client coming with https from the internet (through the proxy) can NOT connect. Gives error "The polling URL does not start with HTTPS despite the login URL started with HTTPS"
I have tested what seems every combination of ''trusted_domains' 'trusted_proxies', 'overwriteprotocol', 'overwrite.cli.url' but to no avail. The (unnecessarily overworked) Windows client refuses to connect.
Could someone please, give a concise instruction on how you managed to make it work? Please?
And dear developers. Please go back to the old manual setup for the Windows client. The urge to build smart things and prove your superior competence - only gives tons of problems for the users! Keep It Simple!
BR // Wabo
Reacted by n0valis, Matt Castelein and darked vidaer
I think I have a very similar setup with a proxy running on https and nextcloud being connected to the proxy on a private network.
I had the same issue.
I solved it by adding 'overwriteprotocol' => 'https', which was missing for me.
SO I have now:
'overwrite.cli.url' => 'https://cloud.mydomain.com',
'overwritehost' => 'cloud.mydomain.com',
'overwriteprotocol' => 'https',
BR Thomas
Reacted by akBeater, 鳥電 niaodian.com and Ahmed Hammad
Then, when reconnected I get a number of "404 FIle not found" when resyncing, and no explanation in logs, even if the files are present on both sides. And I have made a full rescan. But I think I bring that up in another thread.
It seems that nextcloud client tries http and stops there. explicitly redirecting to HTTPs resolves the problem.
Resolved by adding these lines to reverse proxy server.
server {
if ($host = nc.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name nc.example.com;
listen 80;
return 404; # managed by Certbot
Activity
porelli commentedon Aug 24, 2021
I am having the very same issue with the MacOS client.
EDIT (2021-Aug-27): same behavior happening with the new client: 3.3.2
This issue was also referenced with the AppImage version of the client for Linux here: #1470 (comment)
bstin commentedon Aug 29, 2021
I was having this same issue. Turns out was the wrong setting in config.php
I am running behind a reverse proxy (nginx). Originally I had the following lines:
With the above I was receiving the error you outlined. However when I changed to below, now it works (ie. use the local IP address, not public facing name).
porelli commentedon Aug 29, 2021
Thank you @bstin!
I confirm that it was the problem for me. Not sure why everything was working fine with the previous versions...
For reference, the option NEXTCLOUD_OVERWRITEPROTOCOL for the docker container was added as part of this pull. In case you use a dedicated volume (as per persistent data instructions) you will also need to edit the config.php manually.
divo1 commentedon Aug 30, 2021
@bstin Now I have something like this:
If I change
overwrite.cli.urlto local IP address then the browser will not try to use this as url?edit
I tried IP of proxy, IP of VM where the nextcloud is, both with https and http. It's still not work ;(
bstin commentedon Aug 30, 2021
Its confusing.
It seems this setting is for "local cli tools" (like occ, cron.php, etc). So I don't fully understand why this would cause logging in from client to fail? Perhaps during the client initiation process, it relies on
occin someway to register the new connection?In any case, if you are running behind a proxy it seems like this should always be the local IP address, since you wouldn't want
occto try to connect to itself using the external proxy.porelli commentedon Aug 30, 2021
@divo1 if it can be any helpful, I have the same URL I use for the nginx reverse proxy. Meaning it's http://<local_address>:<internal_port>
I didn't configure it manually, some script of the docker container did. I also have another container with the same image running cron, everything works fine.
In my case, the problem was caused by the 'overwriteprotocol' option that was completely missing. After setting it to 'https' the login process via the app started working again as expected.
divo1 commentedon Aug 30, 2021
@bstin Thanks for your response :) I check server and nextcloud configuration. After few changes now I think it works :)
I remove this configurations:
I had also apache with different default virtual host. So when I curl to localhost without host name it show default apache site.
Now everything works ok. Thanks guys! :)
Can be closed.
JeanPaulBeard commentedon Sep 16, 2021
I also had the same problem and I solved it by changing these lines
/config/config.phpAfter doing several tests I saw that sometimes the
'overwriteprotocol' => 'https',line is not created.BoboTheBarbar commentedon Nov 1, 2021
The soluction above did not solve it for me, but the comment from Help.Nextcloud did:
https://help.nextcloud.com/t/desktop-client-is-trying-to-use-http-instead-of-https/122288/12
(I am using a apache reverse proxy)
It says to remove overwritecondaddr parameter.
cyrsis commentedon Feb 8, 2022
Works great with Traefik as in the main proxy, Thanks
rominator1983 commentedon Feb 22, 2022
I had to add
'overwriteprotocol' => 'https',to the config. Some folks said, behind a proxy one would have to setoverwrite.cli.urlto a local HTTP URL. I did not have to do this with my nextcloud running in a container behind traefik. I leftoverwrite.cli.urlon the external HTTPS address.Anyways I guess this got broken via an upgrade since someone pointed out that the setting
'overwriteprotocol'got added somewhere. Should have been addressed by the upgrade-procedure when adding this setting or am I wrong?wahboh commentedon Mar 10, 2022
Dear Gurus!
This thread is very confusing and does not give a clear answer on WHAT is the correct solution. Many "thanks, it solved it for me" - but not HOW!? Could someone please, please give a concise instruction?
The problem:
How it works:
Web from the internet, and Android sync apps have NO problems using Nextcloud through the proxy. Works like a charm!
Windows client inside the domain can go directly http towards Nextcloud. Fast and no problems.
BUT -Windows client coming with https from the internet (through the proxy) can NOT connect. Gives error "The polling URL does not start with HTTPS despite the login URL started with HTTPS"
I have tested what seems every combination of ''trusted_domains' 'trusted_proxies', 'overwriteprotocol', 'overwrite.cli.url' but to no avail. The (unnecessarily overworked) Windows client refuses to connect.
Could someone please, give a concise instruction on how you managed to make it work? Please?
And dear developers. Please go back to the old manual setup for the Windows client. The urge to build smart things and prove your superior competence - only gives tons of problems for the users! Keep It Simple!
BR // Wabo
thomasthe1st commentedon Mar 26, 2022
Hi Wabo,
I think I have a very similar setup with a proxy running on https and nextcloud being connected to the proxy on a private network.
I had the same issue.
I solved it by adding 'overwriteprotocol' => 'https', which was missing for me.
SO I have now:
'overwrite.cli.url' => 'https://cloud.mydomain.com',
'overwritehost' => 'cloud.mydomain.com',
'overwriteprotocol' => 'https',
BR Thomas
wahboh commentedon Mar 26, 2022
Many thanks Thomas!
It seems as your suggestion solved THAT behind proxy problem:
'overwrite.cli.url' => 'https://cloud.mydomain.com/',
'overwritehost' => 'cloud.mydomain.com',
'overwriteprotocol' => 'https',
Much appreciated!
Then, when reconnected I get a number of "404 FIle not found" when resyncing, and no explanation in logs, even if the files are present on both sides. And I have made a full rescan. But I think I bring that up in another thread.
Thanks again!
Wabo
frasurebuilds commentedon Mar 31, 2022
This fixed it for me!
danielb42 commentedon Aug 10, 2022
I got it fixed now by adding
overwriteprotocolANDoverwritehost. From most issue threads it was unclear to me that you absolutely need BOTH.DevFontes commentedon Mar 21, 2023
I fixed this with this annotations in nginx ingress:
ingress:
annotations:
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For"
Add this lines in config.php file:
'overwrite.cli.url' => 'https://nextcloud.nextcloud.svc.cluster.local',
'overwriteprotocol' => 'https',
I'm using this chart.
https://github.com/nextcloud/helm/tree/nextcloud-3.2.3/charts/nextcloud
Environment
RKE 1.24
Nginx Ingress controller 1.2.0
Nextcloud 24.1.10
AngelGarzaDev commentedon Nov 6, 2023
Adding this line fixed it for me. If you are behind a proxy, this is most likely your issue.
'proxy' => 'proxy.example.com:8081',
Please see the config.sample.php file for more information on what all these fields do.
https://github.com/nextcloud/server/blob/master/config/config.sample.php
daveloper commentedon May 4, 2025
Salam,
It seems that nextcloud client tries http and stops there. explicitly redirecting to HTTPs resolves the problem.
Resolved by adding these lines to reverse proxy server.
server {
if ($host = nc.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
}