A go rewrite of Porkbun's deprecated certbun utility.
Downloads the certificate chain, private key, and public key for a given domain and sends a status message over HTTP using something like ntfy.
Works with the v3 Porkbun API.
certbun-go <json-config-file>
The configuration is a json file that is passed as the only parameter to the program. Optional fields can be omitted or left as an empty string. All config fields are strings as follows:
endpoint: Porkub API endpoint; It's best to not touch this one (https://api.porkbun.com/api/json/v3)apiKey: Porkbun account API keysecretApiKey: Porkbun secret API keydomain: Domain to fetch certificates for e.g.example.comcertChainPath: File path to write the certificate chain data to (optional)privKeyPath: File path to write the private key to (optional)pubKeyPath: File path to write the public key to (optional)notifyEndpoint: Web endpoint to POST messages to (optional)
Any paths that are left blank will be skipped when the program writes certificate and key data to disk.
An example config has been provided in config.json.example that you can use as a starting point.
Make sure you have a go development environment set up on your computers. Clone the repo, and inside the directory run:
go build .
Easy.