These scripts are automatically configured for wg0 on network unsaved.
Ensure WireGuard tools are installed on your server, then create a dedicated folder to store your keys and configuration.
Generate your WireGuard keypair. Do not share your private key.
These files define how the agent behaves and connects to the network. They are identical for every node in your network. You can safely automate deploying these files to all your servers.
This command will generate the following files in your current directory:
wgcp.env: Stores your Network ID and Control Plane URL.sync.sh: The core logic that applies WireGuard changes without dropping active connections.agent-stream.sh: The background agent that listens for real-time updates.download_config.sh: An optional helper to manually fetch the latest configuration.Run the streaming agent. It connects to the Control Plane, applies your initial configuration, and stays connected to apply live updates instantly.
Tip: Use tmux or setup a systemd service to keep this running in the background.
If you don't want a background process, or are using a non-Linux client, you can use the generated configuration directly.
Useful commands to manage your local WireGuard interface and run the agent in the background.
View active peers, endpoints, and data transfer.
Disconnect from or manually reconnect to the network.
To keep the streaming agent running permanently, create a service file at /etc/systemd/system/wgcp-agent.service:
Service Commands:
sudo systemctl enable --now wgcp-agentsudo systemctl status wgcp-agentsudo systemctl restart wgcp-agentsudo journalctl -u wgcp-agent -fsudo systemctl disable --now wgcp-agentThe WG-CP agent can automatically manage a local CoreDNS instance. This provides seamless name resolution (e.g., server-01.vpn) for all nodes on the network without interfering with your host's primary DNS.
Simply add host_dns: true to a node in your YAML configuration. The streaming agent will automatically download CoreDNS and start serving records.
If you prefer not to run a DNS server, you can manually download a /etc/hosts compatible file.