Private Payments & Privacy Features
Browse

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?

ScenarioProtocolServiceWhere the configuration isWhat is stated for Linux
Manual connection on LinuxWireGuardCitadelVPNconfigurations in MAXmanual configuration, without an app
Manual connection with another protocolOpenVPNCitadelVPNconfigurations in MAXmanual 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?

  1. Determine your distribution and its version: the package name and the installation method depend on them.
  2. Choose an open-source client and find its official repository and licence file.
  3. Install the package from the official repository of the distribution or the project.
  4. 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.

  1. Install the client from the official source.
  2. Place the configuration in the directory specified in the documentation and restrict access to the file for other users.
  3. Bring up the tunnel using the client.
  4. Disconnect the tunnel with the same client and check that the interface has disappeared.

How do I check that the tunnel works?

What we checkHowExpected resultIf not
Handshake with the peerinterface status in the clienthandshake time updateswrong keys or server address, UDP blocked
Data transfertraffic counters of the interfaceboth receive and send growonly sending grows: the server does not respond
Routesrouting tablefull tunnel: default route through WireGuard; split tunnel: only networks from AllowedIPsan error in AllowedIPs
External IPIP-check websiteVPN server address (with a full tunnel)traffic bypasses the tunnel
DNSDNS leak testservers from the configurationrequests go to your connectivity provider
IPv6IPv6 testIPv6 goes into the tunnel or is disabledan 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

  1. Find out the version of your distribution and choose an open-source client with an official repository.
  2. Obtain a WireGuard configuration (at CitadelVPN this is the MAX plan) and keep it as a secret.
  3. Connect according to the client's documentation.
  4. Check the handshake, routes, IP, DNS and IPv6.
  5. 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.

Read next

Further sources