Home Assistant Community Add-on: ZeroTier One

To those who have an OVA based HassOS install running on Proxmox / VMWare / Hyper-V, I ended up setting up a small zerotier VM (1vCPU, 512MB RAM) that is now running quite nicely as a gateway to my home LAN (rather than just my HA instance).

Loosely followed these instructions as i needed a lil extra clarification:
https://0wned.it/2017/12/04/building-a-zerotier-bridged-network/

Couple of things to note:

  • Working curl installer:
curl -s https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg | gpg --import
curl -s https://install.zerotier.com/ | gpg --output - >/tmp/zt-install.sh && bash /tmp/zt-install.sh
  • Adjust interface device to your nicā€™s name as shown in ifconfig
  • Zerotier device will likely differ from zt0 - can be found via ifconfig after installing Zerotier

Apart from that, went relatively smoothly

3 Likes

each host you want to reach needs the zerotier client installed.

as I understand it, you cannot use zerotier to access, say, an ip cam or xiaomi bridge on your local network

however, I donā€™t see why you couldnā€™t install zerotier on your windows/linux machine and once in control of that machine, use it control something else on the local network

1 Like

You can with the method i mentioned above but it requires a VM being set up, or setting a device on your network with the client and then bridging.

Canā€™t be done at present using the addon though, of course.

1 Like

I am having the same issueā€¦All my devices on my zerotier VPN can access and ping each other, but none can access my HA setup. The ZeroTier management portal shows all devices (including HA) as being connected, but nothing can access HA.

19-04-04 23:04:16 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-04-04 23:04:16 INFO (MainThread) [hassio.homeassistant] Successful run Home Assistant 0.91.0
19-04-04 23:11:47 INFO (SyncWorker_8) [hassio.docker.interface] Clean hassioaddons/zerotier-amd64 Docker application
19-04-04 23:11:50 ERROR (SyncWorker_8) [hassio.docker] Can't start addon_a0d7b954_zerotier: 500 Server Error: Internal Server Error ("linux runtime spec devices: error gathering device information while adding custom device "/dev/net/tun": no such file or directory")
19-04-05 00:37:31 INFO (MainThread) [hassio.snapshots] Found 0 snapshot files
19-04-05 00:37:31 INFO (MainThread) [hassio.host.info] Update local host information
19-04-05 00:37:31 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
19-04-05 00:37:31 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/beta.json

Also this errorā€¦

Hassio on Synology Virtual Machineā€¦

System Health

|arch|x86_64|
| --- | --- |
|dev|false|
|docker|true|
|hassio|true|
|os_name|Linux|
|python_version|3.7.2|
|timezone|Europe/Brussels|
|version|0.91.1|
|virtualenv|false|

@frenck Hi any luck with ZeroTier for those of us using VMā€™s do you think you can get it to work?
I have tried Linux and OpenWRT to use as Layer 2 bridges but just falls on its face in my setup as I use Pfsense with VLANā€™s and can only ever get ZeroTier network to talk to the bridge itself.
I also looked into ZeroTier for Pfsense but nothing promising yet.

Frenck submitted a pull to the HassOS repo here: #390

Looks like itā€™ll be in the next release of HassOS so may just have to wait til then?

1 Like

Good to know would be super useful.

:tada: Release v0.2.0

Full Changelog

:warning: Breaking change :warning:

The add-on now supports connecting to multiple ZeroTier networks at once :tada: .
However, this changes its configuration to support that. The network_id configuration option, has been replaced by the networks configuration option, which accepts a list of network IDā€™s.

Changed

  • :books: Update example config (#6)
  • :arrow_up: Upgrades base image to v3.1.0
  • :sparkles: Adds support for Hass.io network configuration
  • :arrow_up: Upgrades libgcc to 8.3.0-r0
  • :arrow_up: Upgrades libstdc++ to 8.3.0-r0
  • :sparkles: Adds support for multiple networks
  • :books: Updates README to match latest changes
  • :ambulance: Fixes secret support for network IDs
  • :ambulance: Donā€™t show resolved secrets in add-on log

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

Interesting! This is now working perfectly for meā€¦ how odd. My HA NUC only has an IPv6 address and port 443 open and I use a reverse proxy (caddy) and I can connect to the ZeroTier One IP address on port 8123! This is perfect! Secure connection via the VPN it creates.

Iā€™m notice that after using zerotier to access home assistant remotely, in my phone, home assistant get unresponsive, and I have to reboot the hassio docker to get home assistant running again, any thoughts?

I have noticed nothing like that.

Cant get this to start:

System Health
arch	x86_64
dev	false
docker	true
hassio	true
os_name	Linux
python_version	3.7.3
timezone	Europe/London
version	0.92.0
virtualenv	false
Lovelace

mode	storage
resources	6
views	5

config:

{
  "networks": [
    "1c75fc193e19840f"
  ],
  "api_auth_token": ""
}

As soon as I click the ā€˜Startā€™ button, it turns red and refuses to start.

Can anyone help?

Well the config is red =error. It wonā€™t save if thereā€™s an error. So probably the network ID is too long or too short.

I made the network id up David whilst posting, the original one is not red in the config, the same as the ā€œā€ in the api_auth_token. Its just strange that it refuses to start at all, not even showing any info in the log after refreshing. I wondered if its because its running in Proxmox.

Is there away to test ZeroTier to make sure the network is working

You need to authorise it in ZeroTier siteā€¦

Its says that on the ZeroTier site but not sure how to:

The nodes will pop up and you can authorise them. They will be displayed below your screenshot.

This means the Hass.io supervisor is not able to start the add-on.
For information on what is going wrong you need to go to: Hass.io panel ā†’ System tab ā†’ Look at the log there.

Yes, Proxmox is an issue.

See:

And see:

19-04-26 08:02:42 INFO (SyncWorker_5) [hassio.docker.interface] Clean addon_a0d7b954_zerotier application
19-04-26 08:02:42 ERROR (SyncWorker_5) [hassio.docker] Can't start addon_a0d7b954_zerotier: 500 Server Error: Internal Server Error ("linux runtime spec devices: error gathering device information while adding custom device "/dev/net/tun": no such file or directory")