# Install wireguard-go with Homebrew, apk, apt, MacPorts, Nix

Userspace Go implementation of WireGuard. Version 0.0.20250522 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:wireguard-go
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install wireguard-go
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install wireguard-go
```

  Evidence: MacPorts ports tree: net/wireguard-go/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add wireguard-go
```

  Evidence: Alpine Linux edge package indexes: wireguard-go from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install golang-golang.zx2c4-wireguard-dev
```

  Evidence: Debian stable package indexes: golang-golang.zx2c4-wireguard-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#wireguard-go
```

  Evidence: nixpkgs package indexes: pkgs/by-name/wi/wireguard-go/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:wireguard-go
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/wireguard-go>
- **Version:** 0.0.20250522
- **Source summary:** Userspace Go implementation of WireGuard
- **Homepage:** <https://www.wireguard.com/>
- **Repository:** <https://git.zx2c4.com/wireguard-go>
- **Upstream docs:** <https://git.zx2c4.com/wireguard-go/about>
- **License:** MIT
- **Source archive:** <https://git.zx2c4.com/wireguard-go/snapshot/wireguard-go-0.0.20250522.tar.xz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- wireguard-go (cli)
- wireguard-go (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.0.20250522
- Local data: ok
- Upstream repository: https://www.wireguard.com/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

wireguard-go is the official Go userspace implementation of WireGuard, the modern encrypted layer-3 VPN protocol created by Jason A. Donenfeld. It exists alongside the Linux kernel implementation and is most useful where a kernel driver is unavailable, undesirable, or less portable than a userspace tunnel process.

### Project history

WireGuard itself was designed as a small, auditable alternative to IPsec and OpenVPN, with a public technical paper describing it as a secure network tunnel implemented as a Linux kernel virtual network interface. The WireGuard project later organized several official implementation repositories, including the kernel implementation, cross-platform tools, and wireguard-go as a cross-platform userspace implementation maintained by Donenfeld.

The role of wireguard-go became clearer after WireGuard entered the Linux kernel line: Linux users are generally expected to use the kernel module for performance and integration, while wireguard-go remains the portable fallback for platforms and situations where a userspace TUN implementation is the practical route. Its README explicitly tells Linux users that the kernel module is faster and better integrated, which gives the package a deliberately narrow but important niche.

### Adoption history

WireGuard's wider adoption accelerated when it was merged for Linux 5.6 in 2020, turning the protocol from an out-of-tree module plus tools into a standard Linux networking feature. That made userspace implementations less central on modern Linux but more valuable as cross-platform compatibility pieces for macOS, BSD-derived systems, containers, embedded environments, and application stacks that need a WireGuard tunnel without depending on a kernel module.

In package-manager culture, wireguard-go is commonly installed with wireguard-tools or used by higher-level products that need an implementation of the WireGuard protocol in userspace. It is not the glamorous default path on current Linux, but it is the package that makes the same protocol available when the native interface is missing.

### How it is used

A typical invocation creates a WireGuard-style network interface by running a command such as `wireguard-go wg0`; the interface can then be configured with `wg(8)` plus ordinary platform networking tools. The upstream README describes it as creating the interface and then forking into the background, with a foreground mode available for supervision and logging.

The package is usually part of a larger WireGuard setup rather than a complete VPN product by itself. Users still need keys, peers, allowed IPs, routing, and address configuration, usually handled through `wg`, `wg-quick`, system network managers, or application-specific wrappers.

### Why package nerds care

For package maintainers, wireguard-go is the portability valve in the WireGuard ecosystem: small, official, and intentionally less preferred than the kernel implementation on Linux, but essential when kernels, operating systems, or sandboxed deployments cannot provide a native WireGuard device.

Its significance is mostly negative space: if the platform has first-class WireGuard support, users may never notice it; when it does not, this package is often the thing that lets the rest of the WireGuard tooling keep working.

### Timeline

- 2017: Donenfeld's WireGuard technical paper describes the design goals of a small, production-oriented secure network tunnel.
- 2019: The WireGuard project lists wireguard-go as the official cross-platform userspace implementation in Go.
- 2020: WireGuard is included in Linux 5.6, shifting mainstream Linux use toward the kernel driver while preserving wireguard-go for portability.
- 2026: The WireGuard repositories page still lists wireguard-go as a complete official implementation.

### Related projects

- wireguard-tools provides `wg` and `wg-quick`, the common command-line tools used to configure interfaces created by either the kernel implementation or wireguard-go.
- wireguard-linux and wireguard-linux-compat cover the kernel side of the same protocol, while other official repositories cover Android, BSD, Rust, and experimental implementations.

### Sources

- <https://github.com/WireGuard/wireguard-go>
- <https://kernelnewbies.org/Linux_5.6>
- <https://www.wireguard.com/>
- <https://www.wireguard.com/papers/wireguard.pdf>
- <https://www.wireguard.com/repositories/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** wireguard-go
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - golang-golang.zx2c4-wireguard-dev - 0.0.20231211-1: normalized package name match | Debian stable package indexes: golang-golang.zx2c4-wireguard-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Userspace implementation of WireGuard in Go (library) | https://git.zx2c4.com/wireguard-go/about/
- Debian apt - wireguard-go - 0.0.20231211-1+b9: normalized package name match | Debian stable package indexes: wireguard-go from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Userspace implementation of WireGuard in Go (program) | https://git.zx2c4.com/wireguard-go/about/
- Nix - wireguard-go: normalized package name match | nixpkgs package indexes: pkgs/by-name/wi/wireguard-go/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - golang-golang.zx2c4-wireguard-dev - 0.0.20230223-1: normalized package name match | Ubuntu 24.04 LTS package indexes: golang-golang.zx2c4-wireguard-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Userspace implementation of WireGuard in Go (library) | https://git.zx2c4.com/wireguard-go/about/
- Ubuntu apt - wireguard-go - 0.0.20230223-1: normalized package name match | Ubuntu 24.04 LTS package indexes: wireguard-go from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Userspace implementation of WireGuard in Go (program) | https://git.zx2c4.com/wireguard-go/about/
- apk - wireguard-go - 0.0.20250522-r9: normalized package name match | Alpine Linux edge package indexes: wireguard-go from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Next generation secure network tunnel: userspace implementation in go | https://www.wireguard.com
- apk - wireguard-go-doc - 0.0.20250522-r9: normalized package name match | Alpine Linux edge package indexes: wireguard-go-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Next generation secure network tunnel: userspace implementation in go (documentation) | https://www.wireguard.com
- MacPorts - wireguard-go: normalized package name match | MacPorts ports tree: net/wireguard-go/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [wireguard-tools](https://www.automicvault.com/pkg/brew/wireguard-tools/) - Popular package that depends on this formula.
- [wgcf](https://www.automicvault.com/pkg/brew/wgcf/) - Shares av.db curated category or tags: cli, networking, vpn, wireguard.
- [boringtun](https://www.automicvault.com/pkg/brew/boringtun/) - Shares av.db curated category or tags: cli, networking, vpn, wireguard.
- [headscale-cli](https://www.automicvault.com/pkg/brew/headscale-cli/) - Shares av.db curated category or tags: cli, networking, vpn, wireguard.
- [tailscale](https://www.automicvault.com/pkg/brew/tailscale/) - Shares av.db curated category or tags: cli, networking, vpn, wireguard.
- [dsvpn](https://www.automicvault.com/pkg/brew/dsvpn/) - Shares av.db curated category or tags: cli, networking, vpn.
- [edgevpn](https://www.automicvault.com/pkg/brew/edgevpn/) - Shares av.db curated category or tags: cli, networking, vpn.
- [fastd](https://www.automicvault.com/pkg/brew/fastd/) - Shares av.db curated category or tags: cli, networking, vpn.

## Combined YAML source

View the package source record on GitHub. [combined/wireguard-go.yml](https://github.com/automic-vault/db/blob/main/combined/wireguard-go.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
