Creating Fullchain SSL Certificates with Crtforge
/ 3 min read
Updated:Table of Contents
Overview
In my previous notes on manual certificate generation, I walked through assembling a custom Root CA and Intermediate CA using raw openssl configurations. While manual scripts are instructive for understanding the X.509 standard, repeatedly maintaining config templates, managing serial numbers, and building certificate chains for every internal homelab service quickly becomes tedious.
To eliminate this friction across local development environments and reverse proxies, I wrote crtforge—a self-contained CLI tool written in pure Go (with zero openssl runtime dependencies) that provisions a full multi-tier PKI and issues certbot-style fullchain certificates.
The source code and prebuilt binaries are available on GitHub.
Installing crtforge
Prebuilt binaries are published for Linux and macOS (as well as Windows via WSL):
curl -fsSL -o crtforge "https://github.com/burakberkkeskin/crtforge/releases/latest/download/crtforge-$(uname -s)-$(uname -m)" && \chmod +x crtforge && sudo mv crtforge /usr/local/bin/With a local Go toolchain installed, it can also be installed directly:
go install github.com/burakberkkeskin/crtforge@latestInitializing the Certificate Authority
Under crtforge v2, certificate issuance is organized around named CAs. Initializing a CA generates a self-signed Root CA and its first operational Intermediate CA in one step:
crtforge init --ca labOptionally, an HTTP base URL can be passed via --base-url http://pki.homelab.local to populate CRL Distribution Points (CDP) and Authority Information Access (AIA) extensions for clients that require revocation checking (such as .NET or Java stacks).
Setting export CRTFORGE_CA=lab in your shell profile avoids specifying --ca lab on every subsequent command.
Issuing TLS Certificates
To issue a certificate for an internal service, provide the service name followed by the desired DNS names or IP addresses:
crtforge issue --ca lab webapp homelab.local "*.homelab.local" 192.168.1.50Certbot-Style File Layout
All certificates, keys, and chains are structured under $XDG_DATA_HOME/crtforge (defaulting to ~/.local/share/crtforge/):
~/.local/share/crtforge/ca/lab/certs/webapp/├── fullchain.pem # Leaf + intermediate (Nginx ssl_certificate, Caddy, Traefik)├── privkey.pem # Private key in PKCS #8 format├── cert.pem # Leaf certificate├── chain.pem # Intermediate certificate└── ca.pem # Root CA certificate for client trust storesLeaf validity is automatically capped at 825 days, adhering to the strict lifetime limits enforced by Apple platforms for private trust roots.
Client Trust Store Configuration
To inspect paths, fingerprints, and copy-paste trust store import commands across macOS, Debian/Ubuntu, RHEL/Fedora, and Java truststores:
crtforge inspect --ca labOnce the root certificate ca.pem is imported into the operating system or browser certificate store, all reverse proxies and internal services presenting fullchain.pem serve clean, warning-free TLS connections across the private network.