# The polling url does not start with https despite the login url started with https

**URL:** <https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576>\
**Category:** ℹ️ Support\
**Created:** [April 16, 2022, 10:10am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576 "2022-04-16T10:10:58Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![catav](https://help.nextcloud.com/letter_avatar/catav/32/5_5575768a8748004e209b776fc1b2916d.png) [@catav](https://help.nextcloud.com/u/catav)\
**Post date:** [April 16, 2022, 10:10am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/1 "2022-04-16T10:10:58Z")

</div>

Hi,

[/details]

Nextcloud version _(eg, 20.0.5)_: `23.0.3.2`  
Operating system and version _(eg, Ubuntu 20.04)_: `Ubuntu 20.04 + k3s 1.22.7`  
Apache or nginx version _(eg, Apache 2.4.25)_: `Apache/2.4.53`  
PHP version _(eg, 7.4)_: `8.0.17`

The issue you are facing: I’ve installed Nextcloud on my baremetal k3s server. I can connect and use it via web browser. DAVx5 connect to card/cal repos.  
Desktop or mobile apps can’t connect it. Nextcloud appimage says:  
“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.”

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:

1. [https://domain.ltd](https://domain.ltd)

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
  'trusted_domains' => 
  array (
    0 => 'domain.ltd',
  ),

  'overwrite.cli.url' => 'http://localhost',

```

How can I solve this problem? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![catav](https://help.nextcloud.com/letter_avatar/catav/32/5_5575768a8748004e209b776fc1b2916d.png) [@catav](https://help.nextcloud.com/u/catav)\
**Post date:** [April 17, 2022, 7:48am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/2 "2022-04-17T07:48:17Z")

</div>

Hi,  
I found a solution after digging a lot on internet.  
Following changes solve the problem.

```auto
  'trusted_domains' => 
  array (
    0 => 'domain.ltd',
  ),

  'overwrite.cli.url' => 'https://domain.ltd',
  'overwriteprotocol' => 'https',

```

NC works as expected now on k3s cluster.

---

<div class="post-metadata">

**Author:** ![lambscaped](https://help.nextcloud.com/letter_avatar/lambscaped/32/5_5575768a8748004e209b776fc1b2916d.png) [@lambscaped](https://help.nextcloud.com/u/lambscaped)\
**Post date:** [January 22, 2023, 1:13pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/3 "2023-01-22T13:13:54Z")

</div>

Hello i have the same problem, just that i do not have yet the technical knowledge to fix it

---

<div class="post-metadata">

**Author:** ![Matthew\_Wade](https://help.nextcloud.com/user_avatar/help.nextcloud.com/matthew_wade/32/50046_2.png) [@Matthew\_Wade](https://help.nextcloud.com/u/Matthew_Wade)\
**Post date:** [March 25, 2023, 2:20am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/4 "2023-03-25T02:20:16Z")

</div>

I’ve come back here for this solution multiple times, haha. THANK YOU!

---

<div class="post-metadata">

**Author:** ![Stephanisk](https://help.nextcloud.com/user_avatar/help.nextcloud.com/stephanisk/32/16472_2.png) [@Stephanisk](https://help.nextcloud.com/u/Stephanisk)\
**Post date:** [August 5, 2023, 11:07pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/5 "2023-08-05T23:07:08Z")

</div>

Well, that solved a real headache for me, thanks a LOOOTTTTT

---

<div class="post-metadata">

**Author:** ![janot](https://help.nextcloud.com/letter_avatar/janot/32/5_5575768a8748004e209b776fc1b2916d.png) [@janot](https://help.nextcloud.com/u/janot)\
**Post date:** [December 31, 2023, 3:10pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/6 "2023-12-31T15:10:08Z")

</div>

worked like a charm. Thanks!

---

<div class="post-metadata">

**Author:** ![TanerTemel](https://help.nextcloud.com/user_avatar/help.nextcloud.com/tanertemel/32/58899_2.png) [@TanerTemel](https://help.nextcloud.com/u/TanerTemel)\
**Post date:** [February 12, 2024, 8:52pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/7 "2024-02-12T20:52:15Z")

</div>

This worked a treat thanks for your help!.  
I can now access the nextcloud on desktop and Android mobile app but do you have any idea on how I can the nextcloud from my local IP address aswell? I can’t seem to access nextcloud on my home nework with nextclouds local IP and port number when accessing ip:port in a browser it gets redirected to https which throws an ERR\_SSL\_PROTOCOL\_ERROR.

---

<div class="post-metadata">

**Author:** ![Lennart\_Weinzierl](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lennart_weinzierl/32/60598_2.png) [@Lennart\_Weinzierl](https://help.nextcloud.com/u/Lennart_Weinzierl)\
**Post date:** [April 10, 2024, 7:15pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/8 "2024-04-10T19:15:25Z")

</div>

Also worked like a charm for me.  
Unfortunately I have the same new “Problem” now due to this change.  
I can somehow still use the local IP address for the next cloud desktop client to sync my data, but not in the browser.

---

<div class="post-metadata">

**Author:** ![isyuricunha](https://help.nextcloud.com/user_avatar/help.nextcloud.com/isyuricunha/32/62348_2.png) [@isyuricunha](https://help.nextcloud.com/u/isyuricunha)\
**Post date:** [April 14, 2024, 8:27pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/9 "2024-04-14T20:27:04Z")

</div>

> [@janot](#):
>
> Thanks!

Worked like a charm. Thanks!

---

<div class="post-metadata">

**Author:** ![Ethan.B](https://help.nextcloud.com/letter_avatar/ethan.b/32/5_5575768a8748004e209b776fc1b2916d.png) [@Ethan.B](https://help.nextcloud.com/u/Ethan.B)\
**Post date:** [May 13, 2024, 1:38pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/10 "2024-05-13T13:38:01Z")

</div>

Huzzah! Thank you.

---

<div class="post-metadata">

**Author:** ![trminhtrong](https://help.nextcloud.com/letter_avatar/trminhtrong/32/5_5575768a8748004e209b776fc1b2916d.png) [@trminhtrong](https://help.nextcloud.com/u/trminhtrong)\
**Post date:** [September 22, 2024, 2:44pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/11 "2024-09-22T14:44:26Z")

</div>

It’s work. Thanks you.

---

<div class="post-metadata">

**Author:** ![alexklibisz](https://help.nextcloud.com/letter_avatar/alexklibisz/32/5_5575768a8748004e209b776fc1b2916d.png) [@alexklibisz](https://help.nextcloud.com/u/alexklibisz)\
**Post date:** [September 24, 2024, 7:33am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/12 "2024-09-24T07:33:37Z")

</div>

If you don’t like modifying the config files (I find it messy), then there are also env vars you can override. From my docker-compose.yaml file:

```auto
      - NEXTCLOUD_TRUSTED_DOMAINS=domain.ltd
      - OVERWRITECLIURL=https://domain.ltd
      - OVERWRITEPROTOCOL=https
      - OVERWRITEHOST=domain.ltd

```

I found these env vars by exec-ing into the nextcloud container and I found a config/reverse-proxy.config.php file:

```auto
# cat config/reverse-proxy.config.php
<?php
$overwriteHost = getenv('OVERWRITEHOST');
if ($overwriteHost) {
  $CONFIG['overwritehost'] = $overwriteHost;
}

$overwriteProtocol = getenv('OVERWRITEPROTOCOL');
if ($overwriteProtocol) {
  $CONFIG['overwriteprotocol'] = $overwriteProtocol;
}

$overwriteCliUrl = getenv('OVERWRITECLIURL');
if ($overwriteCliUrl) {
  $CONFIG['overwrite.cli.url'] = $overwriteCliUrl;
}

$overwriteWebRoot = getenv('OVERWRITEWEBROOT');
if ($overwriteWebRoot) {
  $CONFIG['overwritewebroot'] = $overwriteWebRoot;
}

$overwriteCondAddr = getenv('OVERWRITECONDADDR');
if ($overwriteCondAddr) {
  $CONFIG['overwritecondaddr'] = $overwriteCondAddr;
}

$trustedProxies = getenv('TRUSTED_PROXIES');
if ($trustedProxies) {
  $CONFIG['trusted_proxies'] = array_filter(array_map('trim', explode(' ', $trustedProxies)));
}

```

---

<div class="post-metadata">

**Author:** ![dellplayer](https://help.nextcloud.com/letter_avatar/dellplayer/32/5_5575768a8748004e209b776fc1b2916d.png) [@dellplayer](https://help.nextcloud.com/u/dellplayer)\
**Post date:** [January 7, 2025, 7:18am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/13 "2025-01-07T07:18:30Z")

</div>

Working! Thank you.

---

<div class="post-metadata">

**Author:** ![Detlef](https://help.nextcloud.com/letter_avatar/detlef/32/5_5575768a8748004e209b776fc1b2916d.png) [@Detlef](https://help.nextcloud.com/u/Detlef)\
**Post date:** [March 19, 2025, 3:09pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/14 "2025-03-19T15:09:25Z")

</div>

Excellent, still working after years and despite many changes at NC.

---

<div class="post-metadata">

**Author:** ![Hip\_renegade](https://help.nextcloud.com/user_avatar/help.nextcloud.com/hip_renegade/32/68949_2.png) [@Hip\_renegade](https://help.nextcloud.com/u/Hip_renegade)\
**Post date:** [April 1, 2025, 7:37pm UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/15 "2025-04-01T19:37:31Z")

</div>

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![cbonesteak95](https://help.nextcloud.com/user_avatar/help.nextcloud.com/cbonesteak95/32/60845_2.png) [@cbonesteak95](https://help.nextcloud.com/u/cbonesteak95)\
**Post date:** [May 5, 2025, 6:19am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/16 "2025-05-05T06:19:55Z")

</div>

Worked for me, thanks. To anyone confused, you don’t need to change the above script at all. Just copy and paste it below your trusted domains like he has it in the solution.

---

<div class="post-metadata">

**Author:** ![dovely](https://help.nextcloud.com/user_avatar/help.nextcloud.com/dovely/32/75006_2.png) [@dovely](https://help.nextcloud.com/u/dovely)\
**Post date:** [October 21, 2025, 6:26am UTC](https://help.nextcloud.com/t/the-polling-url-does-not-start-with-https-despite-the-login-url-started-with-https/137576/17 "2025-10-21T06:26:33Z")

</div>

Still works! Thanks.
