Skip to content

Commit 51fa1dc

Browse files
committed
20220811 ZeroTier - old-menu branch - PR 2 of 2
Adds first cut of ZeroTier in the form of two containers: * ZeroTier-client from `zyclonite:zerotier` * ZeroTier-router from `zyclonite:zerotier-router` The two containers are mutually exclusive (no menu check - docker-compose will complain about port conflicts). My guess is that IOTstack users will generally prefer the router because it is closer to WireGuard functionality, and is likely what an IOTstack user will be looking for if they find themselves stuck behind CGNAT. ZeroTier-client is the standard client. Has no environment variables or other preconfiguration. Needs to be instructed to join the user's ZeroTier network after first launch. Otherwise works "as is". ZeroTier-router is built on top of ZeroTier-client and adds management of iptables rules at startup/shutdown to support routing to/from the local network. Has environment variables with defaults appropriate for IOTstack. Adds documentation stub pointing to master branch wiki. Signed-off-by: Phill Kelley <[email protected]>
1 parent 255500d commit 51fa1dc

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
zerotier-client:
2+
image: zyclonite/zerotier
3+
container_name: zerotier
4+
devices:
5+
- /dev/net/tun
6+
network_mode: host
7+
volumes:
8+
- /var/lib/zerotier-one:/var/lib/zerotier-one
9+
cap_add:
10+
- NET_ADMIN
11+
- SYS_ADMIN
12+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
zerotier-router:
2+
image: zyclonite/zerotier:router
3+
container_name: zerotier
4+
devices:
5+
- /dev/net/tun
6+
network_mode: host
7+
volumes:
8+
- /var/lib/zerotier-one:/var/lib/zerotier-one
9+
cap_add:
10+
- NET_ADMIN
11+
- SYS_ADMIN
12+
- NET_RAW
13+
restart: unless-stopped
14+
environment:
15+
- TZ=Etc/UTC
16+
- ZEROTIER_ONE_LOCAL_PHYS=eth0
17+
# - ZEROTIER_ONE_NETWORK_IDS=yourNetworkID
18+
- ZEROTIER_ONE_USE_IPTABLES_NFT=true
19+
- ZEROTIER_ONE_GATEWAY_MODE=both
20+
- PUID=1000
21+
- PGID=1000
22+

docs/Containers/ZeroTier.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ZeroTier
2+
3+
This is the old-menu branch documentation. Please refer to [this page of the IOTstack Wiki](https://sensorsiot.github.io/IOTstack/Containers/ZeroTier/).

menu.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ declare -A cont_array=(
5959
[dozzle]="Dozzle"
6060
[octoprint]="OctoPrint"
6161
[wireguard]="Wireguard"
62+
[zerotier-client]="ZeroTier-client"
63+
[zerotier-router]="ZeroTier-router"
6264
[heimdall]="Heimdall Application Dashboard"
6365
[dashmachine]="DashMachine"
6466
[homer]="Homer"
@@ -105,6 +107,8 @@ declare -a keylist=(
105107
"dozzle"
106108
"octoprint"
107109
"wireguard"
110+
"zerotier-client"
111+
"zerotier-router"
108112
"heimdall"
109113
"dashmachine"
110114
"homer"

0 commit comments

Comments
 (0)