// Standalone Go Binary & Library • CI/CD Automation
Automating Wildcard SSL with Lego and RFC 2136
Use Lego, the pure Go ACME client and library powering Traefik and Caddy. Perfect for standalone CI/CD runners, Docker builds, and custom Go microservices requiring automated wildcard TLS.
📋 Prerequisites
- An active domain on OnlyDNS.
- A TSIG Key generated in the OnlyDNS Portal or via CLI (
onlydns tsig create --algo hmac-sha256). - Lego binary or Go 1.20+ toolchain.
1
Install Lego CLI
Download the pre-compiled binary for your architecture from GitHub Releases or install via Homebrew / Go:
2
Configure RFC 2136 Environment Variables
Lego reads provider configuration directly from standard environment variables:
🔒 Least-Privilege Security Tip: In the OnlyDNS Portal or REST API, restrict this TSIG key to only update the
_acme_challenge subdomain so Lego only has access to challenge verification records.
3
Issue & Renew Certificates
Run Lego to issue wildcard and apex certificates with Let's Encrypt:
To renew existing certificates via cron or systemd timer, simply substitute run with renew: