WireGuard Command Line interface (CLI) set up guide for Raspberry Pi (Debian)

Follow our step-by-step instructions to configure WireGuard and unlock advanced VPN capabilities on your Raspberry Pi device. Enhance your privacy and security with WireGuard on your Raspberry Pi.

Written By Lorenzo Vincent

Updated at September 27th, 2023

Set up WireGuard Command Line Interface (CLI) on Raspberry Pi (Debian) using this guide. Configure secure VPN connections through the command line interface for enhanced privacy and security on your Raspberry Pi.

  • A working installation of Debian 11 (Debian Bullseye)
  • A PureVPN premium account (Don’t have one? Sign up now!)
  • Firstly, you will need to install Wireguard packages and files. Type the following to install them:
    1. sudo bash
    2. sudo apt-get update && sudo apt-get upgrade -y
    3. sudo apt-get install wireguard

  • Now go to your Member’s Area and download the desired PureVPN Wireguard file. (WireGuard Configuration File will expire in 5 minutes after generation if not connected, after that you need to regenerate a new configuration)

  • Now create a Wireguard profile and copy/paste the content of the downloaded config. file there.

sudo nano /etc/wireguard/wg0.conf

  • Press the Ctrl+O keys to save the contents of the file and then Ctrl+X to exit the file.
  • Now run the following command to initiate the Wireguard connection.

wg-quick up wg0

  • PureVPN Wireguard connection is activated now. Execute the following command to deactivate the connection.

wg-quick down wg0