Hi, I have some issue with Caddy. i setup it and router to work with NoIp.
In the router i forwarded the port 80 and 443 (TCP and UDP).
On Caddy I am using the following config file:
{
“homeassistant”: “MySubDomain.hopto.org”,
“vhosts”: [],
“raw_config”: [],
“email”: “[email protected]”
}
But when i try to access to the web page (https://MySubDomain.hopto.org) from the browser after a while a got the message that is impossible see the page.
Hi Claudio,
i am using the version 0.10.10-2 from bestlibre. i tried to install also the version 1.3 using your adapted setting but i got the same effect. i have to do some additional setting in the router? i have just forwarded port 80 and 443.
I am using noip services instead duckdns. The displayed in the web page of the addon didn’t show any error. Does Caddy generate a log file in some repository?
You may want to try duckdns.org just to give you some additional clues. It takes you few minutes. Once run caddy, wait some time (like 15 minutes) and then see if it works
Probably being thick but I don’t get what Caddy adds, thought it was an alternative to services like duckDNS but @anon35356645 is using it with it so obviously not. Can someone give me an explanation in idiot’s terms as even their website doesn’t make it obvious?
I installed it, run it, and it was working … to this day I tried around 20 times with nginx and still not 100% working …
It is an alternative to letsencrypt + nginx (you still need duckdns for assigning your static IP, and, I think, with caddy is then easy to haveautomatically the certificates and those bla bla bla).
So you need caddy+duckdns (easy to install)
or
letsencrypt+nginx+dickdns (difficult to install and update with additional forwards)
Don’t think I’ve got anything that would benefit yet, the built in internal comms in hassio takes care of what I do use, but will definitely give Caddy a go as and when.
thx, but i dont have a degree
so if you use my name then please do it without such obvious …
@Bobby_Nobble its very usefull to use a proxyserver (doesnt matter if thats nginx, caddy or another) as gate between your outside network and inside network.
its usefull, for alexa skills, dashboards, or any other kind of communication between home assistant and other programs.
OK, thought I was there , can you explain more re Alexa skills so i have something I can relate to, as they will still communicate over the LAN it’s not like you can remove the router from the equation as your diagram suggests?
you need a router, because that is what gets an outside IP address from your provider.
1 IP address normally, not 2 or more.
so from the outside you only have 1 443 port, because your router only can use every port only once.
on the inside you have home assistant (thats a server) and perhaps HADashboard (thats a server) maybe FTP (a server) for your cams, your IP cams (are also servers) some local programming for alexa (for instance through appdaemon API, also a server) and there many more programs that are servers.
all those things that you want to reach from the outside, but you want all the data to be save.
so actually you would like to be able to have several 443 ports. but you cant have that.
so what to do about that?
all incoming data comes to your (save) 443 port from your router.
the router sends all that data to your proxy server
your proxy server decides what to do with that data.
for instance you could create 2 different duckns names and both send everything to your outside IP.
your router doesnt know the difference and sends everything to your proxyserver.
the proxyserver looks at the name that is used.
if it is name A it sends the data to home assistant
if it is name B it sends it to your dashboard
if after name A the url has /appdaemon/api/ in it it sends it to the appdaemon API server
if the url has FTP in it it sends it to your FTP server.
alexa needs a https address if you want a skill with local programming.
you could use the home assistant server for that (thats why HA with letsencrypt installed can work)
but then you cant use your 443 port for nothing else anymore (no cams that can be reached from the outside with https for instance)
I tried also duckdns but i got the same effect. I double check also the port forwarding on my router and it seems ok. DO you have any additional idea on which could be the root cause of my issue it’s like the proxy not works…how can i test it?
Thanks, makes a lot more sense. I guess I’ve been lucky that nothing currently needs that and with the duckDNS domains I use I specify the port I want to talk to on the inside in the url so all the forwarding I’ve needed so far has been similar to WAN 8123 to LAN device 8123 etc. Using the domain alone to talk to a specific internal port is attractive though so I may give this a go sooner rather than later.
most people that are busy with home automating sooner or later come to a point where they need to go this way.
everyone that uses HADashboard for example is better of using that way.
i see lots of people coming by that connect their appdaemon or their dashboard to their duckdns address.
most of them dont realise that when the internet goes down, also their automations in appdaemon or dashboards go down.
Who wants that?
if you only use home assistant and from the outside and you dont want to connect other programs to home assistant, then there is little need for a proxy server. but most people come to a point where they add stuff, and more and more and more
i never used caddy, but if claudio says that easy, then it probably is, so when you come to that point i would say go with that.
I have huge difficulties in understanding how it all works (because I did not understand it in the first place).
Some thoughts, but PLEASE take my suggestions as you would get suggestions from a blind man before crossing a road
did you disable the other Caddy addon?
do you have other services at port 80 (maybe affects the caddy service?)
do you have nginx also enabled (disable it)
did you put in duckdns.org the correct name (the same you use in Caddyfile configuration file)
Do you have this in your /HASSIOCONFIG/DIRECTORY/Share/caddy/Caddyfile (replace the xxx with the na,e you put in the duckdns.org website) and replace 192.168.1.12 with the STATIC IP address of your HASSIO installation