Home Assistant ZeroTier add-on is available and I am going to show you how to set up a ZeroTier VPN in Home Assistant, so you will be able to access it securely from any device running windows, macOS, linux, iOS or Android.

With ZeroTier you don’t need static IP or dynamic DNSes and you don’t have to go through complicated certificate creation process. On top, that whole setup will cost you nothing.

Home Assistant ZeroTier add-on | How to setup ZeroTier network and to add Home Assistant inside?

What is ZeroTier?

It is a company, and they have a flagship product called ZeroTier One. So, when I’m saying ZeroTier I’m actually referring to the ZeroTier One product. Clearing this out you may now wonder what is ZeroTier One?

What is ZeroTier One?

ZeroTier One is an open-source application that can be used to create secure and manageable networks where connected devices are treated like they’re in the same physical location and local network. ZeroTier provides a web based interface for network and clients management.

Unlike traditional VPN solutions, communications don’t need to pass through a central server or router — messages are sent directly from host to host and the result is very efficient and with minimal latency.

Home Assistant ZeroTier add-on

And here comes the Home Assistant in the whole picture. Thanks to Frenck, we have a Home Assistant ZeroTier One Community Add-on (link to GitHub page of the project). Using this add-on you can add your Home Assistant instance to the ZeroTier network and then to access it from anywhere in the world using virtually any modern device. Without any port forwards, payments, certificates and so on.

Let’s start a demo where:

  • I will login to ZeroTier website and I will create and configure a ZeroTier network.
  • After that, I will add my Home Assistant and my phone to the ZeroTier network, so they can communicate with each other regarding of their physical location and Internet connectivity.

ZeroTier Account creation

First, you need to setup a ZeroTier account:

You can use an existing Google, GitHub or Microsoft account to login or you can create a totally new one.

To use the Home Assistant ZeroTier add-on you need a ZeroTier account first
To use the Home Assistant ZeroTier add-on you need a ZeroTier account first

Create ZeroTier Network

After you logged in ZeroTier one way or another, go to Networks tab and create a new virtual Network by just clicking on Create a Network button.

Create a ZeroTier network by clicking on one button.
Create a ZeroTier network by clicking on one button.

A new network will be created instantly. This ZeroTier Network will have unique ID and a Name. The Network ID is one of the most important part of your ZeroTier network. Try to share your ZeroTier Network ID only with people you trust.

Configuring the ZeroTier network

Make sure that under Access Control section the Private Network option is set.

Set Access Control to Private if you wish to have the possibility to approve who can have access to your ZeroTier network.
Set Access Control to Private if you wish to have the possibility to approve who can have access to your ZeroTier network.

This ensures that only approved machines can connect to your network, and not just anyone who happens to know your ZeroTier Network ID! More on that later, because now I’m going to change the ZeroTier Network Name and subnet.

Under the Advanced section, I will choose a subnet that will be different with my existing local subnet.

Change ZeroTier network name and subnet
Change ZeroTier network name and subnet

I will leave all other settings as they are and I will add some clients/members for example my Home Assistant using the Home Assistant ZeroTier add-on and my Phone using the ZeroTier mobile app. I will start with Home Assistant.

Installation and starting ZeroTier Home Assistant add-on

The installation of this add-on is pretty straightforward and not very different in comparison to installing any other Home Assistant add-on.

In Home Assistant, go to: Configuration > Add-ons, Backups & Supervisor > Add-on Store and search for ZeroTier and install it.

Or you can click on the My Home Assistant button below and then search for ZeroTier.

Open your Home Assistant instance and show the Supervisor add-on store.
Search for ZeroTier in Home Assistat Add-on store
Search for ZeroTier in Home Assistat Add-on store.

When the Home Assistant ZeroTier add-on installation is finished, click on the Configuration tab of the add-on and add your ZeroTier network ID there.

Configure Home Assistant ZeroTier add-on before you start it
Configure Home Assistant ZeroTier add-on before you start it

In the above picture you can see how I added my Network ID in Home Assistant ZeroTier add-on configuration. You should do the same, but please, don’t forget to change the Network ID with yours.

