Open Terminal
and proceed with following instructions:
- (Optionally) Upgrade your system to latest packages including latest available kernel by running
apt-get full-upgrade
. After kernel upgrade reboot is required. - Ensure that you have source repositories configured for APT - run
vi /etc/apt/sources.list
and make sure that there is at least one line starting withdeb-src
is present and uncommented. - Install pre-requisites - run
sudo apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r)
. - Run
sudo add-apt-repository ppa:amnezia/ppa
. - Finally execute
sudo apt-get install -y amneziawg
.
Open Terminal
and do next steps:
- (Optionally) Upgrade your system to latest packages including latest available kernel by running
apt-get full-upgrade
. After kernel upgrade reboot is required. - Ensure that you have source repositories configured for APT - run
vi /etc/apt/sources.list
and make sure that there is at least one line starting withdeb-src
is present and uncommented. - Execute following commands:
sudo apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 57290828
echo "deb https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y amneziawg
Open Software Sources
and make sure that Source code repositories
(under Optional Sources
) are enabled.
Proceed to PPAs
section and add ppa:amnezia/ppa
PPA repository, after that save configuration and rebuild apt
cache.
After that, open Terminal
and run:
sudo apt-get install -y amneziawg
If you use release that doesn't have DKMS support out of the box, you may need to install EPEL first.
Open Terminal
and run:
sudo dnf copr enable amneziavpn/amneziawg
sudo dnf install amneziawg-dkms amneziawg-tools
Before installation it is strictly recommended to upgrade your system kernel to the latest available version and perform the reboot afterwards.
You may need to install kernel headers and/or build essentials packages before running following steps.
-
In Terminal:
git clone https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git cd amneziawg-linux-kernel-module/src
-
Now, if you run modern Linux with kernel version 5.6+, you need to download your kernel's source from anywhere possible and link resulting tree to
kernel
symlink:ln -s /path/to/kernel/source kernel
Please note to find and provide full kernel sourcetree, not only headers. If you run on legacy kernel (<5.6), you do not need to perform this step.
-
Now perform build and installation:
make sudo make install
Or on a capable system you may want to use DKMS for this:
sudo make dkms-install sudo dkms add -m amneziawg -v 1.0.0 sudo dkms build -m amneziawg -v 1.0.0 sudo dkms install -m amneziawg -v 1.0.0
Important
All parameters should be the same between Client and Server, except Jc - it can vary.
- Jc — 1 ≤ Jc ≤ 128; recommended range is from 3 to 10 inclusive
- Jmin — Jmin < Jmax; recommended value is 50
- Jmax — Jmin < Jmax ≤ 1280; recommended value is 1000
- S1 — S1 < 1280; S1 + 56 ≠ S2; recommended range is from 15 to 150 inclusive
- S2 — S2 < 1280; recommended range is from 15 to 150 inclusive
- H1/H2/H3/H4 — must be unique among each other; recommended range is from 5 to 2147483647 inclusive
Tip
Please check Ubuntu Server documentation for more troubleshooting steps.
To get more details, you can enable the dynamic debug feature for the module:
echo "module amneziawg +p" | sudo tee /sys/kernel/debug/dynamic_debug/control
This will log messages to dmesg, which can be watched live with:
dmesg -wT
Most installation instructions above assume that you have enough space in system's /tmp
partition (as setup script needs
to manipulate with kernel's sourcetree which is pretty huge).
If you can not afford enough space in your /tmp
, you may override temporary dir by setting AWG_TEMP_DIR
environment variable
before the installation:
export AWG_TEMP_DIR="/home/ubuntu/tmp"
This setting should persist for future and will not require repeating.
In some rare cases, setup script may not find your kernel's sourcetree automatically. You may find appropriate sources by yourself then and link them to DKMS module sources, e.g.
ln -s /path/to/your/kernel/sources /usr/src/amneziawg-1.0.0/kernel
Reinstall the package thereafter and you should get everything working.
Should you upgrade your kernel in the future, please remember that you may also need refresh sourcetree and update symlinks.
This project is released under the GPLv2.