Need help setting it up with Traefik

I need help setting NC up using Traefik as reverse proxy. I used the guide at [Preformatted text](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#3-limit-the-access-to-the-apache-container) but I couldn’t get it working.

I’m using Traefik and installed it like this in combination with a Portainer instance:

services:
  reverse-proxy:
    # The official v2 Traefik docker image
    image: traefik:v2.10
    # Enables the web UI and tells Traefik to listen to docker
    ports:
      # The HTTP port
      - "80:80"
      # The Web UI (enabled by --api.insecure=true)
      #- "8080:8080"
      - "443:443"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik.yml:/traefik.yml:ro
      - ./letsencrypt:/letsencrypt
      - ./acme.json:/acme.json

I also use a traefik.yml file to load the configuration. I added this in the configuration as said in the guide

  file:
    directory: "/home/name/traefik/"

I’ve placed a file named “nextcloud.yml” into that folder and put in the code for that. I changed the rule to my subdomain e.g “nextcloud.myhost.com” and changed the URL from localhost:11000 to my VPS Ip address.

After that I ran the “startup command” with the only difference that I changed the port from 8080:8080 to 8081:8080.

The good thing is that I can reach the site and I can login either with “nextcloud.myhost.com” and my ip address:11000. Unfortunately tho is that I won’t accept the domain so I can’t procceed.

Always getting a 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')

This is the output NOTICE: PHP message: Expected was: 31c27eff2f7d809015eada886a52bd49f034177d16cc167e NOTICE: PHP message: The error message was: NOTICE: PHP message: The response of the connection attempt to "https://nextcloud.myhost.com:443" was: 404 page not found NOTICE: PHP message: Expected was: 31c27eff2f7d809015eada886a52bd49f034177d16cc167e NOTICE: PHP message: The error message was:

Can anybody help me with this? I put both, the aio and the domaincheck in the Traefik network in Portainer but that didn’t help neither.

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

nc -z localhost 11000; echo $? output is 0
I even added the private ip address of the command ip a | grep "scope global" | grep docker0 | awk '{print $2}' | sed 's|/.*||'

didn’t work either.

Maxbe this video helps you to figure things out? Installing Traefik as a Reverse Proxy for Nextcloud - YouTube