Skip to content

[BUG] Nextcloud notify_push fails if Nextcloud configured to serve http only #1150

Closed as not planned

Description

@neponn

Is there an existing issue for this?

  • I have searched the existing issues

Name of mod

nextcloud-notify-push

Name of base container

nextcloud

Current Behavior

If I configure the Nextcloud nginx config (default.conf) to serve only port 80, notify_push fails to load properly. I get the following in the logs:

nextcloud  | **** Making sure the Nextcloud Client Push plugin is installed and enabled ****
nextcloud  | notify_push already installed
nextcloud  | notify_push already enabled
nextcloud  | **** Starting notify-push ****
nextcloud  | [2026-05-16 16:55:40.348782 +10:00] ERROR [notify_push] src/main.rs:84: Self test failed: Error while communicating with nextcloud instance: error sending request for url (https://localhost/index.php/apps/notify_push/test/version)
nextcloud  | Connection to localhost (127.0.0.1) 7867 port [tcp/*] succeeded!
nextcloud  | **** Setting notify_push server URL to https://cloud.mydomain.net/push ****
nextcloud  | ✓ redis is configured
nextcloud  | ✓ push server is receiving redis messages
nextcloud  | ✓ push server can load mount info from database
nextcloud  | [2026-05-16 16:41:18.771454 +10:00] WARN [notify_push] /build/source/src/lib.rs:289: Error while trying to get cookie from Nextcloud error sending request for url (https://localhost/index.php/apps/notify_push/test/cookie)
nextcloud  | 🗴 push server can't connect to the Nextcloud server
nextcloud  |   error sending request for url (https://localhost/index.php/apps/notify_push/test/cookie)
nextcloud  | **** Retrying notify_push setup ****

etc

I have traced the issue to /etc/s6-overlay/s6-rc.d/svc-mod-nextcloud-notify-push/run. In the first few lines:

#!/usr/bin/with-contenv bash

export NEXTCLOUD_URL="https://localhost"

If I change https to http in the third line:

export NEXTCLOUD_URL="http://localhost"

Then everything loads properly:

nextcloud  | **** Making sure the Nextcloud Client Push plugin is installed and enabled ****
nextcloud  | notify_push already installed
nextcloud  | notify_push already enabled
nextcloud  | **** Starting notify-push ****
nextcloud  | Connection to localhost (127.0.0.1) 7867 port [tcp/*] succeeded!
nextcloud  | **** Setting notify_push server URL to https://cloud.mydomain.net/push ****
nextcloud  | ✓ redis is configured
nextcloud  | ✓ push server is receiving redis messages
nextcloud  | ✓ push server can load mount info from database
nextcloud  | ✓ push server can connect to the Nextcloud server
nextcloud  | ✓ push server is a trusted proxy
nextcloud  | ✓ push server is running the same version as the app
nextcloud  |   configuration saved
nextcloud  | [ls.io-init] done. 

This is a functional workaround, but will fail when I next update the image.

Expected Behavior

It should be possible to run the nextcloud container as HTTP only without causing these issues. If I've understood properly, the issue only impacts when the notify_push mod first starts and performs its self test. I assume it works properly after then (or maybe I'm wrong and it stays broken).

So why am I doing this?

I use SWAG as my reverse proxy. I would prefer - as for most other containers - that TLS is applied only in SWAG. It's not great practice to double TLS, so it would be better that the Nextcloud container serves only HTTP. I have a specific reason to do this: my corporate laptop has Netskope forced upon it; Netskope does all kinds of terrible things in the name of security, including messing up anything that involves double TLS.

Steps To Reproduce

  1. Deploy Nextcloud using docker compose and apply the nextcloud-notify-push mod
  2. Use SWAG to reverse proxy Nextcloud using only internal docker networking
  3. Deactivate 443 in the Nextcloud default.conf
  4. Start Nextcloud, observe the errors noted above

(I appreciate that this is a bit non-specific, but hopefully my comments above are sufficiently clear - let me know if you need more)

Environment

- OS: Debian Bullseye
- How docker service was installed: per docker instructions

CPU architecture

x86-64

Docker creation

services:
  nextcloud:
    image: linuxserver/nextcloud:33.0.3
    container_name: nextcloud
    environment:
      - PUID=912
      - PGID=912
      - DOCKER_MODS=linuxserver/mods:nextcloud-notify-push
    volumes:
      - /mypath/config:/config
      - /mypath/data:/data
    depends_on:
      - redis
    restart: unless-stopped
    networks:
      - swag_proxy-net
      - redis-net

  redis:
    image: redis:8.6.3
    volumes:
      - /mypath/redis:/data
    restart: unless-stopped
    container_name: redis
    networks:
      - redis-net

networks:
  swag_proxy-net:
    external: true
  redis-net:
    driver: bridge

Container logs

As above

Activity

  1. aptalca commented on May 16, 2026

    @aptalca
    Member

    NEXTCLOUD_URL needs to be the public url of your nextcloud instance for it to work properly

  2. neponn commented on May 17, 2026

    @neponn
    Author

    Thanks for the quick reply @aptalca. That was one of the first things I tried. It didn't help. To be clear, I added the following to my docker_compose.yml:

    services:
      nextcloud:
        image: linuxserver/nextcloud:33.0.3
        container_name: nextcloud
        environment:
          - PUID=912
          - PGID=912
          - NEXTCLOUD_URL=https://cloud.mydomain.net
          - DOCKER_MODS=linuxserver/mods:nextcloud-notify-push

    I've also confirmed that the NEXTCLOUD_URL env is passed into the container.

    But the start-up log contains the same error:

    nextcloud  | **** Making sure the Nextcloud Client Push plugin is installed and enabled ****
    nextcloud  | notify_push already installed
    nextcloud  | notify_push already enabled
    nextcloud  | **** Starting notify-push ****
    nextcloud  | [2026-05-17 16:21:01.368157 +10:00] ERROR [notify_push] src/main.rs:84: Self test failed: Error while communicating with nextcloud instance: error sending request for url (https://localhost/index.php/apps/notify_push/test/version)
    nextcloud  | Connection to localhost (127.0.0.1) 7867 port [tcp/*] succeeded!
    nextcloud  | **** Setting notify_push server URL to https://cloud.mydomain.net/push ****
    nextcloud  | ✓ redis is configured
    nextcloud  | ✓ push server is receiving redis messages
    nextcloud  | ✓ push server can load mount info from database
    nextcloud  | [2026-05-17 16:21:03.323385 +10:00] WARN [notify_push] /build/source/src/lib.rs:289: Error while trying to get cookie from Nextcloud error sending request for url (https://localhost/index.php/apps/notify_push/test/cookie)
    nextcloud  | 🗴 push server can't connect to the Nextcloud server
    nextcloud  |   error sending request for url (https://localhost/index.php/apps/notify_push/test/cookie)
    nextcloud  | **** Retrying notify_push setup ****
    

    The /etc/s6-overlay/s6-rc.d/svc-mod-nextcloud-notify-push/run script seems to be ignoring the env variable.

  3. aptalca commented on May 17, 2026

    @aptalca
    Member

    You're confusing me.

    Don't set the env var nextcloud url, it's only used internally.

    The nextcloud url setting in NC settings has to be the public url.

    It should be possible to run the nextcloud container as HTTP only without causing these issues.

    You can do whatever you want for your reverse proxy connection but don't remove the listen for 443 in NC's nginx conf. There is absolutely no reason to do so as it's only listening inside the container.

  4. neponn commented on May 18, 2026

    @neponn
    Author

    I have to confess to being a little confused myself. You suggested I should ensure NEXTCLOUD_URL is the public URL of my Nextcloud instance. I thought setting the environment variable was the best way to do it. If not, how should I go about it?

    I take your point that Nextcloud listening to 443 is not an inherently bad thing, but it does seem a bit odd that a self test of the push server would test a path that is not actually used. Testing https://localhost when all traffic is served via port 80 to SWAG doesn't seem like a robust test.

  5. aptalca commented on May 18, 2026

    @aptalca
    Member

    If not, how should I go about it?

    Follow the readme. Do nothing more, nothing less. Don't modify the default behavior of the app like removing nginx listen on port 443.

    Https has been the default method recommended for our Nextcloud image since its inception. For the majority of its life, it was the only supported method. SWAG's default connection is also https:
    https://github.com/linuxserver/reverse-proxy-confs/blob/master/nextcloud.subdomain.conf.sample#L33

    Testing https://localhost when all traffic is served via port 80 to SWAG doesn't seem like a robust test.

    It's not just a test. It's how the push service communicates with Nextcloud

  6. LinuxServer-CI commented on Jun 18, 2026

    @LinuxServer-CI

    This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

  7. moved this from Issues to Done in Issue & PR Trackeron Aug 17, 2026
  8. LinuxServer-CI commented on Sep 17, 2026

    @LinuxServer-CI

    This issue is locked due to inactivity

  9. locked as resolved and limited conversation to collaborators on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions