# ZeroTier and Syncthing

**URL:** https://forum.syncthing.net/t/zerotier-and-syncthing/13283
**Category:** Support
**Created:** [May 19, 2019, 10:30am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283 "2019-05-19T10:30:36Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![taohansen](https://forum.syncthing.net/user_avatar/forum.syncthing.net/taohansen/32/5822_2.png) [@taohansen](https://forum.syncthing.net/u/taohansen)
#### Post date: [May 19, 2019, 10:30am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/1 "2019-05-19T10:30:36Z")

</div>

So ZeroTier calls itself a, “smart programmable Ethernet switch for planet _Earth_” turning my far-flung machines into a giant virtual local network.

Syncthing doesn’t seem to automatically take advantage of this enhanced connectivity. There are no ports to open since all machines on the network treat each other as local but I can see all of my data transfer activity is going over relays and connectivity is intermittent.

Given all machines on this network are assigned from in the 10.147.20.0/24 range, how do I tell Syncthing to route over this net?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 19, 2019, 10:39am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/2 "2019-05-19T10:39:52Z")

</div>

You can configure device IPs manually, or tell the ethernet hippies of planet earth to add support for broadcasts/multicasts, as that is what is used for local discovery.

---

<div class="post-metadata">

### Author: ![taohansen](https://forum.syncthing.net/user_avatar/forum.syncthing.net/taohansen/32/5822_2.png) [@taohansen](https://forum.syncthing.net/u/taohansen)
#### Post date: [May 19, 2019, 11:05am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/3 "2019-05-19T11:05:02Z")

</div>

So just to clarify: I would add each individual device IP at 10.147.20.\* I expect to sync with to every other device’s Global Discovery Servers?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 19, 2019, 11:05am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/4 "2019-05-19T11:05:56Z")

</div>

No, you have to setup explicit IPs, because the network prevents local discovery.

---

<div class="post-metadata">

### Author: ![taohansen](https://forum.syncthing.net/user_avatar/forum.syncthing.net/taohansen/32/5822_2.png) [@taohansen](https://forum.syncthing.net/u/taohansen)
#### Post date: [May 19, 2019, 11:07am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/5 "2019-05-19T11:07:31Z")

</div>

Pardon the ignorance but how would I do this?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 19, 2019, 11:09am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/6 "2019-05-19T11:09:49Z")

</div>

You specify `tcp://[ip address of the remote device]` in the address configuration for that remote device.

How you assign devices static addresses in your magical network, I have no idea.

---

<div class="post-metadata">

### Author: ![taohansen](https://forum.syncthing.net/user_avatar/forum.syncthing.net/taohansen/32/5822_2.png) [@taohansen](https://forum.syncthing.net/u/taohansen)
#### Post date: [May 19, 2019, 11:11am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/7 "2019-05-19T11:11:24Z")

</div>

Gotcha. May I use the `udp://` prefix?

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [May 19, 2019, 11:12am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/8 "2019-05-19T11:12:24Z")

</div>

Syncthing does not use/support udp

---

<div class="post-metadata">

### Author: ![taohansen](https://forum.syncthing.net/user_avatar/forum.syncthing.net/taohansen/32/5822_2.png) [@taohansen](https://forum.syncthing.net/u/taohansen)
#### Post date: [May 19, 2019, 12:31pm UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/9 "2019-05-19T12:31:20Z")

</div>

Thank you. Adding in the static addresses manually seems to have solved my intermittent connectivity issues. All devices show as solidly connected now.

---

<div class="post-metadata">

### Author: ![Nummer378](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nummer378/32/5958_2.png) [@Nummer378](https://forum.syncthing.net/u/Nummer378)
#### Post date: [May 19, 2019, 9:54pm UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/10 "2019-05-19T21:54:08Z")

</div>

As a network guy, I’ve experience with both ZeroTier and Syncthing, altough I haven’t really used them together so far.

