Skip to content

tunnet enroll

Register this machine with a Tunnet control plane.

Usage

bash
sudo tunnet enroll --control-url <URL> --token <TOKEN>
sudo tunnet enroll --control-url <URL> --org <SLUG>

Options

OptionEnvDescription
--control-urlCONTROL_PLANE_URLControl plane URL (required)
--tokenTUNNET_ENROLL_TOKENOne-time enrollment token
--orgTUNNET_ORG_SLUGOrganization slug (quick enroll, requires approval)
--networkTUNNET_NETWORKNetwork ID or name (defaults to "default")
--hostnameTUNNET_HOSTNAMEHostname for this machine
--wait-secs-Quick enroll approval timeout (default: 600)

Token enrollment

With --token, the machine is immediately admitted to the network:

bash
sudo tunnet enroll \
  --control-url http://control:8080 \
  --token eyJ...

Quick enrollment

With --org, the machine enters a pending state and waits for admin approval:

bash
sudo tunnet enroll \
  --control-url http://control:8080 \
  --org my-company \
  --wait-secs 300

Notes

Enrollment only needs to happen once per machine. After enrollment, run tunnet run to start the agent. If the machine is already enrolled, the command will error. Use tunnet reset --yes to wipe state before re-enrolling.

Released under the AGPL-3.0 License.