Skip to main content
The mullvad import-settings and mullvad export-settings commands allow you to backup and restore your VPN configuration as JSON files.

export-settings

Export current settings to a JSON file.

Usage

string
required
Output file path. Use - to write to standard output.

Examples

Export to file:
Export to stdout:
Backup with timestamp:

import-settings

Import settings from a JSON file.

Usage

string
required
Input file path. Use - to read from standard input.

Examples

Import from file:
Import from stdin:
Apply settings on new machine:

Settings format

The exported JSON file contains:
  • Relay constraints (location, providers, ownership)
  • Tunnel settings (protocol, obfuscation, quantum resistance)
  • DNS configuration
  • Split tunneling rules
  • Auto-connect preference
  • LAN access setting
  • Lockdown mode setting
  • Custom lists

Example settings file

What is NOT included

  • Account token (you must log in separately)
  • Device information
  • WireGuard keys
  • Logs or cached data
  • API access methods (stored separately)
  • Beta program preference
Settings files do not contain account credentials. You must log in before or after importing settings.

Use cases

Backup before changes

Replicate configuration

Version control

Automation

reset-settings

Reset all settings to defaults while keeping logs and account login.

Usage

flag
Skip confirmation prompt.

Examples

Interactive reset:
Non-interactive:

What gets reset

  • All relay constraints (back to auto)
  • Tunnel options (protocol, obfuscation, quantum resistance)
  • DNS settings
  • Split tunneling rules
  • Custom lists
  • Auto-connect (off)
  • LAN access (blocked)
  • Lockdown mode (off)

What persists

  • Account login status
  • Device registration
  • Logs
  • Cached relay list
Use reset-settings when you want a clean configuration but don’t want to log out or lose logs. Use factory-reset for a complete reset including account logout.

Merging settings

Imported settings are merged with current settings:
  • Specified fields are updated
  • Unspecified fields keep current values
  • This allows partial configuration updates

Partial update example

Importing this file only changes auto-connect and LAN settings, leaving all other settings unchanged.

Exit status

  • 0 - Success
  • 1 - File error, invalid JSON, or daemon error
  • 2 - User cancelled (reset-settings only)
  • factory-reset - Complete reset including account
  • All set commands - Configure individual settings