nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
296 stars 258 forks source link

Issue resolving remote host address with ingress and traefik - reverse natted. #454

Open gthieleb opened 8 months ago

gthieleb commented 8 months ago

Describe your Issue

I am having an error resolving the remote address. My setup is in my homelab on a qnap NAS using a nondefault port for ingres (nginx)/lb (traefik) and natted from outside using the same port.

Logs and Errors

kubectl logs qnap-ingress-nginx-controller-5ff4b97fc9-9xdrj
10.42.0.1 - - [25/Oct/2023:08:50:47 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0" 76 0.059 [qnap-qnap-nextcloud-8080] [] 10.42.0.150:80 0 0.059 304 3970f49168104552ac2de7789adb3616
10.42.0.1 - - [25/Oct/2023:08:51:17 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0" 76 0.080 [qnap-qnap-nextcloud-8080] [] 10.42.0.150:80 0 0.080 304 c45ae73a52938eff57c6ae9c1437f738

Error message

Es gibt einige Fehler bei deiner Systemkonfiguration.

    Your remote address was identified as "10.42.0.1" and is bruteforce throttled at the moment slowing down the performance of various requests. If the remote address is not your address this can be an indication that a proxy is not configured correctly. Further information can be found in the [documentation ↗](https://docs.nextcloud.com/server/27/go.php?to=admin-reverse-proxy).

Describe your Environment

k3s 1.21 (shipped with qnap)

Chart.yaml:

  - name: nextcloud
    version: 4.3.5
    repository: https://nextcloud.github.io/helm/
    condition: nextcloud.enabled

nextcloud: image: flavor: fpm nginx: enabled: true enabled: true nextcloud: host: example.com env: NEXTCLOUD_TRUSTED_DOMAINS: "example.com" configs: custom.config.php: |- <?php $CONFIG = array ( 'default_phone_region' => 'DE', 'trusted_proxies' => array( 0 => '127.0.0.1', 1 => '10.0.0.0/8' ), 'forwarded_for_headers' => array('HTTP_X_FORWARDED_FOR'), ); internalDatabase: enabled: false externalDatabase: enabled: true type: postgresql postgresql: enabled: true primary: persistence: enabled: true persistence: enabled: true nextcloudData: enabled: true size: 32Gi # Can be extended later phpClientHttpsFix: enabled: true protocol: https ingress: enabled: true className: nginx tls:

Additional context, if any

jessebot commented 8 months ago

I haven't used nextcloud with traefik yet, so I've set this to "help wanted" for others in the community to give their experience. Some minor follow up questions though:

OneMoreByte commented 7 months ago

Don't traefik and nginx-ingress both manage ingresses? Are you having traefik route into nginx-ingress and then into the services?