Installing the AmneziaWG Kernel Module
Overview
If you are not sure which Linux version you use, what kernel headers are, or why you need to add a third-party APT repository, do not use this guide.
For regular VPN connection setup, use the AmneziaVPN app or the AmneziaWG app and the guide for your operating system.
The AmneziaWG kernel module is needed to run AmneziaWG on Linux through a system kernel module. This guide is for Ubuntu and Debian. Before installation, we recommend updating your system to the latest available packages. If the update installs a new kernel, reboot the device before installing AmneziaWG.
Installation on Ubuntu
- Update the package list and install the required dependencies:
sudo apt update && sudo apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r)
- Add the Amnezia PPA repository:
sudo add-apt-repository ppa:amnezia/ppa
- Check that the
amneziawgpackage is available for installation:
apt-cache policy amneziawg
If the output contains a Candidate line with a package version, you can continue the installation.
If the Candidate line shows (none), run sudo apt update and repeat the check.
- Install AmneziaWG:
sudo apt install -y amneziawg
- Check that the AmneziaWG kernel module is installed for the current kernel version:
modinfo amneziawg
If the command shows module information, including filename and version, the installation is complete.
If you see the Module amneziawg not found error, the module is not installed or was not built for the current kernel version.
Installation on Debian
- Update the package list and install the required dependencies:
sudo apt update && sudo apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r) curl
- Add the Amnezia repository key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 57290828
- Add the AmneziaWG repository:
echo "deb https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/amneziawg.list
- Add the source repository:
echo "deb-src https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list.d/amneziawg.list
- Update the package list:
sudo apt update
- Check that the
amneziawgpackage is available for installation:
apt-cache policy amneziawg
If the output contains a Candidate line with a package version, you can continue the installation.
If the Candidate line shows (none), run sudo apt update and repeat the check.
- Install AmneziaWG:
sudo apt install -y amneziawg
- Check that the AmneziaWG kernel module is installed for the current kernel version:
modinfo amneziawg
If the command shows module information, including filename and version, the installation is complete.
If you see the Module amneziawg not found error, the module is not installed or was not built for the current kernel version.
Additional Information
For AmneziaWG kernel module configuration details, see the official repository: amnezia-vpn/amneziawg-linux-kernel-module.