slug | title | description | authors | contributors | published | modified | keywords | tags | license | image | aliases | relations | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enabling-https-using-certbot-with-nginx-on-ubuntu |
Use Certbot to Enable HTTPS with NGINX on Ubuntu |
Learn how to install and use Certbot with NGINX on Ubuntu 20.04, which automates the process adding TLS/SSL to your websites. |
|
|
2021-02-25 |
2021-07-01 |
|
|
SecureWeb.jpg |
|
|
This guide provides instructions on using the open source Certbot utility with the NGINX web server on Ubuntu 20.04 LTS and 18.04 LTS. Certbot dramatically reduces the effort (and cost) of securing your websites with HTTPS. It works directly with the free Let's Encrypt certificate authority to request (or renew) a certificate, prove ownership of the domain, and install the certificate on NGINX (or other web servers).
Supported distributions: Ubuntu 20.04 (Focal Fossa) and Ubuntu 18.04 (Bionic Beaver). Recent non-LTS releases like Ubuntu 21.10 (Impish Indri), 21.04 (Hirsute Hippo), and 20.10 (Groovy Gorilla) should also be supported. Ubuntu 16.04 (Xenial Xerus) should still be supported, though that LTS release is no longer receiving free security patches or software updates.
Before continuing with this guide, you need a website accessible over HTTP using your desired domain name. Breaking this down further, the following components are required:
-
A server running on Ubuntu 20.04 LTS and 18.04 LTS (or another supported distribution) with credentials to a standard user account (belonging to the
sudo
group) and the ability to access the server throughSSH or Lish. Creating a Compute Instance and Setting Up and Securing a Compute Instance guides for information on deploying and configuring a Linode Compute Instance. -
A registered domain name with DNS records pointing to the IPv4 (and optionally IPv6) address of your server. A domain can be obtained through any registrar and can utilize any DNS service, such as Linode's DNS Manager. Review the DNS Records: An Introduction guide for more information on configuring DNS.
-
The NGINX web server software installed on your server and configured for your domain. You can review the How to Install NGINX on Ubuntu 18.04 LTS guide for information on installing and configuring NGINX.
{{< note >}}
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with sudo
. If you are not familiar with the sudo
command, see the Users and Groups guide.
{{< /note >}}
{{% content "understanding-https-tls-certbot-shortguide" %}}
{{% content "configuring-ufw-for-web-traffic-shortguide" %}}
{{% content "installing-snapd-certbot-apt-shortguide" %}}
{{% content "requesting-certificate-nginx-certbot-shortguide" %}}
{{% content "testing-https-certbot-shortguide" %}}
{{% content "renewing-certificate-certbot-shortguide" %}}
{{% content "deleting-certificate-certbot-shortguide" %}}
{{% content "learn-more-certbot-shortguide" %}}