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
Output file path. Use
- to write to standard output.Examples
Export to file:import-settings
Import settings from a JSON file.Usage
Input file path. Use
- to read from standard input.Examples
Import from file: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
Use cases
Backup before changes
Replicate configuration
Version control
Automation
reset-settings
Reset all settings to defaults while keeping logs and account login.Usage
Skip confirmation prompt.
Examples
Interactive reset: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
Exit status
0- Success1- File error, invalid JSON, or daemon error2- User cancelled (reset-settings only)
Related commands
factory-reset- Complete reset including account- All
setcommands - Configure individual settings