502 Error with application grocy

Hello there,
I’m running your grocy image in my own docker environment. But I can not make it reachable from the internet. For this I’m running traefik 2.4.8 with letsencrypt: I have also home assistant core (e.g. docker image) 2020.6.x, which I can reach from the internet. I made the similar label- based config. Why I get a “502 bad gateway” response?
Below my docker-compose.yaml:
version: "3.8" services: homeassistant: container_name: homeassistant image: homeassistant/home-assistant:latest volumes: - "homeassistant:/config" - "/etc/localtime:/etc/localtime:ro" network_mode: host devices: - "/dev/ttyACM0:/dev/ttyACM0" restart: unless-stopped labels: - "traefik.enable=true" - "traefik.http.routers.homeassistant.entrypoints=http" - "traefik.http.routers.homeassistant.rule=Host(homeassistant.xxx.duckdns.org)" - "traefik.http.middlewares.homeassistant-https-redirect.redirectscheme.scheme=https" - "traefik.http.routers.homeassistant.middlewares=homeassistant-https-redirect" - "traefik.http.routers.homeassistant-secure.entrypoints=https" - "traefik.http.routers.homeassistant-secure.rule=Host(homeassistant.hexapuma.xxx.org`)"
- “traefik.http.routers.homeassistant-secure.tls=true”
- “traefik.http.routers.homeassistant-secure.tls.certresolver=http”
- “traefik.http.routers.homeassistant-secure.service=homeassistant”
- “traefik.http.services.homeassistant.loadbalancer.server.port=8123”
- “traefik.docker.network=proxy”

hass-configurator:
container_name: hass-configurator
image: causticlab/hass-configurator-docker:x86_64
volumes:
- “hass-configurator:/config”
- “homeassistant:/hass-config”
networks:
- smarthome-frontend
ports:
- “3218:3218”
restart: unless-stopped
traefik:
container_name: traefik
image: traefik:2.4.8
volumes:
- “/etc/localtime:/etc/localtime:ro”
- “/smarthome/traefik/data/traefik.yaml:/traefik.yml:ro”
- “/smarthome/traefik/data/dynamic_conf.yaml:/dynamic_conf.yml”
- “/smarthome/traefik/data/acme.json:/acme.json”
networks:
- proxy
ports:
- 80:80
- 443:443
restart: unless-stopped
security_opt:
- no-new-privileges:true
extra_hosts:
- “host.docker.internal:172.17.0.1”
labels:
- “traefik.enable=true”
- “traefik.http.routers.traefik.entrypoints=http”
- “traefik.http.routers.traefik.rule=Host(traefik.xxx.duckdns.org)”
- “traefik.http.middlewares.traefik-auth.basicauth.users=lotse:$$apr1$$98SlGN.d$$k2LCyn9r8k0uj3iLnvydI.”
- “traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https”
- “traefik.http.routers.traefik.middlewares=traefik-https-redirect”
- “traefik.http.routers.traefik-secure.entrypoints=https”
- “traefik.http.routers.traefik-secure.rule=Host(traefik.xxx.duckdns.org)”
- “traefik.http.routers.traefik-secure.middlewares=secHeaders@file,traefik-auth”
- “traefik.http.routers.traefik-secure.tls=true”
- “traefik.http.routers.traefik-secure.tls.certresolver=http”
- “traefik.http.routers.traefik-secure.service=api@internal”
- “providers.file.filename=/dynamic_conf.yml”

portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: always
ports:
- 9000:9000
volumes:
- “/var/run/docker.sock:/var/run/docker.sock”
- “portainer_data:/data”

grocy:
image: ghcr.io/linuxserver/grocy:amd64-latest
container_name: grocy
volumes:
- “grocy:/config”
networks:
- proxy
ports:
- 9283:80
environment:
- “TZ=Europe/Berlin”
- PUID=1000
- PGID=1000
restart: unless-stopped
labels:
- “traefik.enable=true”
- “traefik.http.routers.grocy.entrypoints=http”
- “traefik.http.routers.grocy.rule=Host(grocy.xxx.duckdns.org)”
- “traefik.http.middlewares.grocy-https-redirect.redirectscheme.scheme=https”
- “traefik.http.routers.grocy.middlewares=grocy-https-redirect”
- “traefik.http.routers.grocy-secure.entrypoints=https”
- “traefik.http.routers.grocy-secure.rule=Host(grocy.xxx.duckdns.org)”
- “traefik.http.routers.grocy-secure.tls=true”
- “traefik.http.routers.grocy-secure.tls.certresolver=http”
- “traefik.http.routers.grocy-secure.service=grocy”
- “traefik.http.services.grocy.loadbalancer.server.port=9283”
- “traefik.docker.network=proxy”
- “traefik.http.services.grocy.loadbalancer.server.scheme=http”
volumes:
homeassistant:
hass-configurator:
portainer_data:
grocy:

networks:
smarthome-frontend:
proxy:
external: true
`

TIA for yout help

strictly speaking, we do not support traefik in any way. We do have a couple users with a wealth of experience, but you would need to come in discord into #other-support to discuss it.

I will refer you to our reverse proxy 502 guide: SWAG setup - LinuxServer.io which may help you. Simply put, traefik can’t reach the application and thus cannot proxy it.