selectel

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 6 Imported by: 0

README

Selectel DNS v2 module for Caddy

This package contains a DNS provider module for Caddy. It manages DNS records via the Selectel DNS v2 API.

Caddy module name

dns.providers.selectel

Config examples

Caddyfile
# Globally (all sites)
{
	acme_dns selectel {
		user        {env.SELECTEL_USER}
		password    {env.SELECTEL_PASSWORD}
		account_id  {env.SELECTEL_ACCOUNT_ID}
		project_name {env.SELECTEL_PROJECT_NAME}
	}
}
# Per site
tls {
	dns selectel {
		user        {env.SELECTEL_USER}
		password    {env.SELECTEL_PASSWORD}
		account_id  {env.SELECTEL_ACCOUNT_ID}
		project_name {env.SELECTEL_PROJECT_NAME}
	}
}
JSON
{
  "module": "acme",
  "challenges": {
    "dns": {
      "provider": {
        "name": "selectel",
        "user": "SELECTEL_USER",
        "password": "SELECTEL_PASSWORD",
        "account_id": "SELECTEL_ACCOUNT_ID",
        "project_name": "SELECTEL_PROJECT_NAME"
      }
    }
  }
}

Required directives

Directive Description
user Selectel service-user login.
password Selectel service-user password.
account_id Selectel account ID (domain name).
project_name Selectel project name that owns the DNS zones.

All values support the {env.VAR} placeholder syntax.

Optional directives

Directive Description
enable_debug_logging Enables verbose DEBUG-level log output for all DNS operations (bare flag = true). Accepts an optional value: true, false, 1, 0, or an env placeholder that resolves to one of these (e.g. {env.SELECTEL_DEBUG}).
Debug logging

When enable_debug_logging is set, all provider messages (INFO, ERROR, and DEBUG) flow through Caddy's configured logging system at the debug level. Caddy's own log level setting controls whether they are emitted. The severity of each message is preserved as a [INFO] / [ERROR] / [DEBUG] prefix inside the message text.

{
    log {
        level DEBUG
    }
    acme_dns selectel {
        user        {env.SELECTEL_USER}
        password    {env.SELECTEL_PASSWORD}
        account_id  {env.SELECTEL_ACCOUNT_ID}
        project_name {env.SELECTEL_PROJECT_NAME}
        enable_debug_logging
    }
}

Credentials

This module requires a Selectel service user with access to the project that owns the DNS zones.

The Selectel DNS v2 API uses a project-scoped IAM token (Keystone v3). The module obtains and automatically refreshes this token — you only need to supply the service-user credentials above.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *selectel.Provider }

Provider lets Caddy read and manipulate DNS records hosted by Selectel.

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 parses the provider configuration from a Caddyfile block.

Supported directives:

user              <value>
password          <value>
account_id        <value>
project_name      <value>
enable_debug_logging [true|false|1|0]

All values support the {env.VAR} placeholder syntax.

Jump to

Keyboard shortcuts

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