Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Remote access to homeassistant as a VM and swag/duckdns as a docker

Featured Replies

Hey Guys,

 

i read now nearly every post about this subject...

it still dont want to work for me...
I got swag as a docker with a custom proxi network for bitwareden, nextcloud and vpn.

 

i got access to my homeassistant remotlie at ha.xxxx.de:8123

i dont get it to work with https://
 

home assistant configuration.yaml:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.3.210 #unraid ip-adress
    - 172.18.0.2 #swag ip-adress

 

 

and of corse i renamed the proxy-config file in swag:

homeassistant.subdomain.conf

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name ha.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;


    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app 192.168.3.10;
        set $upstream_port 8123;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }

    location ~ ^/(api|local|media)/ {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app 192.168.3.10;
        set $upstream_port 8123;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}
 

 

as i said i can conect remot to ha.xxxx.de:8123
so the port forwarding is working. 

 

What could it be?..

 

thanks for your reading this!

 

  • 2 months later...

UP

 

Sorry to hijack your thread but i'm have the same problem. I moved from a 'homeassistant-core' docker to a VM and i cannot get remote access through HTTPS working.

 

HASS config:

 

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.17.0.3

 

Screenshot 2022-08-23 at 07-53-45 Nginx Proxy Manager.jpg

 

I cannot figure out if i have to look in homeassistant or NPM or maybe a unraid setting that's wrong.

Port forwarding in pfSense is setup correctly.

 

[SOLVED]

 

Ok, so i stumbled upon a topic in the Home Assistant Forums with some very usefull info. The home assistant logs tell you where the request is comming from. Look for this line located in the home assistant config folder, named like 'home-assistant.log.1'. I opened it with notepad++.

 

ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 192.168.8.189

 

Note the IP adress at the end of the line and copy that in the home assistant configuration.yaml file.

 

http:

   use_x_forwarded_for: true

   trusted_proxies:

       -  192.168.8.189

 

It all makes sense to me now :)

 

Note: i use home assistant as a VM so my ip is in range of 192.168.#.### . If you use the docker version the IP may be more like 172.17.0.3 .

Edited by Aran

  • 3 months later...

This is aged but I feel it deserves a bump. 

 

@Aran, thank you for the help.  I was having a hard time finding my redirect and this resolved my issue. 

  • 1 year later...

@Aran a bit late, but thanks anyway, this solved my problem :)

Glad to help.

A friend of my had the same problem. I searched the www and stumbled upon my own post 😛

Home Assistant became an important part of our house now so i moved (again) from a vm to bare metal (nuc).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.