mullvad) is a command-line interface for managing the Mullvad VPN daemon. It provides complete control over VPN connections, relay selection, tunnel configuration, and account management.
Binary Name
The CLI tool is namedmullvad (or mullvad.exe on Windows).
Basic Usage
Getting Help
Display general help information:Version Information
Check the CLI version:Quick Examples
Connection Management
Connect to VPN:Account Management
Log in to your account:Relay Selection
List available relays:Available Command Categories
The Mullvad CLI provides the following command categories:Core Commands
connect- Connect to a VPN relaydisconnect- Disconnect from the VPNreconnect- Reconnect to any matching VPN relaystatus- Return the state of the VPN tunnel
Account Management
account- Control and display information about your Mullvad account- Create accounts
- Login/logout
- View account details and device information
- Manage devices
Relay Configuration
relay- Manage relay and tunnel constraints- List available relays
- Set location constraints (country, city, hostname)
- Configure relay providers and ownership
- Update relay list
- Override relay options
Tunnel Settings
tunnel- Manage tunnel options- MTU configuration
- Quantum-resistant key exchange
- DAITA (Defense Against AI-Guided Traffic Analysis)
- Allowed IPs
- Key rotation interval
Network Settings
dns- Configure DNS servers to use when connectedlan- Control the allow local network sharing settingsplit-tunnel- Configure split tunneling (platform-specific)
Security & Privacy
lockdown-mode- Control whether to block network access when disconnected from VPNauto-connect- Control the daemon auto-connect settinganti-censorship- Manage use of anti-censorship methods for WireGuard
Advanced Configuration
api-access- Manage Mullvad API access methods- Configure proxy and bridge servers
- Manage SOCKS5 and Shadowsocks proxies
custom-list- Manage custom relay listsbeta-program- Receive notifications about beta updates
Data Management
factory-reset- Reset settings, caches, and logsreset-settings- Reset settings only, but remain logged in and keep logs and cachesimport-settings- Apply a JSON patch generated by ‘export-settings’export-settings- Export a JSON patch based on the current settingslog- Manage logs and tracing
Debugging
debug- Debug commands used for internal testing (hidden)
Output Formats
Many commands support different output formats:Verbose Mode
Use the-v or --verbose flag for detailed output:
JSON Output
Some commands support JSON output with the-j or --json flag:
Debug Output
For debugging purposes, use the-d or --debug flag:
Interactive Features
Wait Flags
Connection commands support--wait (or -w) to block until the operation completes:
Status Listening
Monitor tunnel state changes in real-time:Confirmations
Destructive operations like factory reset require confirmation unless you use-y or --assume-yes:
Shell Integration
Shell Completions
On Unix systems (Linux and macOS), you can generate shell completion scripts:Communication with Daemon
The CLI communicates with themullvad-daemon system service using a management interface. The daemon must be running for the CLI to function. If you encounter connection errors, ensure the daemon is running:
- Linux:
systemctl status mullvad-daemon - macOS: Check if the daemon process is active
- Windows: Check if the Mullvad service is running in Services
Exit Codes
The CLI returns standard exit codes:0- Success- Non-zero - Error occurred
Next Steps
- Installation Guide - Install and set up the CLI
- Command Reference - Detailed documentation for each command
- Examples - Common usage scenarios and scripts