Skip to content
local-cert

v0.5.0 · DNS providers, ACME server, six-language console

Trusted HTTPS for machines the Internet can’t reach

local-cert issues and renews real Let's Encrypt certificates for your NAS, hypervisors and internal services. It validates through DNS, so the host at 192.168.1.50 never has to be exposed — and never holds a single DNS credential.

  • Self-hosted, one container
  • SQLite or Postgres
  • Auto-renewal built in

The problem

Your LAN deserves better than a browser warning

Let's Encrypt usually proves you control a name by calling the server behind it. A host on 192.168.x.x can't be called from the Internet, so HTTP-01 and TLS-ALPN-01 are out of the question.

  • Self-signed certificates

    Every device shows a warning, everybody learns to click through it, and nobody notices the day it actually matters.

  • A private CA to babysit

    You have to install your root on every laptop, phone and container — and keep it secret forever.

  • DNS keys on every box

    Running an ACME client with DNS-01 on each host means copying credentials that can rewrite your whole zone onto your least-patched machines.

The fix

One service holds the DNS access. Your hosts just ask.

local-cert is the only thing that touches your DNS zone. It writes the _acme-challenge TXT record, waits until every authoritative name server sees it, lets Let’s Encrypt validate, then cleans up. Hosts get scoped API keys or ACME credentials that work for their domain and nothing else.

  • Publicly trusted certificates — no root to install anywhere
  • Nothing on your LAN exposed to the Internet
  • DNS credentials stored once, encrypted at rest

Features

Everything a fleet of internal hosts needs

From a single home lab to dozens of services across several DNS accounts.

  • DNS-01 on five providers

    AWS Route53, OVHcloud, Gandi LiveDNS, GoDaddy and Google Cloud DNS. Several accounts per host are the normal case.

  • A built-in ACME server

    Point Traefik, Caddy, certbot, acme.sh, lego or cert-manager at /acme/directory with an EAB credential. They keep their usual workflow.

  • REST API with OpenAPI 3.1

    Issue, renew, revoke and download certificates. The spec is generated from the validators, and an in-console explorer sends real requests.

  • MCP server for AI agents

    Agents get the same tools as the API — with the same scopes and the same audit trail. A key can do nothing more over MCP than over curl.

  • Per-domain, scoped access

    Each key carries scopes like cert:issue or cert:export on specific domains. The NAS key cannot issue for the build server.

  • Renewal on autopilot

    Certificates renew ahead of expiry, with a deterministic ±24 h jitter so your whole fleet never hits Let’s Encrypt in the same minute.

  • Least-privilege IAM, generated

    The console writes the IAM policy for exactly your zones, then probes the five Route53 calls it needs before a domain is saved.

  • Secure by construction

    argon2id passwords, private keys encrypted with AES-256-GCM, every mutation in an audit log, webhooks signed with HMAC-SHA256.

  • Watch it happen

    Every issuance streams its events live: order, TXT published, propagation, validation, cleanup. Failures retry with exponential backoff.

How it works

From DNS account to first certificate in four steps

The console guides each step, and its built-in docs reuse your instance’s URLs.

  1. 01

    Declare a DNS provider

    The account that hosts your zone. For AWS, an IAM user with no rights plus a role it can assume — the assistant generates both policies.

  2. 02

    Add a domain

    Pick a zone. local-cert checks it matches the apex you typed and probes every permission it will need. Nothing is saved until it passes.

  3. 03

    Grant access

    Create an API key per host or script, or an EAB credential per ACME client, limited to the domains it should touch.

  4. 04

    Issue

    Through the ACME server or a single API call. Follow the live log, download the PEM, and let renewal take it from there.

Under the hood: one DNS-01 validation

  1. 1The host requests a certificate (API or ACME).
  2. 2local-cert publishes the challenge TXT record.
  3. 3It polls the zone’s authoritative name servers — not a caching resolver — until all of them answer.
  4. 4Let’s Encrypt checks the record and issues the certificate.
  5. 5The TXT record is removed, even if something failed.

Integrations

Works with the DNS you have and the tools you run

Each one has a step-by-step guide in the documentation.

DNS providers

Credentials stored encrypted, or declared through environment variables.

Reverse proxies, platforms & clients

Anything that speaks ACME uses the built-in server; for the rest, the API or a deploy hook.

For developers

Three ways in, one permission model

Whichever door a request comes through, it is checked against the same per-domain scopes and lands in the same audit log.

