[SOLVED] Nextcloud-aio behind pfsense HAproxy

I’m trying to deploy nextcloud-aio on my homelab, behind my pfsense firewall, that embed HAproxy

I use docker-compose with the following compose file :

version: '3.9'
services:
    all-in-one:
        image: 'nextcloud/all-in-one:latest'
        volumes:
            - '/var/run/docker.sock:/var/run/docker.sock:ro'
            - 'nextcloud_aio_mastercontainer:/mnt/docker-aio-config'
        ports:
            - '8843:8080'
        environment:
          - APACHE_PORT=11000
          - APACHE_IP_BINDING=0.0.0.0
        restart: always
        container_name: nextcloud-aio-mastercontainer
        init: true
volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
    nextcloud_aio_mastercontainer:
      name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work

HAproxy is configured to redirect to my docker_host_private_ip:11000 :

i can access the AIO interface at 192.168.100.6:8843, but not at nc.mydomain.tld, where i get a 503 error.

i’ve read throught AIO reverse proxy documentation, but can’t find what’s wrong in my setup.

any idea?

Hi, can you follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#6-how-to-debug-things?

yes, i did, and everything seems fine according to that checklist, but the issue persist

What happens if you enter your domain in the aio interface?

i get the following error :

Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. ('sudo docker logs -f nextcloud-aio-mastercontainer')

and this, in the logs :

NOTICE: PHP message: The response of the connection attempt to "https://nc.2027a.net:443" was: <html><body><h1>503 Service Unavailable</h1>No server is available to handle this request.</body></html>

everithing started to work when i added

environment:
...
  - NEXTCLOUD_DATADIR=/mnt/srv/ncdata

not sure why, but that’s what it is !

could you please provide full docker compose file? I can’t get this to work behind pfsense haproxy even though I have the same settings as you for the reverse proxy pointing to the local dns of the ip and the port