![]() |
| warp-cli command line to connect virtual private network |
# Add Cloudflare's GPG keycurl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg# Add the official repository for your Ubuntu versionecho "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
Step 2: Install the PackageUpdate your local index and pull the package down:
sudo apt update
sudo apt install cloudflare-warp -y
Step 3: Register and InitializeBefore connecting for the first time, initialize a local device account registration:
warp-cli registration new
Step 4: Pick Your Tunnel ModeEnsure the client is operating in Full VPN mode rather than DNS-only mode:
warp-cli mode warp
Step 5: Start the ConnectionTo toggle the network tunnel on or off:
# Connect
warp-cli connect
# Check status
warp-cli status
Use code with caution.
Part 2: Setting up warp-cli on Windows
On Windows, the warp-cli is included out of the box when you download the standard installer.
Step 1:
- Download & InstallThe GUI Route: Grab the installer package directly from the Cloudflare WARP Client Download Page.
- The CLI Route (Recommended): Open PowerShell as an Administrator and execute a standard deployment command:
winget install Cloudflare.WARP
Step 2: Add WARP to Your Environment PATHBy default, the Windows CLI executable lives inside a deeply nested folder. To call warp-cli directly from any Command Prompt (cmd) or PowerShell terminal, add it to your Windows Environment variables:
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Cloudflare\Cloudflare WARP", "User")
(Restart your terminal window after running this to load the updated PATH settings).
Step 3: Command Line Control on WindowsOpen a clean Command Prompt or PowerShell and begin controlling your network:
:: Create a local device registration profile
warp-cli registration new
:: Force Full Tunnel VPN mode
warp-cli mode warp
:: Connect to the network
warp-cli connect
:: Disconnect from the network
warp-cli disconnect
Part 3: Cheat Sheet of Universal warp-cli CommandsKeep these commands handy for your readers. They work identically on both operating systems:warp-cli status: Displays network profile stats, active server regions, and connection status.
- warp-cli mode doh: Reverts the client to a basic DNS-over-HTTPS privacy mode (strips the full device VPN tunneling).
- warp-cli mode warp: Re-enables the full device encrypted VPN routing.
- warp-cli settings: Prints out a complete overview of your custom routing exceptions and configurations.
- warp-cli registration license <KEY>: Allows upgrading the connection profile to WARP+ Premium by syncing an activation key purchased via mobile.

Post a Comment
Post a Comment
Feel free to ask your queries, happy to discuss with you.