POST /api/v1/certificates

curl -X POST https://certs.example.com/api/v1/certificates \
  -H "Authorization: Bearer lc_…" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'content-type: application/json' \
  -d '{
    "domains": ["nas.home.example.com"],
    "key_type": "ec-256",
    "auto_renew": true,
    "dns": { "create_record": true, "target_ip": "192.168.1.50" }
  }'

# Follow the issuance live
curl -N -H "Authorization: Bearer lc_…" \
  "https://certs.example.com/api/v1/certificates/$ID/events?stream=1"

202 Accepted right away; follow progress over Server-Sent Events. An Idempotency-Key keeps a client retry from burning a Let’s Encrypt order.

Two strategies

One certificate per host, or one wildcard

Both are supported — tick “Wildcard” in the console.

One certificate per hostOne wildcard
Public A record to the private IPYesNo
CertificatesOne per subdomainA shared *.home.example.com
Let’s Encrypt rate limitReached past ~40 hostsA single order
Internal topology visible in public DNSYesNo
RevocationPer hostAll or nothing

Per-host is simpler and more granular. Switch to a wildcard past a handful of hosts, or if publishing private IPs in a public zone bothers you.

Self-hosted

Runs on your network, on your terms

local-cert holds the private keys of your whole fleet, so it belongs on infrastructure you control.

  • One container — the issuance worker and renewal scheduler run in-process.
  • SQLite or Postgres — one schema, migrations applied at start-up.
  • Setup wizard — or provision the admin account from environment variables.
  • Staging first — the ACME environment follows APP_ENV, so development never burns production rate limits.
  • Every record tagged — a _local-cert TXT marker makes ownership answerable with a plain dig.
docker-compose.yml, trimmed
services:
  app:
    build: .
    ports: ['3000:3000']
    environment:
      MASTER_KEY: ${MASTER_KEY}   # openssl rand -base64 32
      JWT_SECRET: ${JWT_SECRET}   # openssl rand -base64 48
      ACME_EMAIL: ops@example.com
      APP_ENV: production
    volumes:
      - certdata:/app/data

volumes:
  certdata:

FAQ

Questions, answered

What is local-cert?

local-cert is a self-hosted service that obtains and renews publicly trusted Let’s Encrypt certificates for machines on a private network — NAS, hypervisors, internal web apps — using the DNS-01 challenge. It holds the DNS credentials in one place and hands out certificates through a REST API, a built-in ACME server and an MCP server for AI agents.

How is it different from running certbot or acme.sh with DNS-01 on each host?

Those clients need DNS credentials on every machine, and each one can usually rewrite the whole zone. With local-cert the credentials live in a single service, each host gets a key scoped to its own domain, renewals are scheduled centrally, and every issuance is in one audit log. Existing ACME clients keep working: they point at local-cert instead of Let’s Encrypt.

Does my host need to be reachable from the Internet?

No. Validation goes through DNS, not through your host. Only local-cert needs outbound access to your DNS provider’s API and to Let’s Encrypt.

Which DNS providers are supported?

AWS Route53, OVHcloud, Gandi LiveDNS, GoDaddy and Google Cloud DNS. Your domain’s zone must be hosted at one of them; several accounts per provider are supported.

Are these real, publicly trusted certificates?

Yes. They are issued by Let’s Encrypt, so every browser and operating system trusts them out of the box. There is no root certificate to install.

Do I have to publish my private IPs in public DNS?

Only if you want local-cert to create the A record for you. With a wildcard certificate, nothing about your internal topology appears in the zone.

Can Traefik, Caddy or cert-manager use it without changes?

Yes. They point at local-cert’s ACME directory with an EAB credential, as they would with any CA. Their HTTP-01 challenge is fulfilled through DNS-01 behind the scenes.

What about Let’s Encrypt rate limits?

Production allows 50 certificates per registered domain per week. Development instances use the staging environment by default, renewals are spread out with jitter, and a wildcard needs a single order.

Where are private keys stored?

In your database, encrypted with AES-256-GCM. They only leave in clear text through the bundle endpoint, for keys holding the cert:export scope — and every export is logged.

What happens if my DNS account becomes unreachable?

Nothing gets stuck. Deletion revokes and cleans up on a best-effort basis, removes the row anyway, and tells you which records you need to delete by hand.

Put a padlock on every machine in the rack

Deploy local-cert, connect your DNS account, and issue your first certificate in minutes — on staging first.