Old thread, but with duckdns going down a couple times last week, I was curious about this as well. I did try just copying the cert files but unfortunately did not work. Anyone ever use the certs from asuscomm in ha? Or better question might be, how can i create a cert for HA that is not a duckdns.org url
I run Asuswrt-Merlin on an RT-AC88u and use a custom ddns script for cloudflare, but run a separate docker container for letsencrypt on my server, and use an Nginx reverse proxy for HA.
Replying to my own comment for others in the future. So my asus router has the ability to get certs automatically from lets encrypt. It allows you to export those files.
key.pem
cert.pem
I just copied them into my Home assistant home directory and changed the appropiate entries in the
http:
section of my config.yaml to point to those files. and it’s all working as expected now
I just did this the other day and could not be happier
Basically ngnix running natively on my router. I have my own domain on google domains. I’m using Cloudflare for dns. Cloudflare has an api that works with certbot.
Required a little bit of understanding of ngnix and dns.
Just to follow up. I’ll try to write a more definitive guide later on this. Would mostly plagerize from the article I posted but here are the basic things I did.
Bought my own domain. I used google domains. $12 a year. No hosting, which is fine
I pointed my google domain to cloudflare. Main reason is that google domains do not have an API for the DNS challenge required to get a cert. Cloudflare does. In the instructions above, the writer uses his provider for the DNS challenge. you can skip that.
The config file ends up being in
/tmp/mnt/entware/entware/etc/nginx/sites-enabled
So homeassitant.conf or whatever you name it.
I will say that these steps are a bit confusing, and I know I did not write everything out in order It was a couple days of back and forth, but it’s working perfectly now. I have a few sites behind NGNIX.
Oh I forgot, you need a cname in cloudflare for your HA instance. So for example if your domain is stuff.com you need a cname for HASS, then hass.stuff.com will be your instance.
ok, hope this stream of consciousness helps at least a little bit.
Having my own domain, not needing duckdns, and being able to have internal and external urls for HA have been nice. The fact it runs fully on my ASUS router is also pretty cool.
I am exactly on the same boat you were some months ago. But now the NGINX add on doesn’t allow to tweak the config file as before.
I guess that I should enter your parameters in the “Custom Nginx Configuration” box but I can’t figure out how to do it without raising errors.
As you did then I want to use my own CERTs (downloaded from the UI of the Asus router) instead of requesting new ones but I can’t achieve that through the UI of the addon. Can you help me?
A lot of time passed, but as I just went through the setup, let me bring this up and give the solution that worked for me, with some symptoms.
router.asus.com (or your router IP address) → WAN → DDNS → Server Certificate - Export. It’ll download the *.tar file with key.pem and cert.pem. You need to put them in the /ssl folder in the Home Assistant. Important: in File Editor Add-On Configuration disable the Enforce Basepath option to be able to access this folder. Upload both pem files there
You can forward 443 only. I did both during the setup, but once I confirmed everything works, I removed the port 80 forwarding and it didn’t break anything
Yes, they expire every 90 days, so you have to update them manually.
One more thing: after you install the Nginx add-on, restart the Home Assistant. For some reason, I wasn’t able to use the Nginx add-on configuration page until I did that.
Also, don’t forget to add this to your configuration.yaml:
Important: do not change the IP address. This is really odd, but even though my whole home network is in the 192.168.x.x range, Nginx server chose to use the 172.30.33.x address.