wireguard-go implements the WireGuard protocol in Go, creating tun interfaces you configure with wg, ip, or ifconfig. Linux users are steered toward the faster kernel module when available.
Overview
wireguard-go userspace daemon creates a WireGuard network interface and can run in the background or in the foreground with -f. Removing the interface uses ip link del or, on systems without that, deleting the control socket under /var/run/wireguard to shut the process down. LOGLEVEL=debug increases logging when set in the environment.
On Linux the same codebase runs, but upstream documentation recommends the kernel module for performance and OS integration. macOS uses the utun driver with interface names like utun0 or auto-selected utun, optionally writing the chosen name to WGTUNNAMEFILE. Windows builds exist, while the fuller Windows application is noted as the preferred end-user packaging on that platform.
FreeBSD and OpenBSD ports are supported with platform-specific limitations such as missing sticky sockets and alternate fwmark mappings. OpenBSD and some macOS setups require explicit tun numbering or accept kernel-assigned names similar to macOS utun behavior.
Building from source requires a current Go toolchain install. Once the interface is up, standard WireGuard and IP administration tools apply for keys, peers, and routing.
Key features
- Userspace WireGuard protocol
- Background or foreground daemon
- Standard wg and ip configuration
- Linux, macOS, Windows support
- FreeBSD and OpenBSD ports
- utun and tun drivers
- Configurable debug logging
- Control socket lifecycle
Use cases
- WireGuard where no kernel module exists
- Embedded in desktop VPN apps
- Development and testing WireGuard setups
- macOS utun-based tunnels
- OpenBSD tun-based interfaces