Best value27-month VPN plan for $40.50 ($1.50 a month), 10 devices, paid onceSee pricing

Setup guide, about 5 minutes

How to set up a VPN on Linux

Linux has WireGuard built into the kernel, so there is nothing to install beyond a small tools package. These steps use the terminal, and a NetworkManager option is included.

App to use

wg-quick from wireguard-tools

The official WireGuard command line tools from your distribution. For a .ovpn file, the openvpn package from your distribution does the same job.

QuickVPN does not make an app, so there is nothing of ours to install.

Step 1: Get your file from the account

  1. Sign in to your QuickVPN account and open VPN.

    In the account menu choose VPN. This is the page that lists your devices. You can have 10 at once.

  2. Click Add device and name it.

    Use a name you will recognize later, for example "Linux desktop". The name is only a label for you.

  3. Pick a city and the WireGuard protocol.

    Choose any city from the list, for example Frankfurt. You can move the same device to another city later without making a new one.

  4. Download the .conf file.

    Save it somewhere you can find it, such as the Downloads folder. It is a private file made for this one device, so do not share it.

Step 2: Install and start the tunnel

  1. Install the tools for your distribution.

    Debian and Ubuntu:

    Debian, Ubuntu
    sudo apt install wireguard resolvconf
  2. Other distributions use their own package name.

    Fedora, Arch
    # Fedora
    sudo dnf install wireguard-tools
    # Arch
    sudo pacman -S wireguard-tools
  3. Copy the file into /etc/wireguard under a short name.

    The name becomes the interface name, so keep it at 15 characters or fewer.

    Terminal
    sudo install -m 600 ~/Downloads/quickvpn-de.conf /etc/wireguard/qv-de.conf
  4. Bring the tunnel up.

    Terminal
    sudo wg-quick up qv-de
  5. To start it at every boot, enable the service.

    Terminal
    sudo systemctl enable --now wg-quick@qv-de

Add a firewall kill switch

wg-quick can add a rule that rejects any outgoing packet that does not leave through the tunnel. This is the pattern from the wg-quick manual.

  1. Open /etc/wireguard/qv-de.conf in an editor with sudo.

  2. Add these two lines to the end of the [Interface] section.

    PostUp adds the rule when the tunnel starts and PostDown removes it when the tunnel stops.

    Add under [Interface]
    PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
    PostDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
  3. Restart the tunnel.

    Terminal
    sudo wg-quick down qv-de && sudo wg-quick up qv-de

Check that it works

  1. Run wg to see the tunnel.

    You should see a latest handshake line and transfer counters.

    Terminal
    sudo wg show
  2. Ask a service for your public address.

    The result should be an address in your chosen city.

    Terminal
    curl https://ifconfig.me

Other ways to connect

NetworkManager

Good for laptops where you switch the VPN from the desktop menu.

  1. Import the file with nmcli.

    Terminal
    nmcli connection import type wireguard file ~/Downloads/quickvpn-de.conf
  2. Turn it on from the network menu, or from the terminal.

    Terminal
    nmcli connection up quickvpn-de

OpenVPN

Use this when UDP 51820 is blocked on your network.

  1. Add a device with OpenVPN, download the .ovpn file, then run it.

    Terminal
    sudo openvpn --config ~/Downloads/quickvpn-de.ovpn

Common fixes

wg-quick says resolvconf is missing.

The file sets a DNS server and wg-quick needs a resolver tool to apply it. Install resolvconf or openresolv, or on systemd-resolved systems install systemd-resolved and try again.

The interface name is too long.

Linux limits interface names to 15 characters. Rename the file, for example to qv-de.conf, and use that name in the commands.

Permission denied reading the config.

The file must be readable only by root. Use install -m 600 as shown above, or chmod 600 on the copy in /etc/wireguard.

No handshake after wg-quick up.

Check that your firewall allows outgoing UDP on port 51820, and that the system clock is correct. If the network blocks it, make an OpenVPN device on UDP 1194.

Ready to connect?

A QuickVPN plan covers 10 devices at once. The longest plan is $40.50 for 27 months, which is $1.50 a month.

Create account

Other setup guides