Home assistant

Setting up DuckDNS on your Home Assistant and reach it outside you local network without a static IP

TL;DR: Set up DuckDNS in Home Assistant to access your system remotely for free by creating a subdomain and configuring port forwarding on your router.

Frequently Asked Questions

What is DuckDNS and why use it with Home Assistant?

DuckDNS provides a free dynamic DNS service, allowing you to access your Home Assistant instance using a custom subdomain (e.g., yourname.duckdns.org) instead of a local IP address. This is particularly useful if you don’t have a static IP address from your ISP, enabling remote access to your smart home system from anywhere.

AliExpress
Do I need a static IP address to use DuckDNS with Home Assistant?

No, a static IP address is not required. DuckDNS is designed to work with dynamic IP addresses. It updates your subdomain’s IP address automatically whenever your home’s public IP changes, ensuring you can always connect to your Home Assistant instance.

What is port forwarding and why is it necessary for remote access?

Port forwarding on your router directs incoming internet traffic on a specific port (like 8123 for Home Assistant) to a specific device on your local network. This is crucial for remote access because it allows external requests to reach your Home Assistant server, even though it’s behind your router’s firewall.

What are the prerequisites for setting up DuckDNS with Home Assistant?

You’ll need to be running Home Assistant Supervised or a similar installation that allows add-ons. Additionally, you’ll need access to your router’s settings to configure port forwarding and an account on DuckDNS.org to create your subdomain and obtain an API key.

By using DuckDNS, you can reach you Home Assistant instance from outside your network – instead of using http://homeassistant.local:8123 you can use http://yoursubdomain.duckdns.org:8123 from anywhere.
Using a static IP costs more, but this method is absolutely free!

This guide assumes you are using Home Assistant Supervised.
Let’s get started;

  • First, go into your HA Supervisor
  • Click on “Add-on store”
  • Click on DuckDNS
  • Click Install.

Wait until the installation is done and let’s configure it.

You need to go to https://duckdns.org, sign up and create your new subdomain.

Look up and you will find your API key. This key needs to be updated in the add-on configuration.
Go to the configuration tab, and paste it on the api_key row after the “:”

Now comes the tricky part – if your router has a firewall (and it should!!!) You need to open the homeassistant port to the outside world, so you will be able to access it outside of your local network.
There are many router configurations so generally, you will need to “open ports” section or similar on your router settings (which is most commonly 192.168.1.1/192.168.0.1) and route the port 8123(inner) to 8123(outer).

Basically, that’s all you need and you’re home assistant is good to go.
Restart/Start the ad-on – If you’ve set it up correctly, you will be able to access your home assistant from your custom subdomain on duckdns.org! Just remember you have to add the port to your local installation which is 8123 by default – so the address will be yourdomain.duckdns.org:8123

One response to “Setting up DuckDNS on your Home Assistant and reach it outside you local network without a static IP”

  1. I believe that is one of the most vital information for me.
    And i am happy reading your article. However wanna statement on some general things, The web site taste is ideal,
    the articles is actually great : D. Just right process, cheers

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.