#Getting the following alert re the

1 messages Β· Page 1 of 1 (latest)

shadow river
#

Move SSL to a proxy server

proper phoenix
shadow river
#

Yes

#

Or something else

#

I use Traefik, but HAProxy and Caddy also work well

proper phoenix
#

I use Swag to expose most of my services to the internet already, should I just be using that instead?

#

I got to get some sleep but will do some reading tomorrow - I’m not sure if I can expose the VM HA is running in with Swag as it only exposes the docker containers (may be limited to that).

shadow river
#

SWAG will work just fine for this

#

SWAG is basically NGINX

proper phoenix
#

Yeah, i actually think HA is exposed by swag, I use the same domain across both HA and the others, just different subdomains

#

Which makes me wonder, if I’m already using SWAG, why am I using SSL?

#

πŸ˜‚

#

😴

shadow river
proper phoenix
#

@shadow river are you able to elaborate a bit more on this or link me to any resources to read up on? trying to get my head around it so i know where I am at and where I need to go, and how to get there too!

shadow river
#

On what?

#

(also, I get notifications when you post in the thread, no need to tag me)

proper phoenix
#

SSL certs being in HA versus proxy

#

ah cool, i thought you blocked me ages ago for tagging u πŸ˜›

shadow river
#

I can do that again, and stop answering you, if you want wink

proper phoenix
#

stop tempting me πŸ₯Ί

shadow river
#

There's no HA specific documentation on it

proper phoenix
#

@... @,,,,,,, @!!!!!!

shadow river
#

Certainly not from HA themselves

proper phoenix
#

Ahh right. I did see a couple random threads on the forum but no real resolution (i.e. spoon fed version)

shadow river
#

The proxy side of it isn't HA specific

proper phoenix
#

you suggested moving SSL to proxy, whats the reasoning for that?

#

ah

shadow river
proper phoenix
#

fk I am going to have to scrap what I have done and start from scratch, just hosting the SSL within the proxy itself?

shadow river
#

Well, start the SSL bit from "scratch", yes

proper phoenix
#

Yeah...

shadow river
#
  1. Configure NGINX to do SSL for HA, with the same hostname etc as you use currently
#
  1. Remove SSL from HA
#
  1. ... profit?
proper phoenix
#

Might pester the good peeps on the LSIO discord for a moment πŸ˜„

shadow river
#

The only thing with HA is that you need to enable websockets in the proxy

#

Or just use Traefik

proper phoenix
#

What sets Traefik apart, besides its many features, is that it automatically discovers the right configuration for your services. omg

shadow river
#

Only if you're running stuff in Docker, but pretty much yes

proper phoenix
#

ah, home assistant is the only thing i do not use in docker

shadow river
#

I use it for HA with HA not in Docker, and it's not any harder there

proper phoenix
#

ah, vm?

shadow river
#

Nah, Core

proper phoenix
#

whats that running on? I am running OS in a VM

shadow river
#

I'm running it bare metal on a Mini PC

#

(AMD Ryzen)

proper phoenix
#

ah righto

#

so looking thru my SWAG config files, like ssl.conf, it already has SSL certs and keys referenced, so am I just doubling up by having them in HA as well?

shadow river
#

Well, yes, but no

#

Are you using SWAG for HA?

#

If so then you can simply remove SSL from HA and tell NGINX to use http:// for the proxy_pass

proper phoenix
shadow river
#

Well, probably not, because ... you know ... proxy πŸ˜‰

proper phoenix
#

πŸ˜‚

proper phoenix
#

so got rid of the SSL cert lines, but that did not work... now to figure out how to make the SWAG side work I guess

shadow river
#

First Google hit, but it looks right

proper phoenix
#

tried that and getting a 502 to the domain, and ERR_CONNECTION_REFUSED to the IP addy

shadow river
#

Well, you should be able to hit HA directly on the IP, with http:

proper phoenix
#

Nah, just get ERR_CONNECTION_REFUSED

This site can’t be reached10.0.0.245 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
#

wonder if its one of my proxy settings

#

likely

shadow river
#

Well, can you reach HA directly?

proper phoenix
#

nope. I am thinking maybe it is cloudflare or my port forward now

shadow river
#

Stop

#

Are you trying to reach HA on the LAN IP and port?

#
http://192.168.0.42:8123/
#

?

proper phoenix
#

yes

shadow river
#

Right, well, then Cloudflare and port forwarding have FUCK ALL to do with it

proper phoenix
#

10.0.0.245:8123 and 10.0.0.245:2096

#

I think my port is set to 2096

shadow river
#

What?

#

Why the fuck...

proper phoenix
#

that is what is popping up in the CLI

#

lol

shadow river
#

If you didn't then the port is still 8123

proper phoenix
#

correct, but even with removing that from the http config, its still on 2096

shadow river
#

Then you didn't restart HA

#

And you're nuts for changing it

proper phoenix
shadow river
#

Then I have no idea what you fucked up

#

Check your config file again

#

And then check HA's log file

proper phoenix
#

hehehe alright...

shadow river
#
2021-05-16 13:49:21 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
``` from one of my old log files
proper phoenix
#

hmmm wonder if i installed the cloudflared add on... will check that out

#

something is off

#

and whatever youtube i watched on this is what prompted me to go with 2096 πŸ˜„

shadow river
#

If you find out who that was, let me know so I can warn others to avoid them

proper phoenix
#

EverythingSmartHome - know him? πŸ˜„

shadow river
#

Oh... god

proper phoenix
#

lol

#

hmmm nup no add ons...

shadow river
proper phoenix
#

noted

#

again

shadow river
#

But also... check the log file, see what port it's really listening on

#

It's going to be much easier to tackle this methodically than just bang a bunch of random rocks together

proper phoenix
#

what log level should i set it to? at the moment its set as warning

#

trying debug

shadow river
#
2021-05-16 13:49:21 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
                    ^^^^
proper phoenix
#

ahh

#

2023-02-28 22:30:56.366 INFO (MainThread) [homeassistant.components.http] Now listening on port 2096

#

removing the entire http config should fix that, but it hasn't been

#
2023-02-28 22:33:25.722 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
#

or maybe it has been πŸ˜„

#

alright now we are in business

#

so. i can now access via 10.0.0.245:8123

#

Just have to figure out the SWAG side of things now

#

time to sleep on it and worry about the rest tomorrow

#

thanks for putting up with me Tink

proper phoenix
#

ok so for swag it says make sure that your dns has a cname set for homeassistant and that your homeassistant container is not using a base url - how do I do the latter?

#

hmm looks like its a deprecated thing from a few years ago

proper phoenix
#

figured it out, turns out with SWAG, HA does needs its own cname record regardless that the rest of the containers do not!

solar hollow
#

Sorry for the old tag but someone mentioned me and I couldn't find it then I saw this message saying I did this and was like uh what πŸ˜‚

shadow river
#

And ... where in there did I say you'd said anything? @solar hollow

solar hollow
#

You didn't, the OP did. I was just clearing my name was all πŸ˜„

#

Ah got it, thanks

shadow river
#

Ah... well... I'm not responsible for somebody else... particularly them

proper phoenix