Git Product home page Git Product logo

tls.dns's Introduction

DNS Providers for Caddy

This repository is for Caddy modules in the tls.dns namespace (DNS challenge solvers).

Generally, these are simply config wrappers over go-acme/lego's DNS providers. We need your help to finish adding all 60+ providers (see below)!

Using them in Caddy

First plug in your desired provider module and then configure the DNS challenge in your Caddy JSON, for example:

{
	"challenges": {
		"dns": {
			"provider": "cloudflare",
			"api_token": "secret"
		}
	}
}

If you prefer, you can set the provider configuration using environment variables. See the go-acme/lego documentation to know which variables to set for which providers. (You still have to at least enable the DNS challenge for your provider in the JSON, though. You can use env vars for credentials, etc.) Parameters that you set via env variables can be omitted from the JSON.

Adding new providers

go-acme/lego supports dozens of DNS providers, and Caddy can use all of them too, but a thin wrapper layer (abstraction) is required. The wrapper's job is simply to get a config from the environment from the lego provider package, then set any config fields that are explicitly configured (overriding those from the environment).

  • If lego does not already support your DNS provider: it is probably best to first submit the implementation to lego via pull request. (It could live anywhere, but might as well contribute it back to the core lib, right?) Once lego supports it, it is easy for Caddy to use it.

  • If lego already supports your DNS provider: make sure it has a NewConfigFromEnv() function, otherwise you will not be able to set credentials in environment variables. We require that all our wrappers support loading config from the environment. Not all providers in lego support this yet, so you may need to submit a pull request to lego first.

  • If your provider in lego already has a NewConfigFromEnv() function: then simply copy one of the existing provider packages in this repo and change it to work with your provider. Then submit a pull request to this repo. Please be sure the wrapper calls NewConfigFromEnv() in order to support credentials from environment variables!

Thanks for contributing!

tls.dns's People

Contributors

mholt avatar sahoahfoa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.