regfish

package module
v0.0.0-...-d13374e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

regfish module for Caddy

This package contains a DNS provider module for Caddy. It can be used to manage DNS records with regfish.

Caddy module name

dns.providers.regfish

Config examples

To use this module for the ACME DNS challenge, configure the ACME issuer in your Caddy JSON like so:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "regfish",
				"api_key": "REGFISH_API_KEY"
			}
		}
	}
}

or with the Caddyfile:

# globally
{
	acme_dns regfish {
		api_key {env.REGFISH_API_KEY}
	}
}
# one site
tls {
	dns regfish {
		api_key {env.REGFISH_API_KEY}
	}
}

api_token is accepted as an alias for api_key, in the Caddyfile and in JSON.

Record TTL

Caddy sends no TTL for the challenge record unless you configure one, and regfish then applies its default of 86400 seconds (24 hours). The record is removed once the challenge has completed, so issuance works either way. To keep the lifetime of the challenge record short, set dns_ttl (regfish accepts 60 seconds or more):

tls {
	dns regfish {
		api_key {env.REGFISH_API_KEY}
	}
	dns_ttl 60s
}

Building

Build Caddy with this module using xcaddy:

xcaddy build --with github.com/caddy-dns/regfish

Go 1.26 or newer is required.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *regfish.Provider }

Provider lets Caddy read and manipulate DNS records hosted by this DNS provider.

func (Provider) CaddyModule

func (Provider) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Provider) Provision

func (p *Provider) Provision(ctx caddy.Context) error

Provision sets up the module. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

func (p *Provider) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the DNS provider from Caddyfile tokens. Syntax:

regfish {
    api_key <api_key>
}

func (*Provider) UnmarshalJSON

func (p *Provider) UnmarshalJSON(data []byte) error

UnmarshalJSON reads the module configuration. The API key is accepted under "api_token" and "api_key". "APIToken" is accepted as well: it was the only working key before the provider carried a JSON tag, so configurations written for earlier versions keep working. Unknown keys are rejected, as Caddy does for every module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址