Set up Surflare CLI on Linux

Supported Distributions

Surflare CLI works on 64-bit Linux systems with nftables 0.9 or higher.

Ubuntu 20.04+
Debian Debian 11+
Fedora 38+
Rocky Linux Rocky Linux 9+
AlmaLinux AlmaLinux 9+
openSUSE 15.4+
Arch Linux Arch Linux Rolling
1

Check system requirements

Surflare CLI creates an outbound-only transparent proxy. Inbound connections like SSH are not affected. Verify your system meets the requirements:

nft --version
2

Install Surflare

Run the one-line install command in your terminal:

curl -fsSL https://www.surflare.com/static/linux-setup.sh | sudo bash/code>
The script downloads and installs the latest version automatically
Installs to /usr/bin/surflare and /usr/bin/surflare-proxy
Configuration is stored in /etc/surflare/
3

Log in to your account

Root privileges (sudo) are required to run Surflare

After installation, launch the interactive menu.

It will prompt you to enter your email and password to log in.

sudo surflare
4

Connect to VPN

After logging in, the server is set to "Auto Best" by default. Simply tap the Connect button to connect to the fastest server based on your location.

You can also choose a specific server location, configure routing modes, or enable Multi-Hop VPN as needed.

4.1

VPN Server Selection

  • Auto Detect (Recommended)

    Automatically connects to the fastest server. Best for general use when you don't need a specific location.

  • City

    If you need to access from a specific country or city, select the desired location. When multiple servers are available in one city, the app automatically connects to the fastest one.

  • Specific Server

    Manually select an individual server from the list if needed.

4.2

Routing Modes

Smart Routing

Only encrypts popular apps like Google, Facebook, OpenAI, Claude, Amazon, Netflix, etc. Other applications will continue to access the internet directly through your local network. Best for users who want VPN protection for specific apps while maintaining local network speed for other activities.

Global Routing

Encrypts all internet traffic from your device. Choose this option if you want complete privacy protection for all your online activities.

4.3

Transit Server (Multi-Hop VPN)

This feature requires a Prime Plan subscription.
Enable Transit Server for distant servers

Surflare will automatically find the fastest nearby relay server to forward your data, significantly improving connection speed.

You can also specify a transit server manually if needed.

If the selected server is already nearby with low latency, enabling Transit Server is not recommended as the additional relay would add processing overhead.

Once you have configured your preferences, tap the Connect button to start your VPN connection.

Verify Your Connection

After connecting, check your internet IP address in the app to confirm you are connected. Try accessing apps and websites to ensure everything works as expected.

You can also verify from the terminal:

Check VPN connection status and current server:

sudo surflare status

Verify your public IP and location match the VPN server:

curl ipinfo.io
Your inbound services (SSH, web server, etc.) should continue working normally while connected to VPN.

Troubleshooting

If you encounter any issues, you can send a diagnostic report to our support team. This collects connection logs and system information to help us resolve your problem faster.

sudo surflare feedback

After sending the report, contact our 24/7 support team with your account email so we can look up your diagnostic data.

CLI Commands Reference

Besides the interactive menu, you can also run commands directly in your terminal. Click any command to copy it.

sudo surflare Launch interactive menu
sudo surflare login Log in to your account
sudo surflare logout Log out and clear local data
sudo surflare connect Connect to VPN
sudo surflare disconnect Disconnect from VPN
sudo surflare status Show connection status
sudo surflare nodes List available nodes
sudo surflare ping <host> Test connectivity
sudo surflare feedback Submit diagnostic report

Uninstall

To completely remove Surflare from your system:

curl -fsSL https://www.surflare.com/static/linux-setup.sh | sudo bash -s uninstall