AppDaemon - V4.3.0 CloudFlare+Reveres proxy

it was working perfectly (almost),
the issue must be relate to change i done is which changing the domain and setup with cloudflare + traefilk as reverse proxy(all http redirect to https).
so no longer accessing with local ip but domain name.

token confirm.

see before change:

      type: hass
      namespace: appdaemon-hass
      token: !secret appdaemon_token
      type: mqtt
      namespace: default
      client_host: !secret mqtt_broker

and now i update it to:


AD keep throwing

2020-04-13 01:32:18.203939 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds

dashboard is accessible via localhost:5050 with no issue

If both AppDaemon and HomeAssistant are running locally, you should still be able to access Home Assistant using the Internal URL. You don’t want AppDaemon <–> HASS Traffic to go out to the internet and back again. That will slow your AppDaemon automation response times considerably.

Thanks Danial ,

I’m little confused ,
When i do inspect on the HA docker i get:

And i can’t access it using the browser only by or,
AppDameond is not able to access both as they external to the server?
I changed the ha_url to use instead and it does working fine,
but i have some concerns:

1.My router configure as ,
The internal IP i see in HA ( set by Docker ?
How can i define it permanently to specify IP so next reboot it wont change?
2.Is there an option to configure some internal DNS name to internal ip which are not belong to external network ?

as WA , till i find suitable solution from Traefik.
I assign static IP for HA by adding:


Does HA run on the same machine as AppDaemon? If so, did you try to put If not, what is your config for the dashboard in appdaemon.yaml? Can you access the web interface from the machine running AppDaemon over

Hi ,

I tried that - it didn’t work ,
The odd thing is when i enter to appdaemon docker and ping all working:

/usr/src/app # ping
PING ( 56 data bytes
64 bytes from seq=0 ttl=64 time=0.086 ms
64 bytes from seq=1 ttl=64 time=0.122 ms

## this is HA docker ip
/usr/src/app # ping
PING ( 56 data bytes
64 bytes from seq=0 ttl=64 time=0.257 ms
64 bytes from seq=1 ttl=64 time=0.160 ms
64 bytes from seq=2 ttl=64 time=0.123 ms

from some reason it not able to connect with only with

Do you run Home Assistant and AppDaemon in the same docker stack? Do you use docker-compose? If so, can you please post your docker-compose file?

yes ,both on same stack ,
i also verify on same network

       "7e2e28af81763a02a747c0000494ed2111111f9d0d07fa6d216b8206557": {
                "Name": "appdaemon_4",
                "EndpointID": "238538d4764b5365c04fb04b911111ba74644521ea64c083b98810",
                "MacAddress": "02:42:ac:1d:04:07",
                "IPv4Address": "",
                "IPv6Address": ""

            "ddeb91b86b0f57ed1b7e6cbfd2b8918a7704d33ff3a4fbdfd52a15e96276c138": {
                "Name": "HA",
                "EndpointID": "a94445c7909e604060bae8a2eb075666666666d3af280d29545aa7d1470",
                "MacAddress": "02:42:ac:1d:04:06",
                "IPv4Address": "",
                "IPv6Address": ""

docker -compose:

    container_name: HA
    image: homeassistant/home-assistant:latest
      - /share/Avi/HA/:/config
      - /etc/localtime:/etc/localtime:ro
    restart: always
      - 8123:8123    
        - mosquitto
      traefik.enable: true
      traefik.http.routers.hasss.rule: Host(`ha.${DOMAINNAME}`)
      traefik.http.routers.hasss.entrypoints: websecure 8123


      context: ./appdaemon4
      dockerfile: Dockerfile
    container_name: appdaemon_4
   # command: supervisord -n
      - 5050:5050
      - /etc/localtime:/etc/localtime:ro
      - ${PWD}/appdaemon4/config:/conf
      - homeassistant
    restart: always

Hmm, from my limited knowledge I assume you can only do it like you did, with specifying a fixed IP for the HA container. I don’t know a anything about Traefik (I use NGINX), can you access HA through the IP of the host from any other device on your network?