FreeVPNNet

How to set up WireGuard on Linux

WireGuard is fast and simple. You import one small configuration file (or scan a QR code); there is no username or password to type.

Last reviewed

What you need

  • An active WireGuard configuration from this site
  • The configuration file (.conf) or the QR code from your configuration page

App

wireguard-tools

Get it from wireguard.com

Official source only.

Where each detail goes

Account details and the matching fields in the app
On your configuration pageIn the app or settings
Configuration file (.conf)Import tunnel from file — fills every field for you
QR codeCreate from QR code / Scan from QR code
EndpointPeer → Endpoint (already in the file)
VPN IPInterface → Addresses (already in the file)

Steps

  1. Install the tools: sudo apt install wireguard (Debian/Ubuntu) or sudo dnf install wireguard-tools (Fedora).

    Illustration of step 1: Install the tools: sudo apt install wireguard (Debian/Ubuntu) or sudo dnf install wireguard-tools (Fedora).
    Illustration — your app may look slightly different.
  2. Download the .conf file and copy it: sudo cp ~/Downloads/*.conf /etc/wireguard/freevpn.conf

    Illustration of step 2: Download the .conf file and copy it: sudo cp ~/Downloads/*.conf /etc/wireguard/freevpn.conf
    Illustration — your app may look slightly different.
  3. Connect: sudo wg-quick up freevpn

    Illustration of step 3: Connect: sudo wg-quick up freevpn
    Illustration — your app may look slightly different.
  4. Check the handshake: sudo wg show

    Illustration of step 4: Check the handshake: sudo wg show
    Illustration — your app may look slightly different.

Check that it works

Search the web for "what is my IP". The location shown should match the server country of your account.

Disconnect

Run sudo wg-quick down freevpn.

Tips

  • If wg-quick complains about DNS, install resolvconf or openresolv, or remove the DNS line from the file.

Troubleshooting

The tunnel is on but nothing loads

Check that your configuration has not expired (see the countdown on your configuration page). Then switch the tunnel off and on again. Some networks block UDP; if so, try an OpenVPN or V2Ray configuration instead.

Handshake never completes

The configuration is tied to one account. Delete the old tunnel in the app and import the file again from your current configuration page.

I created a new configuration

Every VPN configuration has its own keys. Remove the old tunnel and import the new file or QR code.