acme.sh
A pure Unix shell script implementing ACME client protocol
.... Docker ready. IPv6 ready. Cron job notifications for renewal or error etc. It's probably the easiest & smartest shell script to automatically issue & renew the free certificates. After the cert is generated, you probably want to install/copy the cert to your Apache/Nginx or other servers. The ownership and permission info of existing files are preserved. You can pre-create the files to define the ownership and permission.