Linux
WireGuard WireGuard Nov 21, 2024

How to install WireGuard on Linux

  1. Use terminal/console to install WireGuard:
sudo apt update && sudo apt install openresolv wireguard
  1. Choose the preferred location and select generate a new key.

  2. Download configuration file and copy/move it to /etc/wireguard.

  3. Set correct permissions:

sudo chown root:root -R /etc/wireguard && sudo chmod 600 -R /etc/wireguard
  1. Turn on WireGuard. For example we will use xeovo-lv:
wg-quick up xeovo-lv
  1. Turn off WireGuard:
wg-quick down xeovo-lv
  1. Start WireGuard automatically on boot (optional):
systemctl enable wg-quick@xeovo-lv

Don't connect to one key from multiple devices at the same time. The connection will be unstable and result in packet loss. Generate a key for every device that you will use.