Skip to content

Certificates

Lets Encrypt

Renewing SSL certificates (Expires every 90 days)

#/usr/bin/env bash

export CLOUDFLARE_DNS_API_TOKEN=XXXXXXXX

lego \ 
--email email@domain.com \ 
--dns cloudflare \ 
--domains "domain.com" \ 
--domains "*.domain.com" \ 
--domains "*.dev.domain.com" run

ls .lego/certificates/

Copy .crt and .key to Caddy, HAProxy, Nginx config directory.

sudo chown caddy *.crt sudo chown caddy *.key

lego

Creating pem file for haproxy (octoprint)

cat domain.com.crt domain.com.key > combined.pem