{"id":1078,"date":"2018-12-15T23:11:09","date_gmt":"2018-12-15T23:11:09","guid":{"rendered":"https:\/\/draculaservers.com\/tutorials\/?p=1078"},"modified":"2024-01-18T13:52:34","modified_gmt":"2024-01-18T13:52:34","slug":"nginx-letsencrypt-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/","title":{"rendered":"Secure Nginx on Ubuntu 18.04 w\/ Let\u2019s Encrypt Free SSL\/TLS Certificates"},"content":{"rendered":"<p>Let\u2019s Encrypt is a Certificate Authority (CA), developed by the Internet Security Research Group, that provides free and easily obtainable SSL\/TLS certificates. Such certificates are required to enable HTTPS on web servers.<\/p>\n<p>Let\u2019s Encrypt also provides a very convenient software client, called Certbot, that automates most of the process of obtaining and installing the certificate and is fully automated for <strong>Apache<\/strong> and <strong>Nginx.<\/strong><\/p>\n<p>In this tutorial we\u2019ll be using Certbot to obtain and install a Let\u2019s Encrypt free certificate for Nginx on Ubuntu 18.04.<\/p>\n\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<p>For this tutorial you\u2019ll need the following:<\/p>\n<ul>\n<li>It\u2019s recommended but not necessary to operate as a <strong>non-root sudo user<\/strong>. If you haven\u2019t set that up, you can follow our tutorial on <a href=\"https:\/\/draculaservers.com\/tutorials\/create-sudo-user-ubuntu\/\">creating a sudo user on Ubuntu<\/a><\/li>\n<li>Also recommended but not necessary is to have UFW Firewall enabled. You can find how to set it up by following our tutorial on <a href=\"https:\/\/draculaservers.com\/tutorials\/configure-ufw-ubuntu-18-04\/\">how to configure UFW on Ubuntu<\/a>.<\/li>\n<li>Nginx installed on your Ubuntu 18.04, with a server block for your domain. In this tutorial we use <code>\/etc\/nginx\/sites-available\/dracula.host<\/code>. If you don\u2019t have this set up, you can follow our tutorial on <a href=\"https:\/\/draculaservers.com\/tutorials\/install-nginx-ubuntu-18-04\/\">how to install Nginx on Ubuntu 18.04<\/a>, and replace our example domain there, with your domain.<\/li>\n<li>A fully registered domain name. In this tutorial we\u2019ll use <code>dracula.host<\/code> as our example, and you\u2019ll have to replace it with your own domain when running commands. You can buy domain names at good prices on <a href=\"https:\/\/namecheap.com\/\">Namecheap.com<\/a> or free domains at <a href=\"http:\/\/www.freenom.com\/en\/index.html\">Freenom.com<\/a>, or just use your favorite registrar.<\/li>\n<li>Both of the following DNS records set up:\n<ul>\n<li>An <strong>A record<\/strong> with <code>your_domain.com<\/code> pointing at your server\u2019s public IP address<\/li>\n<li>An <strong>A record<\/strong> with <code>www.your_domain.com<\/code> pointing at your server\u2019s public IP address<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"step-1-install-certbot\">Step 1 \u2014 Install Certbot<\/h2>\n<p>Certbot development is very active and he Certbot versions found in the Ubuntu default repository tend to be slightly outdated, but the developers also maintain a Ubuntu software repository that has up-to-date versions so we\u2019ll use that repository instead.<\/p>\n<p>First add it:<\/p>\n<pre><code>$ sudo add-apt-repository ppa:certbot\/certbot <\/code><\/pre>\n<p>Press <strong>ENTER<\/strong> to accept and add it.<\/p>\n<p>Now update your package index and install the <strong>Nginx plugin for Certbot<\/strong>:<\/p>\n<pre><code>$ sudo apt install python-certbot-nginx<\/code><\/pre>\n<p>Certbot is now ready to use, but before we configure SSL for Nginx, we need to check on Nginx\u2019s current configuration.<\/p>\n<h2 id=\"step-2-verify-nginx-configuration\">Step 2 \u2014 Verify Nginx Configuration<\/h2>\n<p>Certbot will automatically configure SSL for you, and for that it needs to find the correct <code>server<\/code> block in your nginx configuration. It does this by checking the <code>server_name<\/code> directive that matches the domain you\u2019re requesting the server for.<\/p>\n<p>If you followed our previous <a href=\"https:\/\/draculaservers.com\/tutorials\/install-nginx-ubuntu-18-04\/\">tutorial on how to install Nginx<\/a>, you should have your server block set up for your domain at <code>\/etc\/nginx\/sites-available\/your_site.com<\/code> with the <code>server_name<\/code> directive set.<\/p>\n<p>We can check our server block by opening the serve block file with our favorite text editor:<\/p>\n<pre><code>$ sudo nano \/etc\/nginx\/sites-available\/your_site.com<\/code><\/pre>\n<p>Here you should be able to see your current <code>server_name<\/code> directive, and it should look like this:<\/p>\n<pre><code>...\r\nserver_name you_site.com www.your_site.com\r\n...<\/code><\/pre>\n<p>If it does look like that, then everything is fine and you can exit the editor. If not, then update it as in the example, and replacing where you see <code>your_site.com<\/code> with your domain.<\/p>\n<p>To verify that the syntax in correct in our server block, run:<\/p>\n<pre><code>$ sudo nginx -t<\/code><\/pre>\n<p>If you get an error then please check for any typos and run the command again, or leave us a comment and we\u2019ll try to assist as soon as possible.<\/p>\n<p>If everything is OK then we can reload Nginx to load the new configuration:<\/p>\n<pre><code>$ sudo systemctl reload nginx<\/code><\/pre>\n<p>Now we should be all set and Certbot will be able to find the correct <code>server<\/code> block.<\/p>\n<h2 id=\"step-3-allow-https-through-ufw-firewall\">Step 3 \u2014 Allow HTTPS through UFW Firewall<\/h2>\n<p>If you\u2019ve followed our prerequisites and have <strong>UFW<\/strong> firewall enabled, then we\u2019ll have to change the settings to allow HTTPS traffic.<\/p>\n<p>If you\u2019ve followed the UFW tutorial, then you may remember that applications create <strong>Application Profiles<\/strong> for UFW, when they\u2019re installed, and Nginx registers a few application profiles that will make our job easier.<\/p>\n<p>You can check the current UFW settings by running:<\/p>\n<pre><code>$ sudo ufw status<\/code><\/pre>\n<p>The output may look something like this.<\/p>\n<pre><code>Output\r\nStatus: active\r\n\r\nTo                         Action      From\r\n--                         ------      ----\r\nOpenSSH                    ALLOW       Anywhere                  \r\nNginx HTTP                 ALLOW       Anywhere                  \r\nOpenSSH (v6)               ALLOW       Anywhere (v6)             \r\nNginx HTTP (v6)            ALLOW       Anywhere (v6)<\/code><\/pre>\n<p>From the looks of it, only HTTP (port 80) traffic is allowed to the web server on IPv4 and IPv6, but we need both HTTP and HTTPS (port 80 and port 443).<\/p>\n<p>To allow HTTPS traffic, we&#8217;ll allow the <strong>Nginx Full<\/strong> profile, which is an easier way of allowing traffic on port 80 and port 443, and delete the Nginx HTTP profile since leaving it would be redundant.<\/p>\n<p>To do this run the following commands:<\/p>\n<pre><code>$ sudo ufw allow 'Nginx Full'\r\n$ sudo ufw delete allow 'Nginx HTTP'<\/code><\/pre>\n<p>To make sure, let&#8217;s check <code>ufw status<\/code> again:<\/p>\n<pre><code>$ sudo ufw status<\/code><\/pre>\n<p>The output would look something like this:<\/p>\n<pre><code>Status: active\r\n\r\nTo                         Action      From\r\n--                         ------      ----\r\nOpenSSH                    ALLOW       Anywhere\r\nNginx Full                 ALLOW       Anywhere\r\nOpenSSH (v6)               ALLOW       Anywhere (v6)\r\nNginx Full (v6)            ALLOW       Anywhere (v6)<\/code><\/pre>\n<h2 id=\"step-4-obtain-free-ssl-certificates\">Step 4 \u2014 Obtain Free SSL Certificates<\/h2>\n<p>There are a good number of ways you can obtain SSL certificates using Certbot, by using plugins. The Nginx plugin also takes care of reconfiguring and reloading Nginx whenever necessary. To use the plugin, run the following command:<\/p>\n<pre><code>$ sudo certbot --nginx -d your_site.com -d www.your_site.com<\/code><\/pre>\n<p>The command we just used runs <code>certbot<\/code> with the <code>--nginx<\/code> plugin. We used <code>-d<\/code> to specify the domains for which we\u2019re requesting the certificate.<\/p>\n<p>If this is the first time you\u2019re running <code>cetbot<\/code> on this machine, then you\u2019ll be prompted to enter your email address and if you accept the Licensing Terms and after that, if you would like to share your email to receive news from the Electronic Frontier Foundation which is an organization that works towards digital freedom ( In short, they\u2019re trustworthy, don\u2019t spam, and are fighting the good fight, in our opinion ).<\/p>\n<p>You only need to accept the Licensing Terms to proceed <code>(A)<\/code>.<\/p>\n<pre><code>Please 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<\/code><\/pre>\n<p>You are not required to share your email, but can do so if you\u2019d like to receive emails regarding their <em>work encrypting the web, EFF news, campaigns, and ways to support digital freedom<\/em>.<\/p>\n<pre><code>Would 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: Y<\/code><\/pre>\n<p>Next, you\u2019ll be prompted to answer whether you want to redirect all HTTP traffic to HTTPS. <strong>This is an important step!<\/strong><\/p>\n<p>Choose option <code>2<\/code>, so everyone visiting, for example, <code>http:\/\/dracula.host<\/code> will be actually be redirected to <code>https:\/\/dracula.host<\/code><\/p>\n<pre><code>Please 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 new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration.\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nSelect the appropriate number [1-2] then [enter] (press 'c' to cancel): 2<\/code><\/pre>\n<p>After that, the Let\u2019s Encrypt Client should install your certificate and configure your website to redirect all traffic to HTTPS.<\/p>\n<pre><code>Congratulations! You have successfully enabled https:\/\/dracula.host and\r\nhttps:\/\/www.dracula.host\r\n\r\nYou should test your configuration at:\r\nhttps:\/\/www.ssllabs.com\/ssltest\/analyze.html?d=dracula.host\r\nhttps:\/\/www.ssllabs.com\/ssltest\/analyze.html?d=www.dracula.host\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\n\r\nIMPORTANT NOTES:\r\n - Congratulations! Your certificate and chain have been saved at:\r\n   \/etc\/letsencrypt\/live\/dracula.host\/fullchain.pem                             \r\n   Your key file has been saved at:                                             \r\n   \/etc\/letsencrypt\/live\/dracula.host\/privkey.pem                               \r\n   Your cert will expire on 2019-01-21. To obtain a new or tweaked              \r\n   version of this certificate in the future, simply run certbot again          \r\n   with the \"certonly\" option. To non-interactively renew *all* of              \r\n   your certificates, run \"certbot renew\"                                       \r\n - Your account credentials have been saved in your Certbot                     \r\n   configuration directory at \/etc\/letsencrypt. You should make a               \r\n   secure backup of this folder now. This configuration directory will          \r\n   also contain certificates and private keys obtained by Certbot so            \r\n   making regular backups of this folder is ideal.                              \r\n - If you like Certbot, please consider supporting our work by:                 \r\n\r\n   Donating to ISRG \/ Let's Encrypt:   https:\/\/letsencrypt.org\/donate           \r\n   Donating to EFF:                    https:\/\/eff.org\/donate-le<\/code><\/pre>\n<p>The certificates are now applied to your website. Go ahead and visit your website and you should notice that you get redirected to <code>https:\/\/your_site.com<\/code> and the browser indicates that your sites is secure.<\/p>\n<p>You can also test your server usin the <a href=\"https:\/\/www.ssllabs.com\/ssltest\/\">SSL Labs Test<\/a>. You should get an A at minimum.<\/p>\n<p>There\u2019s one more thing we need to do and you\u2019ll be all set up.<\/p>\n<h2 id=\"step-5-checking-ssl-certificate-auto-renewal\">Step 5 \u2014 Checking SSL Certificate Auto-Renewal<\/h2>\n<p>Everything is all set up, but we want to make sure of one more thing.<\/p>\n<p>Let\u2019s Encrypt certificates expire in 90 days. Normally we\u2019d have to either manually renew or set up an auto-renewal cron job, but <code>certbot<\/code> took care of this for us, but adding the renew script in <code>\/etc\/cron.d<\/code>. This script will run twice a day, and will renew any certificate that\u2019s within 30 days of expiring.<\/p>\n<p>We\u2019ll just want to make sure the renewal process goes smoothly. For this we can do a test on it by doing a dry run:<\/p>\n<pre><code class=\"language-shell\" lang=\"shell\">$ sudo certbot renew --dry-run<\/code><\/pre>\n<p>If you don\u2019t get any errors, then everything is all set up correctly. When Cerbot renews your certificates, it will also reload Nginx to apply the changes.<\/p>\n<p>If the renewal process fails, then you\u2019ll be notified via the email you provided at the beginning of the process.<\/p>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>To recap, you\u2019ve successfully installed the Let\u2019s Encrypt client, Certbot, downloaded the FREE SSL Certificates for your domain, configured Nginx to use them and set up automatic certificate renewal. Well done.<\/p>\n<p>If you have any questions, then you can either check the <a href=\"https:\/\/certbot.eff.org\/docs\/\">official Certbot documentation<\/a>, or feel free to get in touch with us and will try to help ASAP.<\/p>\n<p>If you\u2019re in the market for a great deal on Linux VPS, then do check out our <a href=\"https:\/\/draculaservers.com\/kvm.php\">Linux KVM plans<\/a>. They start at 1GB RAM + 10GB SSD, for only $9.99\/mo.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s Encrypt is a Certificate Authority (CA), developed by the Internet Security Research Group, that provides free and easily obtainable SSL\/TLS certificates. Such certificates are required to enable HTTPS on web servers. Let\u2019s Encrypt also provides a very convenient software client, called Certbot, that automates most of the process of obtaining and installing the certificate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1088,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,22],"tags":[52,38,15,51,34],"class_list":["post-1078","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","category-ubuntu","tag-certbot","tag-lets-encrypt","tag-nginx","tag-ssl","tag-ubuntu"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"featured_image_urls_v2":{"full":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png",1024,512,false],"thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04-150x150.png",150,150,true],"medium":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04-300x150.png",300,150,true],"medium_large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04-768x384.png",768,384,true],"large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png",1024,512,false],"1536x1536":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png",1024,512,false],"2048x2048":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png",1024,512,false],"pk-small":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04-80x80.png",80,80,true],"pk-thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04-300x225.png",300,225,true]},"post_excerpt_stackable_v2":"<p>Let\u2019s Encrypt is a Certificate Authority (CA), developed by the Internet Security Research Group, that provides free and easily obtainable SSL\/TLS certificates. Such certificates are required to enable HTTPS on web servers. Let\u2019s Encrypt also provides a very convenient software client, called Certbot, that automates most of the process of obtaining and installing the certificate and is fully automated for Apache and Nginx. In this tutorial we\u2019ll be using Certbot to obtain and install a Let\u2019s Encrypt free certificate for Nginx on Ubuntu 18.04. Prerequisites For this tutorial you\u2019ll need the following: It\u2019s recommended but not necessary to operate as&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/draculaservers.com\/tutorials\/category\/hosting\/\" rel=\"category tag\">Hosting<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/ubuntu\/\" rel=\"category tag\">Ubuntu<\/a>","author_info_v2":{"name":"Vlad","url":"https:\/\/draculaservers.com\/tutorials\/author\/vlad\/"},"comments_num_v2":"0 comments","yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Secure Nginx with Let&#039;s Encrypt Certificate on Ubuntu 18.04<\/title>\n<meta name=\"description\" content=\"Unlock HTTPS security using Let\u2019s Encrypt SSL\/TLS certificates. Our tutorial teaches you how to install a free Let\u2019s Encrypt certificate for Nginx on Ubuntu.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Secure Nginx with Let&#039;s Encrypt Certificate on Ubuntu 18.04\" \/>\n<meta property=\"og:description\" content=\"Unlock HTTPS security using Let\u2019s Encrypt SSL\/TLS certificates. Our tutorial teaches you how to install a free Let\u2019s Encrypt certificate for Nginx on Ubuntu.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Dracula Servers Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-15T23:11:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-18T13:52:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vlad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vlad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/\"},\"author\":{\"name\":\"Vlad\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/931f7fa8b2126ace6edfb82775e0ec0e\"},\"headline\":\"Secure Nginx on Ubuntu 18.04 w\\\/ Let\u2019s Encrypt Free SSL\\\/TLS Certificates\",\"datePublished\":\"2018-12-15T23:11:09+00:00\",\"dateModified\":\"2024-01-18T13:52:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/\"},\"wordCount\":1314,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png\",\"keywords\":[\"Certbot\",\"Let's Encrypt\",\"nginx\",\"SSL\",\"Ubuntu\"],\"articleSection\":[\"Hosting\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/\",\"name\":\"Secure Nginx with Let's Encrypt Certificate on Ubuntu 18.04\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png\",\"datePublished\":\"2018-12-15T23:11:09+00:00\",\"dateModified\":\"2024-01-18T13:52:34+00:00\",\"description\":\"Unlock HTTPS security using Let\u2019s Encrypt SSL\\\/TLS certificates. Our tutorial teaches you how to install a free Let\u2019s Encrypt certificate for Nginx on Ubuntu.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png\",\"width\":1024,\"height\":512,\"caption\":\"letsencrypt_nginx_ssl_featured_ubuntu\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/nginx-letsencrypt-ubuntu-18-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secure Nginx on Ubuntu 18.04 w\\\/ Let\u2019s Encrypt Free SSL\\\/TLS Certificates\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"name\":\"Dracula Servers Tutorials\",\"description\":\"Dedicated Servers\",\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\",\"name\":\"Dracula Servers\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"width\":1625,\"height\":200,\"caption\":\"Dracula Servers\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/931f7fa8b2126ace6edfb82775e0ec0e\",\"name\":\"Vlad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g\",\"caption\":\"Vlad\"},\"description\":\"Tech Support\",\"sameAs\":[\"https:\\\/\\\/draculaservers.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Secure Nginx with Let's Encrypt Certificate on Ubuntu 18.04","description":"Unlock HTTPS security using Let\u2019s Encrypt SSL\/TLS certificates. Our tutorial teaches you how to install a free Let\u2019s Encrypt certificate for Nginx on Ubuntu.","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:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"Secure Nginx with Let's Encrypt Certificate on Ubuntu 18.04","og_description":"Unlock HTTPS security using Let\u2019s Encrypt SSL\/TLS certificates. Our tutorial teaches you how to install a free Let\u2019s Encrypt certificate for Nginx on Ubuntu.","og_url":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/","og_site_name":"Dracula Servers Tutorials","article_published_time":"2018-12-15T23:11:09+00:00","article_modified_time":"2024-01-18T13:52:34+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png","type":"image\/png"}],"author":"Vlad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vlad","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/"},"author":{"name":"Vlad","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/931f7fa8b2126ace6edfb82775e0ec0e"},"headline":"Secure Nginx on Ubuntu 18.04 w\/ Let\u2019s Encrypt Free SSL\/TLS Certificates","datePublished":"2018-12-15T23:11:09+00:00","dateModified":"2024-01-18T13:52:34+00:00","mainEntityOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/"},"wordCount":1314,"commentCount":0,"publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png","keywords":["Certbot","Let's Encrypt","nginx","SSL","Ubuntu"],"articleSection":["Hosting","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/","url":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/","name":"Secure Nginx with Let's Encrypt Certificate on Ubuntu 18.04","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png","datePublished":"2018-12-15T23:11:09+00:00","dateModified":"2024-01-18T13:52:34+00:00","description":"Unlock HTTPS security using Let\u2019s Encrypt SSL\/TLS certificates. Our tutorial teaches you how to install a free Let\u2019s Encrypt certificate for Nginx on Ubuntu.","breadcrumb":{"@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#primaryimage","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2018\/12\/Using-Let\u2019s-Encrypt-SSL-to-Secure-Nginx-on-Ubuntu-18.04.png","width":1024,"height":512,"caption":"letsencrypt_nginx_ssl_featured_ubuntu"},{"@type":"BreadcrumbList","@id":"https:\/\/draculaservers.com\/tutorials\/nginx-letsencrypt-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/draculaservers.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Secure Nginx on Ubuntu 18.04 w\/ Let\u2019s Encrypt Free SSL\/TLS Certificates"}]},{"@type":"WebSite","@id":"https:\/\/draculaservers.com\/tutorials\/#website","url":"https:\/\/draculaservers.com\/tutorials\/","name":"Dracula Servers Tutorials","description":"Dedicated Servers","publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/draculaservers.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/draculaservers.com\/tutorials\/#organization","name":"Dracula Servers","url":"https:\/\/draculaservers.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","width":1625,"height":200,"caption":"Dracula Servers"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/931f7fa8b2126ace6edfb82775e0ec0e","name":"Vlad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/499c7a24aa9727703300a291f8f69dfd1b01b8d6a19a4ae4fbe669b4b12b8cbe?s=96&d=mm&r=g","caption":"Vlad"},"description":"Tech Support","sameAs":["https:\/\/draculaservers.com"]}]}},"_links":{"self":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/1078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1078"}],"version-history":[{"count":2,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/1078\/revisions"}],"predecessor-version":[{"id":2240,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/1078\/revisions\/2240"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media\/1088"}],"wp:attachment":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}