Setting Up DuckDNS in Home-Assistant.IO

Ferry Djaja
3 min readAug 15, 2021


This quick tutorial lets you walkthrough how to setup the DuckDNS in your Home Assistant.IO.

I am using Home Assistant.IO installed on my Raspberry Pi 4 sitting at my home and I would like to access my Home Assistant portal remotely when I am away from home. With DuckDNS, I can access your Home Assistant remotely.

DuckDNS Setup

Go to and logon using your preferred credential method. Once you logged on, add a domain and take note the token information. We will be using this token to configure the DuckDNS in Home Assistant.

Also take note the domain information you created (e.g., You will be using this information to access the Home Assistant remotely.

Install DuckDNS

Go to Supervisor and Add-on Store and search for Duck DNS.

After you have installed, go to Configuration.

Fill in the token information, add the domain you created from DuckDNS (e.g., and set accept_terms to true. Then save it.

Start the DuckDNS and go to Log tab. Ensure there is no error message and the certificate is created.

Go to Terminal (install if you don’t have one) and go to /ssl and check if fullchain.pem and privkey.pem are there.

We are good now for DuckDNS configuration in Home Assistant.

Port Forwarding

Now we need to configure the port forwarding in the router. The incoming traffic from DuckDNS with port 443 (HTTPS) will be routed to Raspberry Pi Home Assistant IP address with port 8123. I have reserved the static IP address for the Raspberry PI (in my case is

Here is my setting on my other Asus router TUF-AX5400.

Access Remotely

Before we can test the access remotely, go to Home Assistant and go to Configuration, General. Fill in the External URL with your DuckDNS domain URL (e.g., and Internal URL with your Raspberry PI IP address.

The last step is to update the configuration.yaml and add the following lines:

ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

Now restart the Home Assistant.

If everything is successful, you now can access the Home Assistant from the DuckDNS domain you created ( Don’t forget to put prefix HTTPS.