Get started (22)
Last updated Sep 16, 2026 Set up Cloudflare Mesh so your devices and servers can reach each other by private IP.
Prerequisites
- A Cloudflare account ↗︎
- A Zero Trust organization with an active subscription, including the Free plan
- A laptop or phone to connect as a client device
- (Optional) A Linux server to deploy a Mesh node<details><summary>
Linux server requirements</summary>
| OS version | RHEL 9 <sup><a href="#user-content-fn-1">1</a></sup>, RHEL 10, Debian 12, Debian 13, Fedora 43, Fedora 44, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Ubuntu 26.04 LTS |
|---|---|
| Processor | AMD64 / x86-64 or ARM64 / AArch64 |
| vCPU | 3 minimum, 4 recommended |
| RAM without a desktop | 1 GB minimum, 2 GB recommended (for example, Ubuntu Server) |
| RAM with a desktop | 4 GB minimum, 8 GB recommended (for example, Ubuntu GNOME) |
| Disk space | 250 MiB minimum, 500 MiB recommended |
| Network interface type | Wi-Fi or LAN |
| MTU | 1381 bytes recommended <sup><a href="#user-content-fn-2">2</a></sup> |
| 1. On RHEL 9 and later, enable the <a href="https://docs.fedoraproject.org/en-US/epel/">Extra Packages for Enterprise Linux (EPEL) ↗︎</a> repository before installing <code>cloudflare-warp</code>. EPEL provides dependencies required by the client UI. For the RHEL commands, refer to <a href="https://docs.fedoraproject.org/en-US/epel/getting-started/">Getting started with EPEL ↗︎</a>. <a href="#user-content-fnref-1">↩</a> | |
| 2. Minimum 1281 bytes with <a href="https://developers.cloudflare.com/cloudflare-one/team-and-resources/devices/cloudflare-one-client/deployment/mdm-deployment/path-mtu-discovery/">Path MTU Discovery</a> <a href="#user-content-fnref-2">↩</a></details> |
Mesh nodes are optional
Client-to-client connectivity works without any Mesh nodes. Two enrolled laptops can reach each other directly by Mesh IP. Mesh nodes are for running the client in headless mode on a server — either to make that server reachable by its Mesh IP, or to route traffic to a private subnet behind it. Configure the required account settings before connecting participants. You can use the dashboard wizard, APIs, or Terraform.
Cloudflare Mesh requires that the Mesh node's device profile is configured to use MASQUE. Hostname routes, IPv6 CIDR routes, and high availability do not work if the device profile uses WireGuard instead.
Choose a participant type
Choose an enrollment method based on what you want to connect:
| Goal | Participant type | Enrollment method | Browser required |
|---|---|---|---|
| Run a service or route a subnet from Linux | Mesh node | Connector token | No |
| Connect an unattended Windows, macOS, or Linux device | Headless client device | Service token and managed deployment parameters | No |
| Connect a user device with identity | Client device | Interactive identity provider enrollment | Yes |
1. Configure Mesh
Choose the dashboard wizard or API and Terraform resources.
The setup wizard configures your account for Mesh networking and optionally guides you through creating a Mesh node. This is a one-time setup.
- In the Cloudflare dashboard, go to Networking > Mesh. Go to Mesh ↗
- Select Add participant > Add node.
- Enter a name for your node (for example,
web-serverorstaging-db). - Select Create node.
- Select Linux, Kubernetes, Docker Compose, or Docker CLI.
- Follow the installation instructions for your selected method. The dashboard masks the node token but includes it when required by a copied command. Docker Compose configurations and Kubernetes manifests reference a secret instead of containing the token.
- (Optional) If you are not ready to install the node, select I'll connect later. You can install the node from its detail page later.
- If you installed the node, wait for it to connect and select Continue.
If you installed the node, it should appear as Online on the Mesh overview page along with its assigned Mesh IP. If the node does not come online, refer to Troubleshooting.
The dashboard wizard is not required. After account bootstrap, APIs and Terraform can automate the supported Mesh resources. You will need your account ID, Zero Trust team name, jq, and an API token with permissions for the resources you configure.
Initial API token
You must create the initial API token in the dashboard. An authorized token can create subsequent user-owned or account-owned tokens through the API.
Before continuing, configure every item in Required account settings. The examples in this section configure the Mesh node device profile, node, and connector token. You must configure device enrollment and global settings separately. Allow all Cloudflare One traffic to reach enrolled devices and the ICMP Gateway proxy require dashboard configuration.
Before connecting a node, create a safe Include-mode profile. This request requires the Zero Trust Write permission. It matches Mesh nodes, uses MASQUE in Traffic and DNS mode, and routes only the Mesh IP range through Cloudflare:
set -euo pipefail
PROFILE_RESPONSE=$(
curl --fail-with-body --silent --show-error \
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/policy" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data "$(jq -n \
--arg match "identity.email == \"warp_connector@$TEAM_NAME.cloudflareaccess.com\"" \
'{
name: "Cloudflare Mesh nodes",
description: "Route Mesh IP traffic through Cloudflare",
enabled: true,
precedence: 100,
match: $match,
service_mode_v2: {mode: "warp"},
tunnel_protocol: "masque",
include: [{address: "100.96.0.0/12", description: "Cloudflare Mesh IPs"}]
}')"
)
jq -e '.success == true and (.result.id | type == "string")' \
<<< "$PROFILE_RESPONSE" > /dev/null
PROFILE_ID=$(jq -r '.result.id' <<< "$PROFILE_RESPONSE")
Set ACCOUNT_ID, TEAM_NAME, and CLOUDFLARE_API_TOKEN in the shell before running the command. Use an unused precedence value that places this profile before broader profiles. Do not add an exclude field. A device profile cannot contain both include and exclude.
The API response uses the standard success, errors, messages, and result fields. A non-2xx response causes curl to fail. A response with success: false or without result.id causes jq to fail. Do not continue until the command returns zero and PROFILE_ID is set.
The following requests require an API token with either Cloudflare One Connectors Write or Cloudflare One Connector: WARP Write permission. To create a Mesh node and retrieve its connector token:
set -euo pipefail
NODE_RESPONSE=$(
curl --fail-with-body --silent --show-error \
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/warp_connector" \
--request POST \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"web-server"}'
)
jq -e '.success == true and (.result.id | type == "string")' \
<<< "$NODE_RESPONSE" > /dev/null
NODE_ID=$(jq -r '.result.id' <<< "$NODE_RESPONSE")
TOKEN_RESPONSE=$(
curl --fail-with-body --silent --show-error \
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/warp_connector/$NODE_ID/token" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
)
MESH_NODE_TOKEN=$(jq -er \
'select(.success == true) | .result | select(type == "string" and length > 0)' \
<<< "$TOKEN_RESPONSE")
The commands stop on an HTTP or API error. Do not continue until they return zero and set NODE_ID and MESH_NODE_TOKEN. If token retrieval fails after node creation, retry only the token request with the existing NODE_ID. Do not rerun the node creation request.
Install the node and replace <TOKEN> with the value of MESH_NODE_TOKEN:
IP forwarding is not required to reach the node by its Mesh IP. If the node will advertise CIDR routes, enable persistent forwarding before connecting it:
printf 'net.ipv4.ip_forward = 1\nnet.ipv6.conf.all.forwarding = 1\nnet.ipv6.conf.all.accept_ra = 2\n' | sudo tee /etc/sysctl.d/99-zzz-cloudflare-warp-connector.conf &&
sudo sysctl --system
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor -o /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg &&
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(. /etc/os-release && echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list &&
sudo apt-get update -qq && sudo apt-get install -y -qq cloudflare-warp
sudo warp-cli --accept-tos connector new <TOKEN> && sudo warp-cli --accept-tos connect
On RHEL 9 and later, enable the Extra Packages for Enterprise Linux (EPEL) repository before installing cloudflare-warp. EPEL provides dependencies required by the Cloudflare One Client UI. Turn on CodeReady Builder, then install the EPEL release package for your RHEL version:
sudo subscription-manager repos --enable codeready-builder-for-rhel-$(rpm -E %rhel)-$(arch)-rpms &&
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
On Rocky Linux, AlmaLinux, and other RHEL-compatible distributions, run sudo dnf config-manager --set-enabled crb && sudo dnf install -y epel-release instead. For details, refer to Run Mesh on Linux.
Then install the package:
curl -fsSL https://pkg.cloudflareclient.com/cloudflare-warp-ascii.repo | sudo tee /etc/yum.repos.d/cloudflare-warp.repo &&
sudo dnf install -y cloudflare-warp
sudo warp-cli --accept-tos connector new <TOKEN> && sudo warp-cli --accept-tos connect
You can also manage nodes with the cloudflare_zero_trust_tunnel_warp_connector ↗︎ resource. Use cloudflare_zero_trust_tunnel_warp_connector_config ↗︎ to manage node configuration.
2. Connect a client device
Use the Add device workflow to find the Cloudflare One Client installer and organization name for a laptop or phone:
- In the Cloudflare dashboard, go to Networking > Mesh. Go to Mesh ↗
- Select Add participant > Add device.
- Select the device platform and use the provided link or QR code to install the Cloudflare One Client.
- Open the client and select Cloudflare Zero Trust when prompted for a connection type.
- Enter the organization name displayed in the Mesh dashboard and complete authentication.
