Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ gocert Public

GoCert Manager is a lightweight daemon that automates TLS certificate issuance and renewal using acme.sh, with state tracking via SQLite and simple YAML configuration. Designed to run as a container to keep certificates always valid.

License

Notifications You must be signed in to change notification settings

frnimh/gocert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocert

A tool for managing certificates and related services using Docker Compose.

Setup

Prerequisites

Installation

  1. Clone the repository:
git clone <repo-url>
cd gocert
  1. Place your domains and configs in certs.yaml and API keys as variables in docker-compose.yaml file.
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

  1. Start the services:
docker-compose up -d
  1. Check running containers:
docker-compose ps

Configuration

  • docker-compose.yaml: Defines the services, networks, and volumes.
  • certs.yaml: Contains certificate configuration (domains, issuer, etc).

Checking Details

  1. 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

Technical Documentation

Overview

main.go is the entry point for the gocert tool. It initializes the application, loads configuration, and starts the certificate management process.

Main Features

  • Loads configuration from certs.yaml
  • Initializes Docker Compose services
  • Manages certificate lifecycle (creation, renewal, etc)
  • Provides logging for operations

Usage

Run the tool:

go run main.go

Or build and run:

go build -o gocert
./gocert

Main Components

  • 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.

About

GoCert Manager is a lightweight daemon that automates TLS certificate issuance and renewal using acme.sh, with state tracking via SQLite and simple YAML configuration. Designed to run as a container to keep certificates always valid.

Resources

License

Stars

Watchers

Forks

Packages