How it works
The primary server is where you manage everything: instances, peers, firewall, DNS and App Gateway applications. Worker nodes run a lightweight agent that connects to the primary server, receives the configuration and applies it locally. Workers have no admin panel and no database of their own: a new node is ready in a few minutes.
The agent authenticates with its token and calls the primary server over HTTPS. Workers only make outbound connections.
WireGuard, firewall, DNS and App Gateway settings are sent as separate sections. Only what changed is applied again.
Each worker reports its WireGuard status, peer traffic, services and certificates back to the primary server.
The peer list shows on which server each peer is connected, across the whole cluster.
Cluster modes
Primary server as a manager only
In mirror mode, WireGuard can be disabled on the primary server. It stops its WireGuard interfaces, is no longer offered as a server for peers and only publishes the WireGuard WebAdmin panel, while the workers keep serving every peer.
Before turning it off, make sure you can reach the panel without the VPN of the primary server.
App Gateway on worker nodes
Workers installed with the App Gateway also publish your Zero Trust applications. Each application chooses where it is served: on the primary server, on all workers or on selected workers.
Certificates are issued by the primary server and distributed to the workers, so applications published by workers must use DNS validation or self-signed certificates.
Adding a worker
In the cluster settings of the primary server, enable the cluster and choose the mode. The cluster uses the WireGuard status cache, which is enabled by default.
Add a worker with a name and the hostname clients use to reach it: it becomes the endpoint of the peer configurations downloaded for this server. The worker page shows its token and the installation commands.
mkdir wireguard_webadmin_node && cd wireguard_webadmin_node
wget -O docker-compose.yml \
https://raw.githubusercontent.com/eduardogsilva/wireguard_webadmin/main/cluster_node.yml
mkdir wireguard_webadmin_node && cd wireguard_webadmin_node
wget -O docker-compose.yml \
https://raw.githubusercontent.com/eduardogsilva/wireguard_webadmin/main/cluster_node-gateway.yml
MASTER_SERVER_ADDRESS=https://vpn.example.com
TOKEN=token-shown-on-the-worker-page
TIMEZONE=America/Sao_Paulo
docker compose up -d
Network requirements
- Workers must reach the primary server over HTTPS. If the App Gateway protects the panel of the primary server, add a route for
/api/cluster/with a public policy. - Publish the WireGuard ports (
51820-51839/udp) on each worker and, with the App Gateway, ports80and443.
Updating a worker
Run docker compose pull followed by docker compose up -d. To switch between VPN only and VPN and App Gateway, download the other compose file to the same directory and run docker compose up -d --remove-orphans. The worker data is kept.
Monitoring and automation
The worker page shows when the worker was last seen, its agent version, the synchronization state of each section, its services and its certificates.
- Disable a worker and it shuts down its WireGuard interfaces until it is enabled again.
- IP lock only accepts the worker from a fixed IP address.
- API v2 lets external tools enable and disable workers and WireGuard on the primary server. The API key needs the cluster management permission.
Still one stack. The cluster is optional: a single server keeps working exactly as before, and workers can be added at any time.