First, I need to clarify a few things: ZeroTier is a full virtual network (similar to a VPN) which DOES support multicasts & broadcast (pure Ethernet & IPv4 & IPv6 & everything else).

BUT: Multicasts and broadcasts on **Windows** are horribly broken and only use the interface with the lowest metric available (e.g your physical network cable). On Linux, things _should_ work fine, but since you’re describing issues I presume you’re using Windows on at least one machine?

Setting static addresses is fine, since ZeroTier does not have any dynamic stuff like DHCP built-in (yet) and all addresses are static by default. But in case you do want to get multicasts/broadcasts working on Windows, I’ve contributed to [ZeroTier’s wiki](https://zerotier.atlassian.net/wiki/spaces/SD/pages/7536695/Problems+With+LAN+Game+Announcements+and+Broadcasts+on+Windows) with possible workarounds. Again, note that this is purely an issue with Windows being a broken operating system and is not caused by either ZeroTier or syncthing.

---

<div class="post-metadata">

### Author: ![taohansen](https://forum.syncthing.net/user_avatar/forum.syncthing.net/taohansen/32/5822_2.png) [@taohansen](https://forum.syncthing.net/u/taohansen)
#### Post date: [May 19, 2019, 10:42pm UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/11 "2019-05-19T22:42:06Z")

</div>

I was hoping someone with greater knowledge in this domain would step in. Thank you!

Unfortunately, the answer isn’t so easy as all my devices are running Linux (laptop runs NixOS, server runs Synology’s DSM), Android (one phone on Pie, one tablet running FireOS 5) or iOS (one iPhone SE). The iOS device I just switched over and haven’t tested so all devices I have had issues with are running a Linux kernel.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [May 20, 2019, 6:05am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/12 "2019-05-20T06:05:16Z")

</div>

Barring specific weirdness, the _usual_ issue preventing local discovery is the default local firewall.

---

<div class="post-metadata">

### Author: ![Nummer378](https://forum.syncthing.net/user_avatar/forum.syncthing.net/nummer378/32/5958_2.png) [@Nummer378](https://forum.syncthing.net/u/Nummer378)
#### Post date: [May 20, 2019, 10:32am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/13 "2019-05-20T10:32:09Z")

</div>

Okay that’s unusual. I automatically assumed Windows because “broadcast not working when using multiple interfaces” is like one of my top 10 network issues on Windows.

In general, the network implementation on \*Nix systems is more sane and handles multiple interfaces more cleanly compared to Windows, so in theory it should work.

As for your issue: You can just set up static addresses for all devices and forget about it. That’s an absolutely acceptable solution, since ZeroTier networks in general maintain their assigned IP addresses. Only if you plan to add/remove devices often, or have a dynamic ZeroTier-enviroment you should prefer an automatic configuration.

If you still want to debug this further, I have a few ideas:

1. I assume you run your own ZeroTier network and have access to the network controller (for most people this is the web gui)? If so, re-check your configuration - are broadcasts enabled on the controller, any custom rules on the controller?

2. As calmh said: Any local firewalls?

3. What’s the listen address for your syncthing instances? Have you tried binding them to your ZeroTier addresses (set listen addresses to the ZT-IP’s)?

4. You could check - for example using WireShark - if your machines are actually sending the local discovery packets on (any) interface. You’re searching for UDP packets send to IP 255.255.255.255 (global broadcast) port 21027 (ignore IPv6 for the moment). The broadcast address could differ depending on your listen address configuration, I haven’t checked this. Those packets should be send over a tunX (e.g tun0) interface, which belongs to ZeroTier. In case they’re being sent over a different interface, it’s likely a misconfiguration. If they’re not being send at all, it’s likely a firewall issue. If they’re being send correctly, it might be an issue with the receiving side.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [June 19, 2019, 10:32am UTC](https://forum.syncthing.net/t/zerotier-and-syncthing/13283/14 "2019-06-19T10:32:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
