本文へスキップ

Caddy DNS Cloudflare

メンテナンス中
caddy-dns/cloudflare

Cloudflare で DNS レコードを管理するための Caddy モジュール。

GitHub で見る
スター
1014
フォーク
121
ウォッチ
1014
未解決の Issue
13

この紹介文は現在英語版のみです。

Caddy DNS Cloudflare is a DNS provider module for Caddy that enables automatic DNS record management with Cloudflare. It’s particularly useful for automating SSL certificate management through ACME DNS challenges.

Key Features

  • Automatic DNS record management for Cloudflare
  • Support for ACME DNS challenges
  • Flexible authentication options
  • Secure API token management
  • Easy integration with Caddy server

Configuration Options

This module provides two ways to configure API tokens:

  1. Separate Zone and DNS Tokens

    • Zone Token: Zone.Zone:Read permission for All zones
    • DNS Token: Zone.DNS:Edit permission for specific domains
  2. Single API Token

    • API Token: Zone.Zone:Read and Zone.DNS:Edit permissions for All zones

Quick Start

JSON Configuration

{
    "module": "acme",
    "challenges": {
        "dns": {
            "provider": {
                "name": "cloudflare",
                "api_token": "{env.CF_API_TOKEN}"
            }
        }
    }
}

Caddyfile Configuration

Using Dual Keys

tls {
    dns cloudflare {
        zone_token {env.CF_ZONE_TOKEN}
        api_token {env.CF_API_TOKEN}
    }
}

Using Single Key

tls {
    dns cloudflare {env.CF_API_TOKEN}
}

Troubleshooting

Common Issues

  1. Invalid request headers

    • Ensure your API token is properly set in the environment variables
    • Verify the token has the correct permissions
  2. DNS propagation timeout

    • Check if the _acme-challenge TXT record is created in Cloudflare
    • Consider using Cloudflare’s DNS resolver (1.1.1.1)
    {
        "resolvers": ["1.1.1.1"]
    }

Documentation

For more detailed information, please refer to the Caddy Documentation.

Contributing

Contributions are welcome! Please ensure:

  1. Code follows Go standard formatting
  2. Tests are added for new features
  3. Documentation is updated accordingly

License

This project is licensed under the Apache License 2.0.

共通のカテゴリとタグで順位付けした、似たオープンソースプロジェクトです。

すべての DevOps プロジェクト →