This directory contains powerful scripts for installing, configuring, and managing ZeroTier networks with enterprise-grade features.
Robust ZeroTier installer with multi-distribution support
Usage:
# Basic installation
./zerotier-install.sh
# Install and auto-join network
./zerotier-install.sh -n a1b2c3d4e5f6a7b8
# Dry-run to preview changes
./zerotier-install.sh --dry-run
# Verbose mode with logging
./zerotier-install.sh -v -l /var/log/zerotier-install.log
Advanced network configuration for gateway/router deployments
Usage:
# Interactive configuration
./zerotier-conf.sh
# Configure with specific parameters
./zerotier-conf.sh -n a1b2c3d4e5f6a7b8 -p eth0 -s 192.168.1.0/24
# Use configuration file
./zerotier-conf.sh -c ../examples/gateway.conf
# Enable IPv6 forwarding
./zerotier-conf.sh -n a1b2c3d4e5f6a7b8 --ipv6
# Dry-run mode
./zerotier-conf.sh -n a1b2c3d4e5f6a7b8 --dry-run
Comprehensive diagnostic tool for troubleshooting
Usage:
# Quick diagnostics
./zerotier-diagnostics.sh
# Full diagnostic report
./zerotier-diagnostics.sh --full
# Diagnose specific network
./zerotier-diagnostics.sh -n a1b2c3d4e5f6a7b8
# Test connectivity to peer
./zerotier-diagnostics.sh -p 172.27.0.5
# Save report to file
./zerotier-diagnostics.sh --full -o /tmp/zt-report.txt
Network health monitoring with alerting
Usage:
# Continuous monitoring (60s interval)
./zerotier-monitor.sh
# Monitor with 30-second interval
./zerotier-monitor.sh -i 30
# One-shot health check
./zerotier-monitor.sh --once
# Monitor specific network with logging
./zerotier-monitor.sh -n a1b2c3d4e5f6a7b8 -l /var/log/zt-monitor.log
# Enable webhook alerts
./zerotier-monitor.sh --alert-webhook https://hooks.example.com/zerotier
Advanced topology manager for complex deployments
Usage:
# Validate topology configuration
./zerotier-topology.sh -c ../examples/hub-spoke-topology.conf validate
# Deploy hub-and-spoke topology
./zerotier-topology.sh -c ../examples/hub-spoke-topology.conf deploy
# Check topology status
./zerotier-topology.sh -c ../examples/hub-spoke-topology.conf status
# Dry-run deployment
./zerotier-topology.sh -c ../examples/mesh-topology.conf -d deploy
# Cleanup topology
./zerotier-topology.sh -c ../examples/hub-spoke-topology.conf cleanup
./zerotier-install.sh
./zerotier-conf.sh -n YOUR_NETWORK_ID -p eth0 -s 192.168.1.0/24
Authorize the node at https://my.zerotier.com
192.168.1.0/24<node's ZeroTier IP>./zerotier-diagnostics.sh --full
cp ../examples/hub-spoke-topology.conf my-topology.conf
# Edit my-topology.conf with your network IDs
./zerotier-topology.sh -c my-topology.conf validate
./zerotier-topology.sh -c my-topology.conf deploy
./zerotier-monitor.sh --once
./zerotier-diagnostics.sh --full -o /tmp/diagnostics.txt
./zerotier-diagnostics.sh -n YOUR_NETWORK_ID -v
./zerotier-diagnostics.sh -p PEER_IP_ADDRESS
./zerotier-monitor.sh -i 30 -l /var/log/zt-monitor.log
All scripts support configuration files for repeatable deployments. See ../examples/ for templates.
Test changes without applying them:
./zerotier-conf.sh --dry-run -n YOUR_NETWORK_ID
./zerotier-topology.sh -d -c topology.conf deploy
zerotier-conf.sh automatically backs up configurations to /var/backup/zerotier-conf-TIMESTAMP/
All scripts automatically detect and work with:
Enable IPv6 forwarding:
./zerotier-conf.sh -n YOUR_NETWORK_ID --ipv6
Most scripts support logging:
./zerotier-install.sh -l /var/log/zerotier-install.log
./zerotier-monitor.sh -l /var/log/zerotier-monitor.log
Set up monitoring with alerts:
# Email alerts
./zerotier-monitor.sh --alert-email admin@example.com
# Webhook alerts (Slack, Discord, etc.)
./zerotier-monitor.sh --alert-webhook https://hooks.slack.com/services/YOUR/WEBHOOK/URL
curl and gpg for installation (auto-installed if missing)# Make sure scripts are executable
chmod +x zerotier-*.sh
# Check syntax
bash -n zerotier-install.sh
# Run with sudo
sudo ./zerotier-conf.sh -n YOUR_NETWORK_ID
# Run diagnostics
./zerotier-diagnostics.sh --full
# Check if authorized
sudo zerotier-cli listnetworks
# Status should be "OK"
# Check firewall status
./zerotier-diagnostics.sh -v
# Reconfigure with correct interface
./zerotier-conf.sh -n YOUR_NETWORK_ID -p CORRECT_INTERFACE
/var/backup/zerotier-conf-*)zerotier-monitor.shFound a bug or have a feature request? Please open an issue on the GitHub repository.
See the LICENSE file for details.