Certbot and HAProxy + automated .well-known ACME renewal

Links nginx.conf gist https://gist.github.com/patmandenver/… haproxy.cfg (initial) https://gist.github.com/patmandenver/… letsencrypt command https://gist.github.com/patmandenver/… certbot https://github.com/certbot/certbot eff certbot https://certbot.eff.org/ nginx.conf for letsencrypt https://gist.github.com/patmandenver/… haproxy.cfg w/letsencrypt https://gist.github.com/patmandenver/… Lets Encrypt Scripts Someone elses https://gist.github.com/thisismitch/7… mine https://gist.github.com/patmandenver/… Final haproxy.cfg https://gist.github.com/patmandenver/…

Debian cloud-init userdata

When you spin up a cloud VM at Google Compute or Digital Ocean there’s an option to specify user data, this is my goto script to update Debian and setup a  2G swapfile.

#!/usr/bin/env bash
dd if=/dev/zero of=/swap bs=1M count=2048
chmod 600 /swap
mkswap /swap
swapon /swap
echo "/swap swap swap defaults 0 0" >> /etc/fstab
apt update
apt -y upgrade
shutdown -r now