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

⚡ Warning
Do not connect to the same key from multiple devices at once. This causes unstable connections and packet loss. Always generate a unique key for each device you plan to use.