Using letsencrypt with postgresql
I've found this article to be quite useful. Assuming you know how PostgreSQL HBA generally works (i.e., how pg_hba.conf and postgresql.conf work), you do the following:


start up certbot and have letsencrypt generate the cert where it
typically does create a script to let letsencrypt copy renewed
certs and keys to $PGDATA make sure postgresql.conf and
pg_hba.conf are configured properly restart Postgres. done