Ubuntu 16.04 & 18.04

Install Certbot package. Available standard repository.

Ubuntu 16.04

$ sudo apt install letsencrypt python-letsencrypt-apache
Ubuntu 18.04
$ sudo apt install letsencrypt python-certbot-apache
install certbot command. Ubuntu 16.04 only.
# wget https://dl.eff.org/certbot-auto
# mv certbot-auto certbot
# chmod a+x 
# mv certbot /usr/bin


Before execution ‘certbot’, rewrite apache module must be available.

# a2enmod rewrite


1st time recommended command is

# certbot run --apache --dialog

This command is able to find non ssl web setting and auto update certificate and chain by reading /etc/apache2/sites-available directory. And also is fixes virtual host configuration files. And then restarting apache.

# systemctl restart apache2.service



Renewal certification file, certbot-auto command.
# certbot renew --post-hook "systemctl restart apache2.service"

also available cron daemon setting.

example file, letsencrypt  can be put on /etc/cron.monthly/ ,


# update (renew) cert.
/usr/bin/certbot renew --post-hook "systemctl restart apache2.service"

/root/bin/ is certbot-auto install directly. If you changed, you must fix it.


Japanese “Let’s Encrypt” site is https://letsencrypt.jp/.