a simple tool to manage domain names
10K+
A simple tool to maintain domain names in order to allow On Demand TLS for Caddy2.
(daily built)
latestlatest-fedora44, latest-fedoralatest-ubuntu24, latest-ubuntu26, latest-ubuntuWhile it is strongly recommended to update, older versions wont be removed from the registry - for now.
If you prefer to stick with older versions, you might want to mirror them to your own registry.
Here's a full but very condensed example:
MARIADB_ROOT_PASSWORD=$(docker run -q --rm alpine/openssl rand -hex 20)
MARIADB_PASS=$(docker run -q --rm alpine/openssl rand -hex 20)
docker network create domain-mgmt
docker run -d --name mariadb --network domain-mgmt \
-v mariadb_data:/var/lib/mysql:Z \
-e MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD} \
-e MARIADB_USER=domain-mgmt \
-e MARIADB_PASSWORD=${MARIADB_PASS} \
-e MARIADB_DATABASE=domain_mgmt \
mariadb:latest
docker run -d --name domain-mgmt --network domain-mgmt -p 127.0.0.1:8080:8080 \
-e "DATABASE_URL=mysql://domain-mgmt:${MARIADB_PASS}@mariadb:3306/domain_mgmt" \
saarphil/domain-mgmt:latest
Configure Caddy
{
on_demand_tls {
ask http://127.0.0.1:8080/api/query
}
}
(ondemandtls) {
tls {
on_demand
}
}
mgmt.domain:443 {
# protect this endpoint
reverse_proxy http://127.0.0.1:8080
}
*.customers.domain:443 {
import ondemandtls
...
}
Manage your domains
curl -X PUT "http://localhost:8080/api/domains" -H 'Content-Type: application/json' -d '{"name": "example.tld"}'
curl -X GET "http://localhost:8080/api/domain/1" -H 'Content-Type: application/json'
curl -X POST "http://localhost:8080/api/domain/1" -H 'Content-Type: application/json' -d '{"name": "sub.example.tld"}'
curl -X DELETE "http://localhost:8080/api/domain/1" -H 'Content-Type: application/json'
curl -X GET "http://localhost:8080/api/domains?offset=0&limit=10" -H 'Content-Type: application/json'
Be aware it's crucial to not end with trailing slashes (/) otherwise the server responds with a 404.
Content type
Image
Digest
sha256:906406385…
Size
70.1 MB
Last updated
about 19 hours ago
docker pull saarphil/domain-mgmt