Skip to main content

Settings Directory

The daemon stores its settings in a platform-specific directory. This location can be customized using the MULLVAD_SETTINGS_DIR environment variable.

Default Paths

PlatformPath
Linux/etc/mullvad-vpn/
macOS/etc/mullvad-vpn/
Windows%LOCALAPPDATA%\Mullvad VPN\
AndroidgetFilesDir()
On Windows, when the daemon runs as a system service, %LOCALAPPDATA% expands to C:\Windows\system32\config\systemprofile\AppData\Local.

Customizing Settings Directory

You can override the default settings directory by setting the MULLVAD_SETTINGS_DIR environment variable. See Environment Variables for platform-specific instructions.

Settings Patch Format

Mullvad settings patch is a JSON format used to apply changes to app settings. This makes it easy to share or distribute useful configurations, such as optimizations for censored locations.

Format Structure

A patch consists of a JSON object where each key refers to a setting to be edited. The type of value and merge strategy depend on the specific setting.

Important Considerations

  • If any part of a patch is not supported on a platform, the app will reject the entire patch
  • No changes will be applied if the patch is rejected
  • Patches must not edit settings that may compromise security (e.g., enabling custom DNS)

Supported Settings

Relay Overrides

The relay IP override setting allows you to specify custom IP addresses for specific relay servers. Example:
{
    "relay_overrides": [
        { "hostname": "a", "ipv4_addr_in": "1.2.3.4" },
        { "hostname": "b", "ipv4_addr_in": "1.2.3.4", "ipv6_addr_in": "::1" }
    ]
}
Merge Strategy: The relay overrides use an “append or replace” strategy:
  • Overrides for hostnames not present in the array remain unchanged
  • For any given hostname, only specified overrides change
  • Overrides that are specified are added or replaced
  • There is no way to remove an existing override without replacing it
Examples:
{
    "relay_overrides": [
        { "hostname": "se-got-wg-001", "ipv4_addr_in": "192.0.2.1" }
    ]
}

Applying Patches

You can apply settings patches using the Mullvad CLI:
mullvad settings import patch.json

Versioning and Compatibility

Patches are not versioned, as backward compatibility is not considered critical. However, compatibility should not be broken without good reason. Not all platforms support all settings at all times. If a setting is not supported on your platform, the entire patch will be rejected.

Security Considerations

Settings patches are designed to be safe by default:
  • Cannot enable settings that compromise security
  • Cannot modify DNS settings
  • Cannot disable security features
  • All changes must be explicitly allowed by the patch format

Build docs developers (and LLMs) love