How to set up WireGuard on Linux

Get ready to experience blazing fast speed with enhanced security. Set up WireGuard on Linux now and enjoy your internet freedom.

Written By Fahad Ahmed

Updated at October 14th, 2024

We are thrilled to announce that PureVPN now offers WireGuard support for manual configuration. Users can now set up WireGuard VPN connections manually, taking advantage of its enhanced encryption and high-speed performance. PureVPN has introduced WireGuard support based on the growing preference of users for this protocol, considering its security features and faster connection speeds. By adding WireGuard support, PureVPN aims to provide users with more options and flexibility when it comes to configuring their VPN connections.

Delete

Note: To set up WireGuard configuration on your system, you will need Ubuntu 21.04 or a newer version for Ubuntu users, and Fedora 35 or a newer version for Fedora users. These versions are required to ensure compatibility and proper functionality of WireGuard on your Linux distribution.

Curious about the set up process? Simply follow the instructions below to configure WireGuard. 

How to set up WireGuard on Linux

  • Open the Terminal window and enter the following commands one by one, in the specified order, to install the necessary packages.
    1. sudo bash
    2. sudo apt-get update
    3. sudo apt-get install wireguard 
  • Run the following command to create the WireGuard VPN connection.
    1. sudo nano /etc/wireguard/wg0.conf 
  • After downloading the file, make sure to obtain the Wireguard configuration file and click on 'Copy to clipboard' (refer to the steps below to locate the WireGuard configuration file). Then, proceed to your VPN profile, paste the content into it, and save the changes before closing the profile.

  • To activate the WireGuard VPN connection, execute the provided command.
    1. sudo wg-quick up wg0 
  • To disconnect the WireGuard connection, you can use the following command.
    1. sudo wg-quick down wg0
Delete

How to download WireGuard configuration file

  • Login to the PureVPN Member Area account.

  • Go to the Manual Configuration tab.

  • Click Arrow icon.
  • Select your desired country or city.
  • Click the Download button.

  • A pop-up window will appear asking you to select the required information. The information contains the following:

  • Select device on which you are configuring WireGuard protocol.

  • After entering the details you will be able to see the option to copy the configuration file.

Delete

Note: Please make sure to copy the file and activate the connection within 30 minutes once the profile is downloaded, otherwise the configuration will expire and you will have to redownload a fresh configuration file.

Delete