Skip to main content
The Mullvad CLI (mullvad) is included with all desktop installations of the Mullvad VPN app. This guide covers installation and setup for Linux, macOS, and Windows.

Prerequisites

Before using the CLI, you need:
  1. A Mullvad account (create one at mullvad.net)
  2. The Mullvad daemon (mullvad-daemon) installed and running
  3. Appropriate system permissions (root/administrator for some operations)

Installation by Platform

Linux

The CLI is included with the Mullvad VPN app installation.

Debian/Ubuntu

Download and install the .deb package from the Mullvad downloads page:
The mullvad binary will be installed to /usr/bin/mullvad.

Fedora/RHEL

Download and install the .rpm package:
or

Arch Linux

Install from the AUR or use the official package:

Verifying Installation

Verify the CLI is installed:

macOS

The CLI is included with the Mullvad VPN app.

Installation

  1. Download the .pkg installer from mullvad.net/download
  2. Open the downloaded .pkg file
  3. Follow the installation wizard
The mullvad binary will be installed to /usr/local/bin/mullvad.

Adding to PATH

The installation should automatically add /usr/local/bin to your PATH. Verify the CLI is accessible:
If the command is not found, ensure /usr/local/bin is in your PATH:
Add this line to your ~/.zshrc or ~/.bash_profile to make it permanent.

Windows

The CLI is included with the Mullvad VPN app installation.

Installation

  1. Download the .exe installer from mullvad.net/download
  2. Run the installer as Administrator
  3. Follow the installation wizard
The mullvad.exe binary will be installed to:

Adding to PATH

To use the CLI from any command prompt:
  1. Open System PropertiesEnvironment Variables
  2. Under System variables, find and edit Path
  3. Add: C:\Program Files\Mullvad VPN\resources
  4. Click OK to save
  5. Restart any open command prompts
Alternatively, use the full path:

PowerShell

In PowerShell, you may need to use the full path or create an alias:
Add this to your PowerShell profile to make it permanent:

Verifying Installation

After installation, verify the CLI and daemon are working:

Check CLI Version

Expected output:

Check Daemon Status

Verify the daemon is running:

Linux

If not running, start it:

macOS

If the daemon is not running, start the Mullvad VPN app from Applications.

Windows

Open Services (services.msc) and check that “Mullvad VPN Service” is running. You can also check using the CLI:

Test CLI Connection

Test that the CLI can communicate with the daemon:
If successful, you’ll see the current VPN connection state.

Building from Source

If you want to build the CLI from source:

Requirements

All Platforms

  1. Install Rust toolchain:
  2. Clone the repository:
  3. Install additional dependencies:
    • Protobuf compiler (version 3.15+)
    • Go (version 1.21+)
    • Bash (version 4.0+)

Linux-Specific Dependencies

Debian/Ubuntu:
Fedora/RHEL:

Build the CLI

From the repository root:
The binary will be at:
Optionally, install it system-wide:

Cross-Compilation

Linux ARM64:
Windows ARM64:
macOS Universal Binary:

Shell Completions

The CLI can generate shell completion scripts for better command-line integration.

Bash

Reload your shell:

Zsh

Add to your ~/.zshrc if not already present:
Reload your shell:

Fish

Reload Fish completions:

PowerShell (Windows)

Shell completions are not currently supported on Windows.

Permissions

Linux/macOS

Most CLI commands require the daemon to be running with root privileges. The CLI itself doesn’t need root access for most operations, but the daemon does. If you see permission errors:

Windows

On Windows, the Mullvad service runs with SYSTEM privileges. You don’t need administrator privileges to use the CLI for most operations, but starting/stopping the service requires elevation.

Troubleshooting

Command Not Found

Linux/macOS:
If not found, ensure the installation directory is in your PATH:
Windows: Verify the PATH includes:

Cannot Connect to Daemon

If you see “Failed to connect to daemon” errors: Linux:
macOS: Start the Mullvad VPN app from Applications, or check if the daemon is running:
Windows: Check Services:
Restart the service if needed:

Permission Denied

Linux/macOS: The daemon must run as root. Verify it’s running with appropriate privileges:
Windows: Run Command Prompt or PowerShell as Administrator if you need to manage the service.

Next Steps

Now that the CLI is installed:
  1. CLI Overview - Learn basic CLI usage and commands
  2. Command Reference - Detailed documentation for each command
  3. Examples - Common usage patterns and workflows

Additional Resources