Home Assistant Community Add-on: ZeroTier One

Thanks for another great add-on :+1:

After setting up config and starting the add-on I get nothing in the log, but the hassio system log is showing:

19-04-02 21:01:44 INFO (SyncWorker_0) [hassio.docker.interface] Clean hassioaddons/zerotier-amd64 Docker application
19-04-02 21:01:45 ERROR (SyncWorker_0) [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")

Details of my system:

hassos 2.11
arch x86_64
python_version 3.7.2
HA version 0.90.1

Any ideas what is happening here?

Interesting @gerard33. I did test it on HassOS (live on stream today):

I’m going to update HassOS and see if that might be related.

I was on hassos 2.10 and got the error there as well. I then updated to 2.11 to see if that would fix anything, which apparently it didn’t :grin:

I am running hassos on Proxmox VM btw.

Edit: on my dev HA where Hassio runs on Ubuntu 18.04 the add-on is working fine :thinking:

@gerard33 Not sure if Proxmox is related and/or if the vmdk build os HassOS are different.

Strange, I’m getting the same error as @gerard33:

19-04-02 21:47:08 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")

Running HassOS 2.11 on VMware ESXi 6.5

arch x86_64
dev false
docker true
hassio true
os_name Linux
python_version 3.7.2
timezone America/Los_Angeles
version 0.90.2
virtualenv false

Add-on config:

{
  "network_id": "<redacted>",
  "port": 9993,
  "api_auth_token": ""
}

VM Specs:
2vCPU
4GB memory
64GB storage IDE
Boot EFI
NIC E1000E

You both use the same type of HassOS build, thanks! That is useful information.

:warning: I’ve now received 4 reports on the following error:

19-04-02 22:01:52 ERROR (SyncWorker_9) [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”)

This seem to be happing that run HassOS on a VM (like Proxmox or ESXi). I’m currently looking into what causes this issue. HassOS for other devices (e.g., Raspberry Pi) are working just fine. So this might be a HassOS issue.

:information_source: The above issue have been solved in HassOS v2.12

1 Like

How this addon compares to Nabu Casa Remote UI?

At first look it seems better cause it support addons and its free, but it received score 3 in Hass.io security rating, does it mean it less secure than Remote UI?

Thanks

So My Hass.io is running only accessible by IPv6. Does this mean from my IPv4 only mobile I could use zero-tier to connect?

That would be awesome! I need to investigate this but thanks for another great addon right on the heels of vscode!

probably we need to add --device=/dev/net/tun to docker to create the tun

So added the app on my iPad and vpn and it’s showing as well in zerotier account - both authorised… but if I put the ipaddress in my browser on mobile it won’t connect? Is this not how it’s supposed to work?

ZeroTier creates a VLAN with the connected machines. So look on your zerotier account page (scroll down to ‘members’) for the ip address of your hass.io addon (it will be different than the ip address of your lan at home) and type that into your ipad browser adding “:8123” while connected to the zerotier network

example: at home I use a standard 192.168.1.1/24 setup, but in my zerotier account page, all connected devices are getting 10...1 ip addresses

ZeroTier isn’t so much providing a VPN to your home as it is creating a little LAN on the internet that many devices can connect to and exist as if they were on the same LAN

1 Like

I was trying to connect to the right IP address… the zerotier one. adding :8123 didn’t help.

hmm… since you use an ipv6 address for hassio, did you put in the brackets?
http://[1fff:0:a88:85a3::ac1f]:8001/index.html

You mentioned your mobile is ipv4 only, with a bit of googling, I’m not sure it can connect directly to your ipv6-only HASS

You’ve probably already read some of this since you have an ipv6 server, but here’s a bit I found on connecting ipv4 to ipv6: https://stackoverflow.com/questions/16480729/connecting-ipv4-client-to-ipv6-server-connection-refused

I was using an IPv4 address…

Quite right… that is actually the exact problem I’d like to solve using this addon…

I will try IPv6 and see if it works…

EDIT: Tried IPv6 doesn’t work either

It doesn’t, Nabu Casa Remote is a forwarding service. ZeroTier One is a virtual networking tool.

It is not better, different. The Hass.io security rating is based on the things the add-on gets access to. The more access to hardware and or privileges, the rating drop. This add-on obviously needs to get access to the network stack and therefore it requires some privileges and hardware access. This does drop the rating but does not mean it is unsafe.

No that is not it, the tun device itself is missing from the kernel as it seems. I’m looking into HassOS to see if I can add support for it. Currently, only OVA based HassOS seems to be affected.

2 Likes

Thanks for the addon, was waiting a long to get the vpn to my home.
But
I can access from phone with zerotier client to my rpi with HA via local address (10.0.0.blah) but want to be able to access other devices on my LAN (10.0.0.x/24)
I tried adding a route to 10.0.0.x/24 via 172.something (the vpn address of my ha rpi) but no luck, tried to enable ethernet bridge (i think additional configuration should be done on addon/rpi side, anyway not sure regarding this one if i need it).

So, any though how I can access the rest of my LAN via Zerotier vpn connection?

Thanks!

1 Like

I would also want to know if this is possible with this add-on!

Thanks a ton for this addon, I was missing it on my RPi since I switched to hass.io from a plain pip install.

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