Automated Cloudflare Mesh Connector (WARP CLI) with automated token provisioning and routing.
131
A lightweight, automated Docker image to run the official Cloudflare WARP CLI configured as a Mesh Connector (Mesh Node) inside a container.
Before running the container, you must generate an authentication token from your Cloudflare Zero Trust dashboard:
Since Cloudflare Mesh modifies routing tables and uses virtual network interfaces, the container requires network administration privileges (NET_ADMIN) and access to the host's TUN device.
Create a docker-compose.yml file:
version: '3.8'
services:
cloudflare-mesh:
image: hohkyuser/cloudflare-mesh:latest
container_name: cf_mesh_node
restart: always
cap_add:
- NET_ADMIN # Required to allow WARP to modify internal routing tables
devices:
- /dev/net/tun:/dev/net/tun # Required to create the warp0 virtual interface
environment:
- MESH_TOKEN=your_cloudflare_mesh_token_here
sysctls:
- net.ipv6.conf.all.disable_ipv6=0 # Optional: Ensures IPv6 support if needed by your Mesh
# Example of another application in the same network that you want to expose/protect
my-app:
image: nginx:alpine
container_name: internal_app
depends_on:
- cloudflare-mesh
docker compose up -d
Check the container logs to ensure the connection was successful:
docker compose logs cloudflare-mesh
You should see: "WARP Connector connected to Mesh!" (or check your Cloudflare Zero Trust dashboard to see the node status switch to Connected).
Content type
Image
Digest
sha256:44e4c69ae…
Size
326.2 MB
Last updated
2 months ago
docker pull hohkyuser/cloudflare-mesh