Skip to content
Back to skills

Cf Tunnel Deploy

ASecurity

Deploy local services to public internet via Cloudflare Tunnel with custom domain. Use when user wants to expose local Docker service to public, set up Cloudflare tunnel, configure cloudflared, or make local service accessible via custom domain. Handles DNS pollution issues, SSL configuration, and Docker Compose integration.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 26, 2026
testingbashdocker

Works with

  • cli

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro scans all 3 files and shows the line behind each finding

Scanned November 26, 2026

npx -y skills add tangchunwu/skill-hub --skill cf-tunnel-deploy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cf Tunnel Deploy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cf Tunnel Deploy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tangchunwu-cf-tunnel-deploy/badge)](https://www.skillsdirectory.com/skills/tangchunwu-cf-tunnel-deploy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cf-tunnel-deploy
description: Deploy local services to public internet via Cloudflare Tunnel with custom domain. Use when user wants to expose local Docker service to public, set up Cloudflare tunnel, configure cloudflared, or make local service accessible via custom domain. Handles DNS pollution issues, SSL configuration, and Docker Compose integration.
---

# Cloudflare Tunnel Deploy

Deploy local services to public internet using Cloudflare Tunnel with custom domain.

## Prerequisites

- Cloudflare account with a domain
- Docker installed
- `cloudflared` CLI installed locally

## Quick Start Workflow

### 1. Login to Cloudflare (one-time)

```bash
cloudflared tunnel login
```

This creates `~/.cloudflared/cert.pem`.

### 2. Create Named Tunnel

```bash
cloudflared tunnel create <tunnel-name>
```

This creates credentials file: `~/.cloudflared/<tunnel-id>.json`

### 3. Create Tunnel Config

Create `~/.cloudflared/config-<service>.yml`:

```yaml
tunnel: <tunnel-id>
credentials-file: /etc/cloudflared/<tunnel-id>.json
protocol: http2

ingress:
  - hostname: <subdomain>.<domain>
    service: http://host.docker.internal:<port>
    originRequest:
      connectTimeout: 180s
      noTLSVerify: true
  - service: http_status:404
```

### 4. Add DNS Route

```bash
cloudflared tunnel route dns -f <tunnel-id> <subdomain>.<domain>
```

### 5. Configure Cloudflare SSL (CRITICAL)

In Cloudflare Dashboard: `SSL/TLS` -> `Overview` -> Set to **Flexible** (not Full).

### 6. Add to Docker Compose

See [references/docker-compose.md](references/docker-compose.md) for template.

## Common Issues & Solutions

See [references/troubleshooting.md](references/troubleshooting.md) for:
- DNS pollution (198.18.x.x fake IPs)
- TLS handshake errors
- 404 from Cloudflare
- host.docker.internal not accessible

## Verification

```bash
# Check tunnel status
cloudflared tunnel list
cloudflared tunnel info <tunnel-name>

# Test via proxy (if DNS polluted locally)
curl -x http://127.0.0.1:<proxy-port> https://<subdomain>.<domain>/health
```

Files in this skill

  • SKILL.md2 KB
  • references/docker-compose.md1.3 KB
  • references/troubleshooting.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in testing →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.