← 返回
未分类 Key

Caddy Reverse Proxy

Add, manage, and troubleshoot Caddy reverse proxy routes for local apps via wildcard subdomains.
使用通配符子域名添加、管理和排查本地应用的 Caddy 反向代理路由
brennerspear
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 283
下载
💾 0
安装
1
版本
#latest

概述

Caddy — Wildcard Reverse Proxy for Local Apps

Routes *.YOUR_DOMAIN subdomains to local services over HTTPS via Caddy reverse proxy with automatic Let's Encrypt certificates. Designed for Tailscale-only access (no public exposure).

> DNS provider: This skill uses Vercel DNS for DNS-01 ACME challenges. If you use a different DNS provider, swap the caddy-dns/vercel plugin and TLS snippet for your provider's equivalent (see caddy-dns).

Add a New App

  1. Create a background service (LaunchAgent on macOS, systemd on Linux) — see reference.md for templates
  2. Add to Caddyfile (~/.config/caddy/Caddyfile):

```caddy

appname.YOUR_DOMAIN {

import vercel_tls

reverse_proxy localhost:31XX

}

```

Also add a

  • entry in the dashboard HTML block at the top.

    1. Reload Caddy:

    ```bash

    ~/.local/bin/caddy reload --config ~/.config/caddy/Caddyfile --address localhost:2019

    ```

    TLS cert provisioning takes 30–60 seconds (DNS-01 challenge).

    1. If it connects to OpenClaw Gateway — see OPENCLAW.md in this folder for gateway-specific config.

    Quick Dev Servers

    Companion skill: dev-serve — one-command dev server + Caddy routing.

    dev-serve up ~/projects/myapp        # → https://myapp.YOUR_DOMAIN
    dev-serve down myapp
    dev-serve ls
    

    Reload / Restart

    # Reload config (no restart, no sudo)
    ~/.local/bin/caddy reload --config ~/.config/caddy/Caddyfile --address localhost:2019
    
    # Full restart
    # macOS:
    sudo launchctl unload /Library/LaunchDaemons/com.caddyserver.caddy.plist
    sudo launchctl load /Library/LaunchDaemons/com.caddyserver.caddy.plist
    # Linux:
    systemctl --user restart caddy
    

    Troubleshoot

    • Cert not issuing: tail -50 /var/log/caddy-error.log | grep -i error — likely expired Vercel API token
    • DNS not resolving: dig +short appname.YOUR_DOMAIN — should return your Tailscale IP
    • TLS error (curl exit 35): Cert hasn't provisioned yet, wait 30-60s

    For full reference (example apps, key files, build instructions): see reference.md.

    For OpenClaw gateway integration: see OPENCLAW.md.

  • 版本历史

    共 1 个版本

    • v1.0.0 当前
      2026-05-12 05:52 安全 安全

    安全检测

    腾讯云安全 (Keen)

    安全,无风险
    查看报告

    腾讯云安全 (Sanbu)

    安全,无风险
    查看报告

    🔗 相关推荐

    data-analysis

    Self Reflection

    brennerspear
    定期自我反思近期工作,分析成功与不足之处,将简洁可操作的见解写入相应工作区。
    ★ 0 📥 2,398
    data-analysis

    Flights

    brennerspear
    通过谷歌航班搜索机票。查询直飞或中转航班,按时间和舱位筛选,获取预订链接。支持城市名称。
    ★ 1 📥 3,800
    developer-tools

    Vercel

    brennerspear
    部署和管理 Vercel 项目,包括关联仓库、环境变量和域名。
    ★ 0 📥 3,040