Skip to main content
The Mullvad CLI (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 named mullvad (or mullvad.exe on Windows).

Basic Usage

Getting Help

Display general help information:
Get help for a specific command:
For example:

Version Information

Check the CLI version:
View detailed version information:

Quick Examples

Connection Management

Connect to VPN:
Connect and wait until connected:
Disconnect from VPN:
Check connection status:
Get verbose status information:

Account Management

Log in to your account:
View current account information:
Log out:

Relay Selection

List available relays:
Set relay location by country:
Set relay location by city:
View current relay constraints:

Available Command Categories

The Mullvad CLI provides the following command categories:

Core Commands

  • connect - Connect to a VPN relay
  • disconnect - Disconnect from the VPN
  • reconnect - Reconnect to any matching VPN relay
  • status - 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 connected
  • lan - Control the allow local network sharing setting
  • split-tunnel - Configure split tunneling (platform-specific)

Security & Privacy

  • lockdown-mode - Control whether to block network access when disconnected from VPN
  • auto-connect - Control the daemon auto-connect setting
  • anti-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 lists
  • beta-program - Receive notifications about beta updates

Data Management

  • factory-reset - Reset settings, caches, and logs
  • reset-settings - Reset settings only, but remain logged in and keep logs and caches
  • import-settings - Apply a JSON patch generated by ‘export-settings’
  • export-settings - Export a JSON patch based on the current settings
  • log - 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 the mullvad-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
This makes the CLI suitable for use in scripts and automation.

Next Steps