Your own VPN server · WireGuard, Outline, AmneziaWG · 6 cities · Pay in BTC, USDT, USDC, ETH, SOL, LTC, XMR
Language: English
Get a VPN server

Device guide · Linux desktop or laptop

How do I use WireGuard on Linux?

The same tools as on the server, used the other way round: a client file in /etc/wireguard, wg-quick to bring it up, and systemd if it should start at boot.

Last updated: · 4 min read

Quick answer

How do I use WireGuard on Linux?

Here is how to use WireGuard on Linux: install the wireguard package, copy the laptop's client file from the TunnelVPS server to /etc/wireguard/wg0.conf, then run sudo wg-quick up wg0. Stop it with sudo wg-quick down wg0. To start it at every boot, enable wg-quick@wg0 with systemd. That is 5 steps.

In brief
  • Install: sudo apt install wireguard on Ubuntu, apt install wireguard as root on Debian.
  • File: /etc/wireguard/<name>.conf; the file name becomes the interface name.
  • Use: wg-quick up and wg-quick down, as root.
  • At boot: systemctl enable --now wg-quick@<name>.

What are the steps on a Linux laptop?

WireGuard client on Linux against a TunnelVPS server, 5 steps, from wireguard.com and wg-quick(8)
StepWhereWhat to do
1TunnelVPS serverAdd a [Peer] for the laptop and write its client file.
2Laptop terminalInstall the wireguard package with apt.
3Laptop terminalCopy the client file with scp into /etc/wireguard/wg0.conf.
4Laptop terminalRun sudo wg-quick up wg0, then sudo wg show.
5Laptop terminalOptional: sudo systemctl enable --now wg-quick@wg0 to start at boot.

Which package does a Linux client need?

The same wireguard package as the server, from the distribution's own repository. TunnelVPS read wireguard.com on 16 November 2026: Ubuntu uses sudo apt install wireguard, and Debian uses apt install wireguard as root. Other distributions are listed on the same page.

The package brings wg and wg-quick, the two tools behind how to use WireGuard on Linux. The tunnel itself runs in the Linux kernel. Outline and AmneziaVPN also have Linux apps, if a network blocks WireGuard.

Where does the client file go?

In /etc/wireguard/, named after the interface you want, such as wg0.conf. The wg-quick manual says it searches /etc/wireguard/INTERFACE.conf first when given a name. A file called london.conf gives an interface called london.

Copy the file from the server with scp, then tighten its permissions. It holds the laptop's private key. The add a device guide shows how the server side creates it.

Install, copy the file and bring the tunnel up
sudo apt install wireguard
scp [email protected]:/etc/wireguard/clients/laptop.conf /tmp/wg0.conf
sudo install -m 600 /tmp/wg0.conf /etc/wireguard/wg0.conf
rm /tmp/wg0.conf
sudo wg-quick up wg0
sudo wg show

How do you turn the tunnel on and off?

wg-quick up brings it up and wg-quick down takes it down, both as root. The manual lists four actions: up, down, save and strip. While up, wg show prints the latest handshake and the bytes sent and received.

To keep it on across reboots, enable the systemd unit wg-quick@wg0. Disable it again with systemctl disable --now wg-quick@wg0. That covers how to use WireGuard on Linux day to day.

Daily use and start at boot
sudo wg-quick down wg0
sudo wg-quick up wg0
sudo systemctl enable --now wg-quick@wg0
sudo systemctl disable --now wg-quick@wg0

What happens to DNS and routes on Linux?

wg-quick sets the DNS = resolver through resolvconf and adds routes for AllowedIPs. With 0.0.0.0/0 or ::/0, the manual says it uses policy routing rules to override the default route. If resolvconf is missing, the DNS = line fails; install a package that provides it.

The DNS leak guide shows how to confirm lookups go through the tunnel. To send only some traffic through, see the split tunneling guide.

Can one Linux laptop hold several tunnels?

Yes: one file per tunnel, each with its own interface name. For example ny.conf and frankfurt.conf for two TunnelVPS servers. Bring up one full tunnel at a time; two default routes conflict.

The device guides hub covers the other systems in the house. Every plan has the same price in all six cities, so a second server in another city costs the same as the first.

Linux client questions

Is there a graphical way to use WireGuard on Linux?

Some desktops can import WireGuard files into their network settings. The command line works the same on every distribution.

Does WireGuard on Linux need root?

Bringing an interface up or down needs root, so run wg-quick with sudo.

What is the best way to use WireGuard on Linux in 2026?

The distribution's wireguard package with wg-quick, and the systemd unit for a tunnel that should always be on.

How do I check the tunnel is working?

Run sudo wg show. A recent latest handshake and growing transfer counters mean it works.

Can the Linux laptop also use Outline or AmneziaWG?

Yes. Outline and AmneziaVPN both publish Linux apps that connect to the same TunnelVPS server.

Verdict
  • wg-quick up and down are all most Linux users need day to day.
  • The systemd unit keeps an always-on tunnel across reboots.
Sources (4)
  1. WireGuard: Installation — WireGuard (read 2026-11-16)
  2. wg-quick(8) manual page — man7.org (read 2026-11-16)
  3. wg(8) manual page — man7.org (read 2026-11-16)
  4. Outline: get started — Outline Foundation (read 2026-11-16)

Get the server first

Home covers every laptop and phone in a household, at $6.37 a month on 12 months.

From $2.25/mo on 12 months · no KYC

Get a server