Sign inSign up

hohkyuser/cloudflare-mesh

By hohkyuser

•Updated 2 months ago

Automated Cloudflare Mesh Connector (WARP CLI) with automated token provisioning and routing.

Image
Networking
Security
Web servers
0

131

hohkyuser/cloudflare-mesh repository overview

⁠Cloudflare Mesh Connector in Docker

A lightweight, automated Docker image to run the official Cloudflare WARP CLI configured as a Mesh Connector (Mesh Node) inside a container.

⁠Prerequisites

Before running the container, you must generate an authentication token from your Cloudflare Zero Trust dashboard:

  1. Go to Networking > Mesh in the Cloudflare Zero Trust Dashboard.
  2. Click on Add a Node and copy the generated token string.

⁠Usage

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.

⁠Docker Compose Example

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
⁠How to Run
docker compose up -d
⁠Verify Connection

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).

Tag summary

Content type

Image

Digest

sha256:44e4c69ae…

Size

326.2 MB

Last updated

2 months ago

docker pull hohkyuser/cloudflare-mesh