MEGA VPN on Linux with Wireguard

There is currently no proprietary MEGA VPN client for Linux yet, but we can use Wireguard.

Install Wireguard

Access https://www.wireguard.com/install/ and download the version that matches with your system.

For Debian based distro:

apt install wireguard resolvconf

Create MEGA VPN credentials

  1. Access MEGA account with browser and navigate to Settings - VPN (or click here https://mega.nz/fm/account/vpn).
  2. On the credential section, select the country (for example Spain) you want to connect and click on 'Generate VPN credentials'.
  3. The system will create a QR code with a download button, please download the credential.
  4. Copy vpn-xxx.conf file in /etc/wireguard and rename it (for example spain.conf)

Connect you MEGA VPN

Open terminal and connect:

sudo wg-quick up spain (or filename.conf)

Disconnect you MEGA VPN

Open terminal and connect:

sudo wg-quick down spain (or filename.conf)

MEGA VPN on linux cli (beta-testing)

Install wireguard and wireguard-tools package

Start VPN:

nmcli connection import type wireguard file ./vpn-xxx.conf