simplydotcom

package module
v0.0.0-...-29e111b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 7 Imported by: ? modules, 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

Simply.com DNS module for Caddy

This package contains a DNS provider module for Caddy. It manages DNS records at Simply.com, so Caddy can solve the ACME DNS-01 challenge (including for wildcard certificates). It wraps libdns/simplydotcom.

Caddy module name

dns.providers.simplydotcom

Building

xcaddy build --with github.com/mtaanquist/caddy-dns-simplydotcom

Or with Docker:

FROM caddy:2-builder AS builder
RUN xcaddy build --with github.com/mtaanquist/caddy-dns-simplydotcom
FROM caddy:2
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

A complete Docker Compose setup (Dockerfile, compose.yaml with the API key as a Compose secret, and a wildcard Caddyfile) is in examples/docker.

Config examples

Create an API key in the Simply.com control panel and pass it to Caddy through a placeholder. Never commit it. Either an environment variable ({env.SIMPLY_API_KEY}) or a file ({file./run/secrets/simply_api_key}, which suits Docker secrets) works.

Per site, inline form:

*.home.example.dk {
	tls {
		dns simplydotcom {env.SIMPLY_API_KEY}
	}

	@arcane host arcane.home.example.dk
	handle @arcane {
		reverse_proxy arcane:3552
	}
}

Block form:

tls {
	dns simplydotcom {
		api_key {env.SIMPLY_API_KEY}
		max_retries 5
	}
}

Globally:

{
	acme_dns simplydotcom {env.SIMPLY_API_KEY}
}

JSON:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "simplydotcom",
				"api_key": "{env.SIMPLY_API_KEY}"
			}
		}
	}
}
Options
Option Description
api_key Simply.com API key. Required; give it inline or in the block, not both.
max_retries Retries on HTTP 429 rate limiting. Positive integer, default 3.

The API endpoint is intentionally not configurable (base_url is rejected). A redirectable endpoint would let a config change send your account-wide API key elsewhere.

Propagation timing

Simply.com takes about a minute to publish a new record on its nameservers (ns1–ns3.simply.com). Caddy's default propagation_timeout of 2 minutes works, but with little margin, so a longer timeout is recommended:

tls {
	dns simplydotcom {env.SIMPLY_API_KEY}
	propagation_timeout 5m
}

Custom resolvers are not needed; Caddy finds and queries Simply.com's authoritative nameservers itself.

Tested

End-to-end tested on 2026-11-29 against Let's Encrypt staging, with Caddy v2.11.9 and libdns/simplydotcom v1.1.0:

Certificate Record visible after Certificate after Challenge record removed
caddytest.mtaanquist.dk ~63 s ~74 s yes
*.caddytest.mtaanquist.dk ~68 s ~76 s yes

No other records in the zone were touched, and the API key did not appear in Caddy's debug logs.

Notes on the underlying provider

A review of libdns/simplydotcom v1.1.0 found nothing blocking. Some minor points that may be worth raising upstream:

  • DeleteRecords converts every record in the zone before matching, so one record it cannot parse makes the whole cleanup fail. An MX record without a priority would cause a panic rather than an error.
  • Rate-limit retries read x-ratelimit-retry-after, not the standard Retry-After header.
  • Provider initialization reads shared state without a lock (a benign data race).
  • The list of domains on the account is cached for the life of the process, so a domain added later needs a Caddy restart.

Development

asdf install                 # Go version from .tool-versions
go test -race ./...
xcaddy build --with github.com/mtaanquist/caddy-dns-simplydotcom=./ --output ./bin/caddy
./bin/caddy list-modules | grep simplydotcom

Contributing and license

Contributions are welcome; see CONTRIBUTING.md. Licensed under the MIT License.

Documentation

Overview

Package simplydotcom implements a Caddy DNS provider module for Simply.com, wrapping github.com/libdns/simplydotcom.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// APIKey is the Simply.com API key. Supports placeholders such as
	// {env.SIMPLY_API_KEY}. Required.
	APIKey string `json:"api_key,omitempty"`

	// MaxRetries is how many times a rate-limited (HTTP 429) request is
	// retried. Must be positive if set. Defaults to the library default (3).
	MaxRetries int `json:"max_retries,omitempty"`
	// contains filtered or unexported fields
}

Provider lets Caddy solve ACME DNS-01 challenges for zones hosted at Simply.com.

The API endpoint is deliberately not configurable: a redirectable endpoint in the certificate path would let a config change send the API key to a third party. Unknown JSON fields (such as base_url) are rejected by Caddy's strict config decoding.

func (*Provider) AppendRecords

func (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)

AppendRecords adds records to the zone and returns the records added.

func (Provider) CaddyModule

func (Provider) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Provider) DeleteRecords

func (p *Provider) DeleteRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)

DeleteRecords deletes matching records from the zone.

func (*Provider) GetRecords

func (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)

GetRecords lists all the records in the zone.

func (*Provider) Provision

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

Provision resolves placeholders, validates the config and builds the underlying libdns provider.

func (*Provider) SetRecords

func (p *Provider) SetRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)

SetRecords sets the records in the zone, creating or updating as needed.

func (*Provider) UnmarshalCaddyfile

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

UnmarshalCaddyfile sets up the provider from Caddyfile tokens. Syntax:

simplydotcom [<api_key>] {
    api_key <api_key>
    max_retries <n>
}

The API key must be given exactly once, either inline or in the block.

Jump to

Keyboard shortcuts

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