When you are ready, go to Info tab of the Home Assistant ZeroTier add-on and click on the Start button. Optionally, in the Log tab you can hunt for errors or you can check if everything is OK.

Approve Home Assistant client in ZeroTier network

This is where all the beauty and simplicity of ZeroTier can be seen. To confirm adding Home Assistant instance in my ZeroTier network I just have to approve this client from the ZeroTier web interface.

Authorizing Clients in ZeroTier network
Authorizing Clients in ZeroTier network

Additionally, you can add short-name and/or description of the authorised client and basically that is it. The Home Assistant instance is now in the ZeroTier Network.

Adding my phone to ZeroTier network

I am going to add my phone in the ZeroTier network. Of course, I can also add any other device that I wish, but I think one more device just for the demo will be enough.

If you wish to do the same, perform the following steps:

  • Download and install ZeroTier App from your mobile store.
  • Open the App and enter your ZeroTier Network ID.
  • Tap on the Enable Default Route switch and save the changes.

Configuring ZeroTier app on a mobile phone
Configuring ZeroTier app on a mobile phone
  • In the main ZeroTier Mobile App screen, tap on the switch next to your Network ID to connect to the ZeroTier network.
  • Authorize the new client from the ZeroTier Web Interface, exactly the same way as we did with Home Assistant instance.

Home Assistant and Phone clients authorized in the ZeroTier web interface
Home Assistant and Phone clients authorized in the ZeroTier web interface

Access Home Assistant using phone mobile data and ZeroTier


Time for a demo, where I will access my Home Assistant dashboard from my phone with Wi-Fi disabled. For that, I will just have to type my ZeroTier Home Assistant Instance IP and the default Home Assistant Port in my phone browser. I will do that while I’m using only mobile data to simulate the case when I’m outside of my local network.

Home Assistant login page is now accessible from my phone mobile data. Thanks to ZeroTier.

Home Assistant login page is now accessible from my phone mobile data. Thanks to ZeroTier.

Question!

I want to ask you something! Are you using any kind of VPN and which one exactly? Let me know in the comments section bellow. I promise to ask you more questions… Just kidding I promise to respond you back, as I read all of the comments and actually reply to them.

Summary

And now, do not wonder what to read next and just click on my Home Assistant Categories section here on my website, where I’m having various of articles that you can have fun with. 

Don’t forget to subscribe for my Newsletter, if you haven’t done that already.

Follow me on Twitter, join my Discord server, stay safe and remember – Home Smart, But Not Hard!

I’m Kiril and I’m done writing. Bye!


6 Comments

Binoy · 22/12/2021 at 8:34 am

Can we use this tunnel to run Alexa voice models?

    Kiril · 22/12/2021 at 8:43 am

    I’m not sure about that. I can suggest to test it and to share the result. The whole setup will take you 10-15 minutes 🙂

Chris Balas · 01/05/2022 at 11:40 pm

Kiril,
Can I use this Zero Tier to remote into my Home assistant even when my internet provider only gives me a CGNAT IPv4 address. And if so, wouldn’t this eliminate the need to use the home assistant cloud?
Thanks!
Chris

    KIril Peyanski · 02/05/2022 at 10:22 am

    Hi Chris, you can use ZeroTier with CGNAT without any issues because ZeroTier acts like a VPN and you will be able to access your HA remotely that means you don’t need HA Cloud. The only issue that you will have in this scenario will be HA mobile application, which requires https accessible address to connect to your HA and for that you need either a static IP or dynamicDNS url like the one from DuckDNS

      Chris Balas · 03/05/2022 at 2:04 pm

      Kiril, thanks for the responce. I set up ZeroTier, and it is working well. I do want to use the home assistant companion app as I use geo-location services now. Can you give me a quick explanation on how to set up the companion app to use ZeroTier with DuckDNS ( I already have an account with DuckDNS).
      Thanks.

      Chris Balas · 03/05/2022 at 2:35 pm

      I’m not seeing where my last response was posted so, excuse me if this is redundant. Thank you for your response. I got ZeroTier working great. I would like to use the home assistant companion app as I use geo-location for presence detection. I have a DuckDNS account. Can you give me a quick explanation on how to set up the companion app with ZeroTier?

Leave a Reply

Avatar placeholder

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.