{"id":33857,"date":"2020-08-21T14:08:21","date_gmt":"2020-08-21T19:08:21","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=33857"},"modified":"2022-10-03T08:33:19","modified_gmt":"2022-10-03T13:33:19","slug":"how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/","title":{"rendered":"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-34055\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg\" alt=\"\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>In this article, we will show you how to install the Let\u2019s Encrypt client on your <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu 20.04 VPS<\/a>, issue an SSL certificate for your domain, and configure it with the Apache webserver.<\/p>\n<p><img decoding=\"async\" class=\"alignright size-full wp-image-34057\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/configure-lets-encrypt-ssl-certificate-with-apache-on-ubuntu-20-04-vps.jpg\" alt=\"\" width=\"120\" height=\"120\" \/>Let\u2019s Encrypt is a certificate authority organization (CA) that allows anyone to obtain a free SSL certificate with simple and automated commands. In this tutorial, we will use a tool called <code>certbot<\/code>, which is an official part of EFF&#8217;s effort to encrypt the entire Internet. Thanks to this convenient tool, setting up an SSL certificate to protect your website&#8217;s visitors and improve your website&#8217;s security has never been easier. All <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-purchase-an-ssl-certificate-from-rosehosting-com\/\">SSL certificates<\/a> provided by Let&#8217;s Encrypt can be used for production\/commercial purposes without any costs or fees. Let&#8217;s begin with the installation and setup.<!--more--><\/p>\n<p>Let&#8217;s start with the installation &#8211; it is a simple installation and will not take long.<\/p>\n<h3>Prerequisites<\/h3>\n<ul>\n<li>For the purposes of this tutorial, we will use an Ubuntu 20.04 VPS.<\/li>\n<li>User with sudo privileges or full SSH root access is required. All of our VPSes come with root access.<\/li>\n<li>A valid domain name pointed to your server\u2019s IP address. In this tutorial, we will use <code>domain.com<\/code> as an example.<\/li>\n<\/ul>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69c4ff306b2a6\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69c4ff306b2a6\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#1-Connect-to-your-Server\" >1. Connect to your Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#2-Install-the-Apache2-Web-Server\" >2. Install the Apache2 Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#3-Configure-the-Apache-Virtual-Host\" >3. Configure the Apache Virtual Host<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#4-Install-Certbot\" >4. Install Certbot<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#5-Generate-a-Free-Lets-Encrypt-SSL-Certificate\" >5. Generate a Free Let\u2019s Encrypt SSL Certificate<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#6-Verifying-Certbot-Auto-Renewal\" >6. Verifying Certbot Auto-Renewal<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1-Connect-to-your-Server\"><\/span>1. Connect to your Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before we begin, you need to connect to your server via SSH as the root user. To do this, use the following command:<\/p>\n<pre>ssh root@IP_ADDRESS -p PORT_NUMBER<\/pre>\n<p>of course, you will need to replace <code>IP_ADDRESS<\/code> and <code>PORT_NUMBER<\/code> with your actual server IP address and SSH port number.<\/p>\n<p>Once logged in, make sure that your server is up-to-date by running the following commands:<\/p>\n<pre>sudo apt update\r\nsudo apt upgrade<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"2-Install-the-Apache2-Web-Server\"><\/span>2. Install the Apache2 Web Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>We chose to use one of the most popular web servers in our article. We will be installing Apache2 since we need a web server on which to install the free Let&#8217;s Encrypt SSL certificate. There&#8217;s no point in having an SSL certificate without any web pages. Find out about some of the best <a href=\"https:\/\/www.rosehosting.com\/blog\/free-lets-encrypt-ssl-certificate-alternatives\/\">free Let&#8217;s Encrypt alternatives<\/a>.<\/p>\n<p>Execute the following command to install Apache2:<\/p>\n<pre>sudo apt install apache2<\/pre>\n<p>Once Apache2 is installed on your server, you will be able to use the commands below to start, stop, and enable the service. We recommend enabling it so that Apache can start up automatically whenever your server reboots.<\/p>\n<pre>sudo systemctl stop apache2.service\r\nsudo systemctl start apache2.service\r\nsudo systemctl enable apache2.service<\/pre>\n<p>To confirm that you have properly installed Apache2, you can open your preferred web browser and type your server IP address or your domain (we assume it is pointed to your server) and you should be able to view the Apache2 Ubuntu Default Page.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3-Configure-the-Apache-Virtual-Host\"><\/span>3. Configure the Apache Virtual Host<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Since you now have Apache installed on your server, we can continue and show you how to create a virtual host for the domain that you want to use. We will use nano as our editor, but if you do not prefer nano, you can use any editor of your choice and create a new configuration file called <code>domain.com.conf<\/code>.<\/p>\n<pre>sudo nano \/etc\/apache2\/sites-available\/domain.com.conf<\/pre>\n<p>Then paste the configuration from below into the file, and replace all occurrences of\u00a0<code>domain.com<\/code> with your actual domain name.<\/p>\n<pre>&lt;VirtualHost *:80&gt;\r\n\r\nDocumentRoot \/var\/www\/html\/domain.com\r\nServerName domain.com\r\nServerAlias www.domain.com\r\n\r\n&lt;Directory \/var\/www\/html\/domain.com\/&gt;\r\nOptions FollowSymlinks\r\nAllowOverride All\r\nRequire all granted\r\n&lt;\/Directory&gt;\r\n\r\nErrorLog ${APACHE_LOG_DIR}\/error.log\r\nCustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>After you have finished with editing the file, save and close it.<\/p>\n<p>Once you have configured the virtual host, you can enable it by executing the following commands.<\/p>\n<p>Disable the default preinstalled virtual host with:<\/p>\n<pre>sudo a2dissite 000-default<\/pre>\n<p>then, enable the <code>domain.com<\/code> virtual host:<\/p>\n<pre>sudo a2ensite domain.com.conf<\/pre>\n<p>also, you need to make sure that the mod <code>rewrite<\/code> is enabled:<\/p>\n<pre>sudo a2enmod rewrite<\/pre>\n<p>Restart Apache so the changes will take effect.<\/p>\n<pre>sudo systemctl restart apache2.service<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4-Install-Certbot\"><\/span>4. Install Certbot<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>As mentioned earlier, we will be using Certbot so that we can get a free SSL certificate from Let&#8217;s Encrypt. To install this useful tool, we need to enable the <code>universe<\/code> repository:<\/p>\n<pre>sudo apt install software-properties-common\r\nsudo add-apt-repository universe\r\nsudo apt update<\/pre>\n<p>Run this command on the command line on the machine to install Certbot.<\/p>\n<pre>sudo apt install certbot python3-certbot-apache<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"5-Generate-a-Free-Lets-Encrypt-SSL-Certificate\"><\/span>5. Generate a Free Let\u2019s Encrypt SSL Certificate<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are many ways to obtain an SSL certificate with Certbot. We will use the Apache plugin, which will take care of reconfiguring Apache&#8217;s Virtual Host and will reload the new configuration for us. You can run the following command to use the plugin:<\/p>\n<pre>sudo certbot --apache<\/pre>\n<p>Using this script, you need to answer a series of questions and provide an email address. In the first step, you need to type a valid email address. The email address is required for notifications and security notices regarding your website&#8217;s certificate:<\/p>\n<pre>Output:\r\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\r\nPlugins selected: Authenticator apache, Installer apache\r\nEnter email address (used for urgent renewal and security notices) (Enter 'c' to\r\ncancel): you@domain.com<\/pre>\n<p>The next step is to confirm that you agree to the Let\u2019s Encrypt terms of service. If you want to confirm, just type A and then press [ENTER]:<\/p>\n<pre>Output:\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nPlease read the Terms of Service at\r\nhttps:\/\/letsencrypt.org\/documents\/LE-SA-v1.2-November-15-2017.pdf. You must\r\nagree in order to register with the ACME server at\r\nhttps:\/\/acme-v02.api.letsencrypt.org\/directory\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n(A)gree\/(C)ancel: A<\/pre>\n<p>If you want to share the provided email address with the EFF (Electronic Frontier Foundation) to receive news and other information, you can type Y. If you do not want to receive this type of email, you can type N and submit your answer by typing [ENTER].<\/p>\n<pre>Output:\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nWould you be willing to share your email address with the Electronic Frontier\r\nFoundation, a founding partner of the Let's Encrypt project and the non-profit\r\norganization that develops Certbot? We'd like to send you email about our work\r\nencrypting the web, EFF news, campaigns, and ways to support digital freedom.\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n(Y)es\/(N)o: N<\/pre>\n<p>Now you need to select the domain you would like to activate HTTPS for. The domains and subdomains listed on your command prompt are automatically obtained from your Apache virtual host configuration. Type the numbers separated by commas and\/or spaces, or if you&#8217;d like to enable HTTPS for all of the domains or subdomains, you can leave the prompt blank. Either way, you then press [ENTER] to proceed to the next step.<\/p>\n<pre>Output:\r\nWhich names would you like to activate HTTPS for?\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n1: domain.com\r\n2: www.domain.com\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nSelect the appropriate numbers separated by commas and\/or spaces, or leave input\r\nblank to select all options shown (Enter 'c' to cancel):<\/pre>\n<p>The output will be similar to this:<\/p>\n<pre>Output:\r\nObtaining a new certificate\r\nPerforming the following challenges:\r\nhttp-01 challenge for domain.com\r\nhttp-01 challenge for www.domain.com\r\nWaiting for verification...\r\nCleaning up challenges\r\nCreated an SSL vhost at \/etc\/apache2\/sites-available\/domain.com-le-ssl.conf\r\nDeploying Certificate to VirtualHost \/etc\/apache2\/sites-available\/domain.com-le-ssl.conf\r\nEnabling available site: \/etc\/apache2\/sites-available\/domain.com-le-ssl.conf<\/pre>\n<p>Certbot provides HTTPS redirection as an option that you can enable. In this step, the script will prompt you to select if you want the entire HTTP traffic to be redirected to HTTPS or to keep the current configuration. Select 1 if you do not want redirection or 2 to enable redirection, then press [ENTER].<\/p>\n<pre>Output:\r\nPlease choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n1: No redirect - Make no further changes to the webserver configuration.\r\n2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for\r\nnew sites, or if you're confident your site works on HTTPS. You can undo this\r\nchange by editing your web server's configuration.\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nSelect the appropriate number [1-2] then [enter] (press 'c' to cancel): 2<\/pre>\n<p>Great job. Your SSL certificate is now installed and loaded in the Apache configuration. You will see output similar to the following:<\/p>\n<pre>Output:\r\nRedirecting vhost in \/etc\/apache2\/sites-enabled\/domain.com.conf to ssl vhost in \/etc\/apache2\/sites-available\/domain.com-le-ssl.conf\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nCongratulations! You have successfully enabled https:\/\/domain.com\r\n\r\nYou should test your configuration at:\r\nhttps:\/\/www.ssllabs.com\/ssltest\/analyze.html?d=domain.com\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n\r\nIMPORTANT NOTES:\r\n- Congratulations! Your certificate and chain have been saved at:\r\n\/etc\/letsencrypt\/live\/domain.com\/fullchain.pem\r\nYour key file has been saved at:\r\n\/etc\/letsencrypt\/live\/domain.com\/privkey.pem\r\nYour cert will expire on 2021-09-09. To obtain a new or tweaked\r\nversion of this certificate in the future, simply run certbot again\r\nwith the \"certonly\" option. To non-interactively renew *all* of\r\nyour certificates, run \"certbot renew\"\r\n- Your account credentials have been saved in your Certbot\r\nconfiguration directory at \/etc\/letsencrypt. You should make a\r\nsecure backup of this folder now. This configuration directory will\r\nalso contain certificates and private keys obtained by Certbot so\r\nmaking regular backups of this folder is ideal.\r\n- If you like Certbot, please consider supporting our work by:\r\n\r\nDonating to ISRG \/ Let's Encrypt: https:\/\/letsencrypt.org\/donate\r\nDonating to EFF: https:\/\/eff.org\/donate-le<\/pre>\n<p>To verify that your new SSL certificate is set up correctly, visit <code>https:\/\/domain.com\/<\/code> in your web browser and check for the green lock icon in the URL bar. You can also use an external website or tools to check if your SSL certificate is installed properly.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"6-Verifying-Certbot-Auto-Renewal\"><\/span>6. Verifying Certbot Auto-Renewal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>SSL certificates provided by Let&#8217;s Encrypt are valid only for 90 days. The Certbot we have installed will set a cronjob that will take care of renewing any SSL certificate that is within thirty days of expiration. To check the status of this service, you can execute the command:<\/p>\n<pre>sudo systemctl status certbot.timer<\/pre>\n<pre>Output:\r\n\u25cf certbot.timer - Run certbot twice daily\r\nLoaded: loaded (\/lib\/systemd\/system\/certbot.timer; enabled; vendor preset: enabled)\r\nActive: active (waiting) since Thu 2021-06-11 11:33:00 UTC; 1h 37min ago\r\nTrigger: Thu 2021-06-11 15:52:01 UTC; 2h 41min left\r\nTriggers: \u25cf certbot.service<\/pre>\n<p>or you can list all of the timers with:<\/p>\n<pre>sudo systemctl list-timers<\/pre>\n<p>You can test automatic renewal for your certificates by executing this command:<\/p>\n<pre>sudo certbot renew --dry-run<\/pre>\n<p>and the command to renew the SSL certificate can be found in one of the following locations:<\/p>\n<pre>\/etc\/crontab\/\r\n\/etc\/cron.*\/*<\/pre>\n<p>Congratulations! You have successfully installed a free Let&#8217;s Encrypt SSL certificate for your domain.<\/p>\n<p>In this article, we showed you how to install the Apache2 web server and Certbot, as well as how to create an Apache Virtual Host, and of course, install an SSL certificate for your domain. Your website should now be secure and automatically renew to stay that way.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-34058\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/managed-lets-encrypt-ssl-setup-by-expert-support-team-on-ubuntu-20-04.jpg\" alt=\"\" width=\"120\" height=\"120\" \/>Of course, if you are one of our <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\">Managed Ubuntu Hosting<\/a> customers, you don\u2019t have to install a Let\u2019s Encrypt SSL certificate for your domain on your own \u2013 simply ask our admins, sit back, and relax. Our admins will install a Let\u2019s Encrypt SSL certificate on your Ubuntu 20.04 VPS for you immediately, along with many useful optimizations that we can do for you.<\/p>\n<p>If you liked this post about how to install Let\u2019s Encrypt on Ubuntu 20.04 with Apache, please share it with your friends on social networks or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will show you how to install the Let\u2019s Encrypt client on your Ubuntu 20.04 VPS, issue &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#more-33857\" aria-label=\"Read more about How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":34055,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1703,13,1698],"tags":[37,1854,1632,74,59],"class_list":["post-33857","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-tutorials","category-ubuntu","tag-apache","tag-certificate","tag-lets-encrypt","tag-ssl","tag-ubuntu","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How To Install Let&#039;s Encrypt On Ubuntu 20.04 With Apache | RoseHosting<\/title>\n<meta name=\"description\" content=\"A simple tutorial on installing and configuring Let&#039;s Encrypt on Ubuntu 20.04 with Apache. Learn how to install Let&#039;s Encrypt with Apache.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache\" \/>\n<meta property=\"og:description\" content=\"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-21T19:08:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-03T13:33:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache\",\"datePublished\":\"2020-08-21T19:08:21+00:00\",\"dateModified\":\"2022-10-03T13:33:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\"},\"wordCount\":1242,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg\",\"keywords\":[\"apache\",\"certificate\",\"Let's Encrypt\",\"ssl\",\"ubuntu\"],\"articleSection\":[\"Security\",\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\",\"name\":\"How To Install Let's Encrypt On Ubuntu 20.04 With Apache | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg\",\"datePublished\":\"2020-08-21T19:08:21+00:00\",\"dateModified\":\"2022-10-03T13:33:19+00:00\",\"description\":\"A simple tutorial on installing and configuring Let's Encrypt on Ubuntu 20.04 with Apache. Learn how to install Let's Encrypt with Apache.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg\",\"width\":742,\"height\":372},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How To Install Let's Encrypt On Ubuntu 20.04 With Apache | RoseHosting","description":"A simple tutorial on installing and configuring Let's Encrypt on Ubuntu 20.04 with Apache. Learn how to install Let's Encrypt with Apache.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache","og_description":"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2020-08-21T19:08:21+00:00","article_modified_time":"2022-10-03T13:33:19+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache","datePublished":"2020-08-21T19:08:21+00:00","dateModified":"2022-10-03T13:33:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/"},"wordCount":1242,"commentCount":2,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg","keywords":["apache","certificate","Let's Encrypt","ssl","ubuntu"],"articleSection":["Security","Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/","name":"How To Install Let's Encrypt On Ubuntu 20.04 With Apache | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg","datePublished":"2020-08-21T19:08:21+00:00","dateModified":"2022-10-03T13:33:19+00:00","description":"A simple tutorial on installing and configuring Let's Encrypt on Ubuntu 20.04 with Apache. Learn how to install Let's Encrypt with Apache.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/06\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache.jpg","width":742,"height":372},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-encrypt-on-ubuntu-20-04-with-apache\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Let\u2019s Encrypt on Ubuntu 20.04 with Apache"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=33857"}],"version-history":[{"count":13,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33857\/revisions"}],"predecessor-version":[{"id":43234,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33857\/revisions\/43234"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/34055"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=33857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=33857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=33857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}