Step by step
How to set up an open-source WireGuard client on Linux
Yes, on Linux you can connect WireGuard without a proprietary app. You need an open-source client from the official source of your distribution and a configuration file from the provider. There are no universal commands: installation and import depend on the distribution and the client, so take the exact steps from the official documentation of the client. You will need a computer with Linux, administrator rights and a configuration file.
4 minutesRevised Published by Private Payments & Privacy Features
Where do I get a WireGuard configuration for Linux?
| Scenario | Protocol | Service | Where the configuration is | What is stated for Linux |
|---|---|---|---|---|
| Manual connection on Linux | WireGuard | CitadelVPN | configurations in MAX | manual configuration, without an app |
| Manual connection with another protocol | OpenVPN | CitadelVPN | configurations in MAX | manual configuration, without an app |
OpenVPN here is a separate option. It is not needed to set up WireGuard.
What should you decide before installing a client?
- Determine your distribution and its version: the package name and the installation method depend on them.
- Choose an open-source client and find its official repository and licence file.
- Install the package from the official repository of the distribution or the project.
- Obtain a configuration from the provider.
A WireGuard file contains a private key. Do not send it in messaging apps and do not publish it in public repositories.
In what order should installation and connection happen?
Below is a model sequence. This is a general order of actions, not a verified procedure. Take commands and paths from the documentation of the chosen client.
- Install the client from the official source.
- Place the configuration in the directory specified in the documentation and restrict access to the file for other users.
- Bring up the tunnel using the client.
- Disconnect the tunnel with the same client and check that the interface has disappeared.
How do I check that the tunnel works?
| What we check | How | Expected result | If not |
|---|---|---|---|
| Handshake with the peer | interface status in the client | handshake time updates | wrong keys or server address, UDP blocked |
| Data transfer | traffic counters of the interface | both receive and send grow | only sending grows: the server does not respond |
| Routes | routing table | full tunnel: default route through WireGuard; split tunnel: only networks from AllowedIPs | an error in AllowedIPs |
| External IP | IP-check website | VPN server address (with a full tunnel) | traffic bypasses the tunnel |
| DNS | DNS leak test | servers from the configuration | requests go to your connectivity provider |
| IPv6 | IPv6 test | IPv6 goes into the tunnel or is disabled | an IPv6 leak |
Check separately what happens when the connection drops. Manual configuration by itself does not block traffic when the tunnel drops. Blocking is set up in the client or with firewall rules according to the documentation.
Check how open the client is: find the official repository, the licence and the source of the package. For comparison, you can look at how another platform does this. It is an Android client for OpenVPN, not WireGuard for Linux: it has a repository on GitHub and a card on F-Droid with the GNU GPL v2.0 only licence. A security policy file in the repository does not mean the project has passed an audit. How to read the reports themselves is covered in the article about a summary of a VPN audit report.
If it does not work
- No handshake. Compare the server address and port and the keys in the configuration. Then try a different network: the current one may be blocking UDP.
- There is a handshake, but websites do not open. Check DNS and AllowedIPs.
- The client does not accept the file. Download the configuration again: when copying via the clipboard into a file, extra characters may have got in.
- WireGuard is blocked in hotel or office Wi-Fi. You need a protocol with masking. For “difficult networks”, CitadelVPN offers VLESS and Hysteria2; for VLESS, a subscription link and keys are issued. You will need a client that supports these protocols.
Checklist
- Find out the version of your distribution and choose an open-source client with an official repository.
- Obtain a WireGuard configuration (at CitadelVPN this is the MAX plan) and keep it as a secret.
- Connect according to the client's documentation.
- Check the handshake, routes, IP, DNS and IPv6.
- Separately check what happens when the tunnel drops.
Frequently asked questions
Does the OpenVPN instruction for Android work for WireGuard on Linux?
No. It is a different platform and a different protocol. Profile imports and Android permissions do not carry over to Linux.
What else can be connected manually besides WireGuard?
CitadelVPN lists OpenVPN configurations in MAX, plus a VLESS subscription link and keys. On routers in MAX, WireGuard, OpenVPN and VLESS are available.