Skip to content

TurtleIdiot/certbun-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

certbun-go

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.

Usage

certbun-go <json-config-file>

Configuration

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 key
  • secretApiKey: Porkbun secret API key
  • domain: Domain to fetch certificates for e.g. example.com
  • certChainPath: 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.

Building

Make sure you have a go development environment set up on your computers. Clone the repo, and inside the directory run:

go build .

Easy.

Packages

 
 
 

Contributors

Languages