GMC Server Operations Runbook¶
Overview¶
The GMC (Gateway Management Controller) server handles WireGuard connections from XE300 IoT gateways. It runs on VM 2912 in the UK homelab and is accessed via hub2's UDP relay.
Architecture¶
XE300 Gateway (Internet)
│
▼ UDP 39015
hub2 (51.68.235.106)
│
▼ socat relay (gmc-relay container)
WireGuard VPN (wg-uk)
│
▼
GMC Server (REDACTED_IP:39015)
VM 2912 on px1-silverstone
Quick Reference¶
| Component | Location | Value |
|---|---|---|
| Public endpoint | hub2 | 51.68.235.106:39015/udp |
| Relay container | hub2 | charliehub_gmc_relay |
| GMC server | px1 | VM 2912 (REDACTED_IP) |
| WireGuard interface | hub2 | wg-uk |
Verification Commands¶
On hub2¶
# Check relay is running
docker ps | grep gmc-relay
# Check relay logs
docker logs charliehub_gmc_relay
# Check port is listening
sudo ss -ulnp | grep 39015
# Check WireGuard connectivity
ping REDACTED_IP
# Watch incoming traffic
sudo tcpdump -i any udp port 39015 -c 10
On GMC Server (VM 2912)¶
# SSH to GMC server
ssh root@REDACTED_IP
# Check WireGuard service
sudo wg show
# Check GMC application status
systemctl status gmc # or equivalent
Common Operations¶
Restart the relay¶
cd /opt/charliehub && docker compose restart gmc-relay
Update GMC IP¶
If GMC server moves to a new IP:
# 1. Edit .env
nano /opt/charliehub/.env
# Update: GMC_IP=<new_ip>
# 2. Restart relay
cd /opt/charliehub && docker compose restart gmc-relay
# 3. Verify connectivity
ping <new_ip>
docker logs charliehub_gmc_relay
Troubleshooting¶
XE300 not connecting¶
-
Check relay is running:
docker ps | grep gmc-relay -
Check WireGuard connectivity:
ping REDACTED_IP sudo wg show wg-uk -
Check GMC service is listening:
nc -uvz REDACTED_IP 39015 -
Check UFW allows UDP 39015:
sudo ufw status | grep 39015
Relay not starting¶
# Check logs for errors
docker logs charliehub_gmc_relay
# Verify environment variables
grep GMC /opt/charliehub/.env
# Expected:
# GMC_IP=REDACTED_IP
# GMC_PORT=39015
WireGuard tunnel down¶
# Check WireGuard status
sudo wg show wg-uk
# If no recent handshake, check:
# 1. UCG is online
# 2. WireGuard config hasn't changed
# 3. Network connectivity to UK site
# Restart WireGuard
sudo systemctl restart systemd-networkd
Related Documentation¶
- GMC Service - Full GMC documentation
- WireGuard VPN - VPN configuration
- hub2 - Central hub services