Let's Encrypt certificate auto-renewal in docker-powered HAProxy reverse proxy
sudo su
cd ~
git clone https://github.com/mstipanov/lets-haproxy.git
cd lets-haproxy
mkdir local
./build.sh
./run.sh "$(pwd)/local" 80 443
Existing DNS A records pointing on your public IP for: letstest.example.com and letstest2.example.com
sudo docker exec -it lets-haproxy /add-site.sh your.email@example.com letstest.example.com server1 www.mysite1.com:80
If certificate expires in 15 days or less:
sudo docker exec -it lets-haproxy /renew-certs.sh
If certificate expires in 60 days or less:
sudo docker exec -it lets-haproxy /renew-certs.sh 60
Check haproxy config
sudo docker exec -it lets-haproxy haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg
Show haproxy config
docker exec -it lets-haproxy cat /usr/local/etc/haproxy/haproxy.cfg
- https://github.com/janeczku/haproxy-acme-validation-plugin (thanks janeczku)