Install WireGuard on Raspberry Pi Raspbian

Raspberry Pi Logo

Install WireGuard on Raspbian Buster

Install

Soon it will be as easy as

sudo apt install wireguard

Until then here is how it can be done.

sudo apt update
sudo apt upgrade
sudo apt install raspberrypi-kernel-headers

After this operation, 163 MB of additional disk space will be used.

echo "deb http://deb.debian.org/debian/ unstable main" | sudo tee --append /etc/apt/sources.list.d/unstable.list

deb http://deb.debian.org/debian/ unstable main

sudo apt install dirmngr

Reading package lists… Done
Building dependency tree
Reading state information… Done
dirmngr is already the newest version (2.2.12-1+rpi1+deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

wget -O - https://ftp-master.debian.org/keys/archive-key-$(lsb_release -sr).asc | sudo apt-key add -

HTTP request sent, awaiting response… 200 OK
Length: 11093 (11K) [text/plain]
Saving to: ‘STDOUT’

printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' | sudo tee --append /etc/apt/preferences.d/limit-unstable

Package: *
Pin: release a=unstable
Pin-Priority: 150

sudo apt update

Reading package lists… Done
Building dependency tree
Reading state information… Done
All packages are up to date.

sudo apt install wireguard -y

The following additional packages will be installed:
dkms wireguard-dkms wireguard-tools
Suggested packages:
python3-apport menu
The following NEW packages will be installed:
dkms wireguard wireguard-dkms wireguard-tools
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 412 kB of archives.
After this operation, 2,336 kB of additional disk space will be used.
Do you want to continue? [Y/n]

sudo reboot

Make WireGuard Auto Start Automatically

sudo systemctl enable wg-quick@wg0

Generating Keys

Please refer to WireGuard Essentials

, ,