i just got mega vpn and it didnt offer any info on linux yet so by a brief googling i found out it’s a wireguard connection and you can import the .conf file easily on the command line and the connection springs up
before importing i installed wireguard and wireguard-tools
nmcli connection import type wireguard file ./vpn-xxx.conf
voila!
As of this moment, we do not have a proprietary MEGA VPN client for Linux yet. As general information, it is currently being developed to be released in a not-too-distant future.
In the meantime, you could generate the VPN credentials, to be used in the WireGuard client for Linux. In order to do that, please refer to the guide below:
-
Access https://www.wireguard.com/install/ and download the version that matches with your system.
Copy the install command from the site and paste it in your Linux terminal. Note that the system will request your admin password.
-
Access your MEGA account through a browser, then navigate to Settings - VPN (or click here https://mega.nz/fm/account/vpn).
On the credential section, select the country you want to connect and click on ‘Generate VPN credentials’.
The system will create a QR code with a download button, please download the credential.
-
On your Linux system, open /etc and open the Wireguard folder (note that this is a system folder, therefore, it will be necessary to enter your administrator credentials).
Copy the VPN file from the location you downloaded it and paste it in the Wireguard folder.
Note that we recommend you rename the file name to one that you will easily identify. I.e. Spain if you create a credential to connect to Spain.
-
Open your terminal and execute the command sudo wg-quick up ‘vpn filename’
This will connect your VPN.
Note: ‘vpn filename’ has to be introduced without apostrophes ('), and without the extension file name. E.g., to use ‘Spain.conf’ file, please introduce ‘wg-quick up Spain’
-
If during the connection attempt the system returns with an error /usr/bin/wg-quick: line 32: resolvconf: command not found then it means that your system will need an additional package for the VPN.
Simply execute sudo apt install openresolv to install the missing package.
-
Once installed, please execute the connection command again.
-
To disconnect the VPN, simply execute sudo wg-quick down ‘vpn filename’
^TT
Thanks a lot !! It works perfectly!!
Thanks, how do I end the session?
this is not working on my system
Distributor ID: Ubuntu
Description: Ubuntu 24.10
Release: 24.10
Codename: oracular
i even set the
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
Awesome ! Haven’t tested all yet, the written tutorial works perfectly first try with my Fedora 41 box. ![gif]()
Yeah, perfect. No need for an app as long as Wiregusrd can be run
Thanks for posting this answer - works in the latest version of Ubuntu 24.04.01
Thank you for this!!! I remember when you first ran the beta for the VPN that this solution existed, then it didn’t, and I was crushed.
I use Mega’s CLI quite heavily.
I know the documentation and products you produce are excellent, but I came across this site when trying to use Linux with a VPN connection.
As for a dedicated client (like tailscale? I’m wondering if you use wireguard from the userland implementation or from the kernel), I think the current ecosystem using wireguard is so complete that it honestly doesn’t seem necessary.
At any rate, thanks for the great documentation.
Buena tarde ya realice el procedimiento pero no funciona, no conecta de echo no puedo navegar por internet
ubuntu 24.10 dropped openresolv
and put it into systemd-resolv
you can manually install openresolv deb but then it uninstallsa systems-resolv… im experimenting on resukts to sysytem
Hello,
We are pleased to hear that your issue has now been resolved.
Have a MEGA-awesome day and contact us should you need any other assistance. ^AVKS
Hola, por favor envíanos un correo electrónico a [email protected] con más detalles sobre el problema que has encontrado para que podamos investigar más a fondo. Gracias. ^KX