I have an existing LetsEncrypt container and am trying to setup Home Assistant via the LinuxServer Docker image. I am able to access Home Assistant via IP address from within my network, but when I try to access via URL, I get the login page that accepts my login information (and apparently validates it). When I login, I just see “Unable to connect to Home Assistant.” from both inside and outside my network, private tabs, and Android app. Nothing in logs, until the 3rd retry where I get the following in my logs:
2021-10-04 22:16:34 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from {pfsense} (192.168.1.1). (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36)
Any relevant logs I can look at or ideas why things aren’t loading?
I used the template provided in the LInuxserver/LetsEncrypt Docker image:
## Version 2020/12/09
# make sure that your dns has a cname set for homeassistant and that your homeassistant container is not using a base url
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name homeassistant.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app homeassistant;
set $upstream_port 8123;
set $upstream_proto http;
proxy_pass $upstream_proto://192.168.1.100:$upstream_port;
}
location /api {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app homeassistant;
set $upstream_port 8123;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
## Version 2020/12/09
# make sure that your dns has a cname set for homeassistant and that your homeassistant container is not using a base url
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name homeassistant.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app homeassistant;
set $upstream_port 8123;
set $upstream_proto http;
proxy_pass $upstream_proto://192.168.1.100:$upstream_port;
}
location /api {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app homeassistant;
set $upstream_port 8123;
set $upstream_proto http;
proxy_pass $upstream_proto://192.168.1.100:$upstream_port;
}
}