what's going on everybody. Juan here and on today's video I'm going to show you
how to set up the DuckDNS add-on in Hass.io so you can access your home
assistant securely from outside your home network. So let's get started. Okay
before we set up remote access make sure that you already set up a password for
the home assistant web interface on my previous video I show you guys how to
install Hass.io we set up two ways to access a home a
system configuration files and we also password-protected the home assistant web
interface so if you haven't seen that video yet definitely check it out you
can find a link in the description below alright let's open home assistant go to
Hass.io select add-on store and then click on
duck DNS now click on install and give it a couple of minutes for the add-on to
install once the installation finish go to duckdns.org and sign in using one of
the available methods to create a new account. Create a new subdomain name and
then copy the new duck DNS token above go back to home assistant and under
config we need to edit the following: change the accept terms to true then
under token enter the new DuckDNS token number and under domain enter the new
domain name created in the DuckDNS website make sure that the token number and the
domain name are enclosed with quotation marks now click on save and before
starting the add-on there are a few things that you need to setup in your
router first of all you need to setup that the Raspberry Pi always gets the
same IP address and you also need to create a couple of port forwarding rules
all router settings are a little bit different so I wouldn't be able to tell
you exactly where to go to set these things up there's a website called
portforwarding.com that you can visit for instructions on how to set up a port
forwarding rule in the specific router brand that you have here is how it will
be for an Asus router the first rule we are going to name it Hass.io_Let's_Encrypt
the port range set it to 80 the local IP set it to the raspberry
Pi's IP address the local port said it to port 80 and for the protocol leave it
said as TCP some Internet service providers blocked port 80 so if you
don't have access to this port you can set it up to forward to port 443 instead
for the next port name it Hass.io_ SSL set the port range to 443 the local IP set
it to your PI's IP address the local port to port 443 and the protocol leave
it set to TCP lastly click on apply and then reboot the router. After the router
is back online go back to the home assistant website and start the DuckDNS
add-on check the log below to make sure that everything went well all right so
the setup was successful now go back to the routers port forwarding page setup a
new Hass.io_SSL rule to forward port 443 to port 8123 instead then remove
the previous Hass.io_SSL rule that was created before click on apply and then
restart your router next we need to add the new DuckDNS URL that we created and
also the SSL information in the configuration.yaml file so let's
go back to home assistant and we're going to use the configurator add-on to
access the configuration.yaml file under HTTP setup the base_url to the new
DuckDNS domain then enter the following information for the SSL certificate and
the SSL key lastly click on save and restart home assistant to apply the
changes
alright so the DuckDNs add-on is now set up and we can access the home assistant
remotely and also locally with the new DuckDNS URL. Last but not least there's a
couple of things that we need to reconfigure and this is if you're using
the Configurator add-on only as you can see if you try to access the
configurator add-on from the shortcut in the side menu it won't open the reason
for that is because we set up an SSL connection for home assistant. To correct
this go to Hass.io Configurator and under config change the
SSL to true click on save and then click on open web UI in the configuration.yaml file
look for the panel-iframe that we created in the previous video to
setup the shortcut in the home assistant side menu under URL change the default
link to the new DuckDNS URL and setup the port 3218 at the end. Make sure that
you put HTTPS at the beginning of the URL then click on save and restart home
assistant now we also need to setup a port forwarding rule for the
configurator so go back to your router settings and create a new forwarding
rule call it Hass.io_Configurator for the port range enter 3218 for the
local IP set it to the PI's IP address the local port set it to 3218 and
leave the protocol set to TCP click on apply and then restart the router. Now
when you try to access the configurator again from the side menu it will open it
using the new DuckDNS URL. All right guys we're going to leave it here for now but
in the next video we'll go over how to install and configure node-red so we can
make home assistant even better so definitely stay tuned for that
like always guys thank you for watching if you like this video give it a thumbs
up don't forget to subscribe you haven't done so already and
I will see in the next video