Cloudflare DNS and Tunnel Management for Openclaw

A comprehensive automation skill for managing Cloudflare DNS records, domain zones, and secure tunnels via the Cloudflare API.

lucassynnott
v1.0.0
Jan 14, 2026
3
3.9k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cloudflare-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cloudflare-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Cloudflare DNS and Tunnel Management?

The Cloudflare skill enables developers to programmatically manage their web infrastructure through the Openclaw Skills ecosystem. By interfacing directly with the Cloudflare API, this skill allows for rapid DNS record updates, domain zone administration, and the creation of secure tunnels without manually navigating the dashboard. It is an essential tool for those looking to integrate infrastructure-as-code principles into their daily AI-assisted workflows.

This skill streamlines the complexity of Cloudflare's extensive API into actionable scripts that prioritize speed and security. Whether you are updating an A record for a new server or setting up a zero-trust tunnel for a local development environment, using this skill within Openclaw Skills provides the necessary abstractions to handle infrastructure tasks with precision and efficiency.

Cloudflare DNS and Tunnel Management Use Cases

  • Automating the creation of DNS A and CNAME records for new microservices.
  • Listing all domain zones associated with a Cloudflare account for auditing and discovery.
  • Setting up secure Cloudflare Tunnels to expose local development servers to the internet without port forwarding.
  • Deleting obsolete or temporary DNS records during environment cleanup.
  • Retrieving tunnel tokens to facilitate automated deployment of cloudflared containers via CI/CD pipelines.

How Cloudflare DNS and Tunnel Management Works

  1. The skill authenticates with the Cloudflare API using a scoped API Token stored in a configuration file or environment variable.
  2. Commands are issued through the AI agent to interact with specific zones, requiring only the domain name to locate zone IDs.
  3. The underlying scripts utilize curl and jq to perform REST API requests and parse response data into readable formats.
  4. For DNS management, the skill handles record creation, updates, and deletions with support for Cloudflare's proxy features.
  5. For Tunnels, the skill manages the lifecycle of the tunnel resource, from initial creation to ingress configuration and token generation.

Cloudflare DNS and Tunnel Management Setup

1. Get Your API Token

Go to the Cloudflare dashboard and create a token with Zone:Read, DNS:Edit, and Account:Cloudflare Tunnel:Edit permissions.

2. Configure Credentials

# Recommended: Store in a secure file
echo "YOUR_API_TOKEN" > ~/.cloudflare_token
chmod 600 ~/.cloudflare_token

# Alternative: Use environment variables
export CLOUDFLARE_API_TOKEN="YOUR_API_TOKEN"

3. Test Connection

./scripts/setup.sh

Cloudflare DNS and Tunnel Management Data Schema & Taxonomy

The skill organizes Cloudflare resources using the following metadata structure:

Resource Primary Metadata Key Attributes
Zones Domain Containers Name, ID, Status, Development Mode
DNS Records Zone Entries Type (A, CNAME, etc.), Name, Content, Proxy Status
Tunnels Secure Connectors Name, ID, Created At, Remote Configuration
Ingress Routing Rules Hostname, Service URL, Path Mapping

Cloudflare DNS and Tunnel Management Advanced Features

  • Support for raw JSON output via the --json flag to enable interoperability with other Openclaw Skills.
  • Quiet mode (--quiet) for extracting specific IDs, ideal for piping results into subsequent automation scripts.
  • Integrated Tunnel lifecycle management, including ingress rule configuration and run-token retrieval.
  • Formatted table output for human-readable zone and record auditing.
  • Comprehensive error handling for common API issues like unauthorized access or missing permissions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*