LinuxCommandLibrary

warp-cli

Connect and manage Cloudflare WARP

TLDR

Register the current device to WARP (must be run before first connection)

$ warp-cli registration new
copy

Connect to WARP
$ warp-cli connect
copy

Disconnect from WARP
$ warp-cli disconnect
copy

Display the WARP connection status
$ warp-cli status
copy

Switch to a specific mode
$ warp-cli set-mode [mode]
copy

Display help
$ warp-cli help
copy

Display help for a subcommand
$ warp-cli help [subcommand]
copy

SYNOPSIS

warp-cli [command] [options]

PARAMETERS

register
    Registers your device with the Cloudflare WARP service. This is usually the first step after installation.

set-mode <mode>
    Sets the operational mode of the WARP client. Available modes include:
warp (encrypts and tunnels all traffic via WARP),
warp+doh (WARP plus DNS over HTTPS),
doh (DNS over HTTPS only),
proxy (local proxy mode),
off (disables WARP).

connect
    Connects to the Cloudflare WARP service, activating the tunnel.

disconnect
    Disconnects from the Cloudflare WARP service, deactivating the tunnel.

status
    Displays the current status of the WARP client, including connection status, mode, and device information.

set-license <key>
    Applies a WARP+ license key to unlock additional features or bandwidth.

delete-device
    Unregisters and deletes the current device from the WARP service.

add-excluded-route <IP/CIDR>
    Excludes a specific IP address or CIDR range from being routed through the WARP tunnel (split tunneling).

remove-excluded-route <IP/CIDR>
    Removes a previously added excluded IP address or CIDR range.

add-included-route <IP/CIDR>
    Includes a specific IP address or CIDR range to be routed through the WARP tunnel. All other traffic is excluded. Use with caution as it overrides exclude rules.

remove-included-route <IP/CIDR>
    Removes a previously added included IP address or CIDR range.

disable-network <interface_name>
    Disables WARP for a specific network interface (e.g., eth0, wlan0).

enable-network <interface_name>
    Enables WARP for a specific network interface.

settings
    Displays detailed current settings of the WARP client.

network
    Shows network interface information relevant to WARP.

--version
    Displays the version of the WARP CLI tool and client.

help
    Shows a list of available commands and their usage.

DESCRIPTION

The warp-cli command-line utility provides an interface to control and configure the Cloudflare WARP client on Linux systems.

WARP (WireGuard® reimagined) is Cloudflare's service designed to make internet traffic more private and faster by routing it through Cloudflare's global network. It encrypts traffic leaving your device and sends it to Cloudflare's edge, where it's decrypted and sent to its destination.

This command allows users to perform various operations such as connecting or disconnecting from the WARP service, changing its operational mode (e.g., WARP, WARP with DNS over HTTPS, DNS only), managing excluded or included network routes (split tunneling), registering new devices, and viewing the current status and settings. It often requires elevated privileges (sudo) to execute most of its commands as it interacts directly with system network configurations and a background service.

CAVEATS

Most warp-cli commands require root privileges (i.e., running with sudo).
WARP may conflict with other VPN solutions or network proxies running on the same system, potentially leading to connectivity issues or unexpected routing.
Careless use of add-excluded-route or add-included-route can lead to loss of connectivity to specific services or the internet.

SERVICE MANAGEMENT

The warp-cli command interacts with a background service (daemon) often managed by systemd. You might need to check the service status or restart it using commands like sudo systemctl status cloudflared-warp or sudo systemctl restart cloudflared-warp if you encounter issues, especially after installation or updates.

INSTALLATION

The warp-cli utility and the WARP client are typically installed via Cloudflare's official package repositories for various Linux distributions (e.g., APT for Debian/Ubuntu, YUM/DNF for Fedora/RHEL). It is not usually available through default distribution repositories.

HISTORY

Cloudflare WARP was initially launched in 2019 for mobile platforms, expanding to desktop operating systems including Linux later. The warp-cli tool for Linux provides a native command-line interface to interact with the WARP daemon, facilitating integration into scripts and server environments. Its development focuses on ease of use while leveraging Cloudflare's extensive global network infrastructure.

SEE ALSO

systemctl(1), ip(8), nmcli(1)

Copied to clipboard