How to use the Mullvad CLI
Follow these instructions to use the Mullvad command line interface (CLI) in your operating system's terminal.
If you haven't already, first download the Mullvad VPN app and install it.
In the terminal, you will then need to navigate to the folder where the program file is located in order for these commands to work. To make this easier in macOS and Windows, you can create a path.
Create a path in macOS
export PATH="/Applications/Mullvad VPN.app/Contents/Resources:$PATH"
Create a path in Windows
- In the Windows Start menu, search for and open advanced system settings.
- In the System Properties window that opens, click on the Environment Variables button.
- Under the System variables section, find and double-click on the row called Path.
- In the new window that opens, click on New and enter C:\Program Files\Mullvad VPN\resources\
Specify your account
Replace the number string with your Mullvad account number.
mullvad account set 1234123412341234
Show account info
This command will show your account number and the expiration date of your account.
mullvad account get
List server locations
This command displays a list of available countries and cities.
mullvad relay list
Select a location
In this example, we are connecting to a server in Sweden (se), in the city of Malmö (mma).
Replace "se" with the country of your choice and, optionally, "mma" with a specific city in that country.
mullvad relay set location se mma
Connect to the location that you selected.
Check your connection status
Auto-connect on start-up
If you want Mullvad to start and connect when you boot up your computer, use this command.
mullvad auto-connect set on
To turn this off, run
mullvad auto-connect set off
Enable LAN access
mullvad lan set allow
macOS uninstall script
macOS users can run a bundled uninstall script to completely remove the app, as well as its local log files, cache, and settings