HA in docker with add-ons

Hi, I was following the guide from Alan Byrne and especially Installing Docker, Home Assistant and Portainer on Ubuntu Linux — Home Automation Guy with the difference that I’m using Qnap Container Station (Container Station | Supports LXD, Docker, and Kata Containers | QNAP) as my docker station.

I have created the docker-composer application like this:

version: '3'

services:
  portainer:
    container_name: portainer
    image: portainer/portainer-ce:latest
    restart: always
    ports:
      - 9001:8000
      - 9000:9000
      - 9043:9443
    environment:
      - TZ=Europe/Warsaw
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /opt/volumes/portainer/_data:/data:rw
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/volumes/home_assistant_config/_data:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
  duplicati:
    image: lscr.io/linuxserver/duplicati:latest
    container_name: duplicati
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Warsaw
      - CLI_ARGS= #optional
    volumes:
      - /opt/volumes/duplicati/_data/config:/config
      - /opt/volume:/source
    ports:
      - 8201:8200
    restart: unless-stopped

When I run the portainer and duplicate in the web browser directly (e.g. http://qnap.local:8201/ngax/index.html) it works fine, but when I try to add it in the HA as dashboards, I’m getting errors:


I have no idea what is causing it. Can anyone help? It looks when the page runs in the dashboard iframe, it does not have access to all ports?

Https is required for frame and pretty sure for dashboard.

That plus this method effectively make HA a proxy and some services require proxy forward requests properly

Could be other reasons but likely it is this

1 Like