Docker Home Assistant remote access through Nginx

  • Hi

    I have installed HA and Nginx on docker omv 7, and it works ok with other containers.

    But for some reason I can't get it work with HA remote access.

    It works okay local.

    When I try to connect to it remotely it just keeps trying to reconnect.

    I have set it up duckdns in nginx.


    This is my configuration


    ---

    services:

    homeassistant:

    image: lscr.io/linuxserver/homeassistant:latest

    container_name: homeassistant

    network_mode: bridge

    environment:

    - PUID=1001

    - PGID=100

    - TZ=Europe/Copenhagen

    volumes:

    - /config/homeassistant/data:/config

    ports:

    - 8123:8123 #optional

    # devices:

    # - /path/to/device:/path/to/device #optional

    restart: unless-stopped


    homeassistant conf file


    # Loads default set of integrations. Do not remove.

    default_config:


    # Load frontend themes from the themes folder

    frontend:

    themes: !include_dir_merge_named themes


    automation: !include automations.yaml

    script: !include scripts.yaml

    scene: !include scenes.yaml


    homeassistant:

    external_url: "https://ha.xxxxx.duckdns.org:8043"

    internal_url: "http://192.168.1.70:8123"


    http:

    use_x_forwarded_for: true

    trusted_proxies:

    - 172.17.0.1


    duckdns:

    domain: xxxxxx.duckdns.org

    access_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx


    And I have forwardet port 8043, 443

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!