Mullvad VPN - lost first time NixOS user

Pardon me for creating a new thread on an issue that have been to some extent been covered - I have looked at them, used a search engine, llm, and the wiki but I feel like I just get more confused and feel like there’s a lot of assumed knowledge in every answer.

I manage to add a wg-conf file to network manager I cant connect to internet using it, and neither mullvad-gui or mullvad-cli manages to connect to internet either.

This is my first time using NixOS and I think that’s where my issue really is. For example I found this, but I do not know where I’d go, is it separate file to main config? Why is it different from what’s on the wiki? Am I suppose to do more things? and so on…

I would assume the answer is really to just go read up and gain more experience but I don’t feel at all comfortable doing that until I have Mullvad…

Is there a setup guide for it?

It seems like you are trying to connect to this VPN using NetworkManager and WireGuard. The happy path to doing this according to Mullvad’s documentation seems to be using OpenVPN. So I would make sure that you have the NetworkManager service enabled and the OpenVPN program installed and just use the NetworkManager GUI provided by your Desktop Environment to load whatever OpenVPN config file Mullvad gives you.

1 Like

Never used openVPN before, it asks me for a password, which is not my account number, when I check mullvad_userpass.txt it says my account number on one row and a single letter on the next. I tried said letter, as well as replacing said letter with the account number - any idea as to where to find the password?

The password is m, and the username is your account number. This can be discovered from the OpenVPN configuration generator in your account settings.

1 Like

Did you seriously just recommend OpenVPN over WireGuard?


Yes. If a service offers automatic generation of OpenVPN configs that can be easily imported into NetworkManager, then that is clearly the “happy path” vs. a new user trying to learn how to declarative configure WireGuard helpers etc. in their system configuration.

services.mullvad-vpn.enable = true; should be all you need, plus possibly opening some ports in your firewall if you want to use openvpn - see Mullvad VPN | Privacy is a universal right for more about ports.


NetworkManager can also import wg-quick config files. That, plus generally performing way better and being way simpler (so easier to diagnose failures) makes WireGuard a much better option. I would never use OpenVPN.

I have tried m as password but it does not accept it.

Mullvad does this with WG as well, which is what I tend to use. Only I have yet to get it to work in NixOS

Ok, got it to work on wireguard by making sure the correct ports are open as well as enable mullvad-vpn service!

Thanks all :smiley:

1 Like