A tool for managing certificates and related services using Docker Compose.
- Docker
- Docker Compose
docker-compose.yamlandcerts.yamlfiles in the project directory
- Clone the repository:
git clone <repo-url>
cd gocert- Place your domains and configs in
certs.yamland API keys as variables indocker-compose.yamlfile.
configs:
email: [email protected]
test:
domains:
- "example.com"
- "*.example.com"
issuer: "zerossl"
type: "dns_aws"email for some CA Providers e.g: zerossl you need to set an Email Address.
domains list the Domains that you want the Specific cert for, it cloud be wildcard Domains too.
issuer is your TLS Provider (CA) shortname or URL, check out acme.sh docs for more information. Link
type your DNS Provider API in acme.sh, checkout acme.sh docs for more information. Link
dns_* you need to set your keys as Variables in docker-compose.yaml, check sample compose file in this repo; and read acme.sh docs for more information. Link
- Start the services:
docker-compose up -d- Check running containers:
docker-compose psdocker-compose.yaml: Defines the services, networks, and volumes.certs.yaml: Contains certificate configuration (domains, issuer, etc).
- Get more Details about your certs
you can run gocert status to get more details about your certificates.
NAME STATUS ISSUED EXPIRES REMAINING TLS PROVIDER DNS PROVIDER
---- ------ ------ ------- --------- ------------ ------------
test issued 2025-07-19 2025-10-17 89 days zerossl dns_aws
main.go is the entry point for the gocert tool. It initializes the application, loads configuration, and starts the certificate management process.
- Loads configuration from
certs.yaml - Initializes Docker Compose services
- Manages certificate lifecycle (creation, renewal, etc)
- Provides logging for operations
Run the tool:
go run main.goOr build and run:
go build -o gocert
./gocert- Config Loader: Reads and parses
certs.yaml - Docker Manager: Interfaces with Docker Compose to manage services
- Certificate Handler: Handles certificate operations
For more details, review the source code in main.go.