Usage
Options
Name or ID of the machine to show configuration for. If not specified, shows configuration for the currently connected machine
Description
Thewg show command displays detailed WireGuard network information for a machine, including:
- Interface configuration (public key, listen port, addresses)
- Connected peers (other machines in the cluster)
- Peer connection details (endpoints, allowed IPs, handshake times, data transfer)
- Debugging network connectivity issues
- Verifying WireGuard tunnel status
- Monitoring data transfer between machines
- Checking peer handshake times
This command shows low-level WireGuard details. For general cluster status, use
uc machine ls instead.Examples
Show WireGuard config for current machine
Check specific machine
View WireGuard status on a specific machine:Monitor peer connectivity
Check when peers last communicated:Handshakes should occur at least every 2-3 minutes. If a peer shows “never” or a very old timestamp, there may be a connectivity issue.
Check data transfer
See how much data has been transferred between machines:Output Fields
Interface Section
- public key: Machine’s WireGuard public key (used by peers to connect)
- private key: Hidden for security
- listening port: UDP port for incoming WireGuard connections (default: 51820)
- addresses: IP addresses assigned to the WireGuard interface
Peer Sections (one per connected machine)
- public key: Peer’s WireGuard public key
- endpoint: Peer’s public IP:port where it’s reachable
- allowed ips: Subnets routed through this peer
- latest handshake: Time since last WireGuard handshake (connection check)
- transfer: Data sent/received through this tunnel
- persistent keepalive: Interval for NAT traversal keepalive packets
Troubleshooting Network Issues
Peer shows “never” for handshake
If a peer has never completed a handshake:- Check if machines can reach each other on UDP port 51820
- Verify firewall rules allow UDP/51820
- Check if endpoints are correct with
uc machine ls - Test connectivity:
nc -u PEER_IP 51820
Handshake time too old
If handshake is more than 3 minutes old:- Check network connectivity between machines
- Verify both machines are running (
uc machine ls) - Check for firewall changes
- Look for NAT/routing issues
No data transfer
If transfer shows 0 bytes despite services running:- Check if services are using the mesh network
- Verify container IP addresses with
uc ps - Test connectivity:
uc service exec SERVICE -- ping PEER_IP - Check DNS resolution:
uc service exec SERVICE -- nslookup service.internal
Endpoint shows wrong IP
If the endpoint doesn’t match the machine’s public IP:- Update machine’s public IP:
uc machine update NAME --public-ip NEW_IP - Check automatic IP detection
- Verify NAT/port forwarding configuration
Network Architecture
Each machine in an Uncloud cluster:- Has a unique subnet (e.g.,
10.210.X.0/24) - Gets its first IP in that subnet (e.g.,
10.210.X.1) - Connects to all other machines via WireGuard tunnels
- Routes traffic for peer subnets through appropriate tunnels
Security Notes
- Private keys are never displayed for security
- WireGuard uses modern cryptography (ChaCha20, Poly1305, Curve25519)
- All cluster traffic is encrypted through the mesh network
- Peers can only access allowed IP ranges
Related Commands
uc machine ls- List machines with connection statusuc ps- Show containers and their mesh IPsuc service exec- Test connectivity from containers
