Wireguard-Go userspace implementation is not the recommended way to use Wireguard, but sometimes we need to deal with what we have. The recommended way is to upgrade to a newer kernel version and use the classic kernel module.
Let's see how to run Wireguard if you need to deal with a server with an old kernel version (I tried on Debian 7, Kernel 3.2.).
Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go. For example:
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
Download and build Wireguard-Go:
$ git clone https://git.zx2c4.com/wireguard-go
$ cd wireguard-go
$ make
$ sudo cp wireguard-go /usr/bin/
$ wireguard-go -f wg0
It works? Good.
We need to manually compile Wireguard tools:
$ apt-get install autoconf automake build-essential libmnl-dev
$ git clone https://git.zx2c4.com/WireGuard
$ cd WireGuard/src/tools/
$ make
$ sudo make install
$ cat /etc/wireguard/wg0.conf
[Interface]
Address = 192.168.10.1/24
ListenPort = 51820
PrivateKey =
[Peer]
PublicKey =
AllowedIPs = 192.168.10.2/32
$ sudo wg-quick up wg0
Done.