nameocean

package module
v0.1.0 Latest Latest
Warning

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

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

NameOcean module for Caddy

This package contains a DNS provider module for Caddy. It manages DNS records in NameOcean DNS zones, so Caddy can get certificates through the ACME DNS-01 challenge (wildcards, servers that are not reachable from the internet).

Caddy module name

dns.providers.nameocean

Building

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

Config examples

You need a NameOcean API key with the dns:read and dns:write scopes (Dashboard → API). It can be limited to the zones Caddy serves and to your server's IP addresses. The domain's zone must be on NameOcean DNS in the same account.

Caddyfile, for one site:

*.example.com, example.com {
	tls {
		dns nameocean {env.NAMEOCEAN_API_KEY}
	}
	respond "hello"
}

or globally:

{
	acme_dns nameocean {env.NAMEOCEAN_API_KEY}
}

The block form takes api_key and base_url:

dns nameocean {
	api_key {env.NAMEOCEAN_API_KEY}
}

With no key in the config, the NAMEOCEAN_API_KEY environment variable is used.

JSON:

{
	"module": "acme",
	"challenges": {
		"dns": {
			"provider": {
				"name": "nameocean",
				"api_key": "{env.NAMEOCEAN_API_KEY}"
			}
		}
	}
}

Caveats (TTL rounding to 5m/15m/30m/1h/1d and so on) are in libdns/nameocean.

Documentation

Overview

Package nameocean is a Caddy module, dns.providers.nameocean, for NameOcean DNS (https://nameocean.net/dns/). With it Caddy can solve ACME DNS-01 challenges (wildcard certificates) on zones hosted at NameOcean.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{ *libdnsnameocean.Provider }

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

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 replaces placeholders such as {env.NAMEOCEAN_API_KEY} in the configuration. Implements caddy.Provisioner.

func (*Provider) UnmarshalCaddyfile

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

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

nameocean [<api_key>] {
    api_key <api_key>
    base_url <url>
}

Without an API key the NAMEOCEAN_API_KEY environment variable is used.

Jump to

Keyboard shortcuts

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