From 9f1c660a4f814a1b642285dfaca58d954c2b7179 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Thu, 5 Jun 2025 15:28:01 +0200 Subject: [PATCH] zerotier: Add a usage example to the documentation --- clanServices/zerotier/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/clanServices/zerotier/README.md b/clanServices/zerotier/README.md index 99250387f..2b5f41ae4 100644 --- a/clanServices/zerotier/README.md +++ b/clanServices/zerotier/README.md @@ -1,3 +1,24 @@ +## Example Usage + +``` + inventory.instances = { + zerotier = { + module = { + name = "zerotier"; + input = "clan"; + }; + roles.peer.tags.all = { }; + roles.controller.machines.jon = { }; + roles.moon.machines.sara.settings.stableEndpoints = [ "77.52.165.46" ]; + }; +``` + +The input should be named according to your flake input. +All machines will be peers and connected to the zerotier network. +Jon is the controller machine, which will will accept other machines into the network. +Sara is a moon and sets the `stableEndpoint` setting with a publically reachable IP. + + ## Overview This guide explains how to set up and manage a [ZeroTier VPN](https://zerotier.com) for a clan network. Each VPN requires a single controller and can support multiple peers and optional moons for better connectivity.