So I just did this successfully changing over from DuckDNS to tplinkdns.
Pre-Reqs:
- If you have something like the DuckDNS addon, make sure you disable it in the addons section of Home Assistant.
- If you have something already in your configuration.yaml like below
# http:
# server_port: 8124
# ssl_certificate: /ssl/fullchain.pem
# ssl_key: /ssl/privkey.pem
make sure you comment it out or remove it.
Setting up TP link DNS
- Open TPlink app and turn on your tplink DDNS. Create your unique URL.
- While in Tp link app, I port forwarded my HomeAssistant to port 80 as well as port 443
- Install the NGINX addon. My configuration looks something like this.
domain: {{your unique url}}.tplinkdns.com
hsts: max-age=31536000; includeSubDomains
certfile: fullchain.pem
keyfile: privkey.pem
cloudflare: false
customize:
active: true
default: nginx_proxy_default*.conf
servers: nginx_proxy/*.conf
real_ip_from: []
Network Port is 443
4. Go into the configuration.yaml and add lines like this (if you already have a “http” header, leave it out
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
ip_ban_enabled: true
login_attempts_threshold: 4
- Add the let’s encrypt addon. My config looks like this
domains:
- {{your unique url}}.tplinkdns.com
email: {{your email}}
keyfile: privkey.pem
certfile: fullchain.pem
challenge: http
dns: {}
- In Home Assistant go to Settings->System->Network->and under the Home Assistant URL section add https://{{your unique url}}.tplinkdns.com and put the toggle “on” for the local network->automatic
- Go ahead and turn on (start) both the NGINX and Let’s Encrypt addon’s. Make sure you check the box for auto update, start on boot and watchdog if available.
There are some restarts you will probably have to do along the way but if you did not do so already, restart now. After restart, try to access the new TPlink DNS URL and it should work as expected with no warnings since you have an SSL cert.
If it does not, you can access HA again by going to http://homeassistant.local:8123 to check the configs.
While setting up the first time, I initially had an issue where the certificate did not download so I had to restart the Let’s Encrypt addon and watched the logs to make sure it successfully grabbed a cert, once it did, I rebooted once more for good measure and I was able to access through the new URL once HA booted back up.
Hope this helps anyone else who was searching for this like I was. I was having issues with my Google Assistant accessing HA every now and then. If you are using the Google Assistant SDK, make sure you log into your google dev account to update the URLs to the new tplink dns url as well so that continues to work.
EDIT: one thing I missed, my SmartThings integration stopped updating in real time, this is because when you initially install it, you need to have a callback URL, mine must have still been pointing at the duckddns url. After deleting and re-adding the ST integration, I am back and running. No issues after moving off of DuckDNS still.