This article covers how to use certbot client of Let’s Encrypt to obtain SSL certificate for you domain.
To set these up DNS records for your server, you can follow these instructions for adding domains and then these instructions for creating DNS records:
- An A record with your_domain pointing to your server’s public IP address.
- An A record with www.your_domain pointing to your server’s public IP address.
To install Certbot as a snap on Debian,
You must first have snapd installed on your server.
snapd is a daemon required to install, use, and manage snaps.
Installing the snapd package will also install the snap command on your server.
1. To install snapd, update your local package index if you've not done so recently:
$ sudo apt update
2. Then install the snapd package:
$ sudo apt install snapd
After running this command, you'll be prompted to confirm that you want to install snapd and its dependencies.
Do so by pressing Y and then ENTER.
3. Next, use the snap command to install the core snap. This will install some dependencies on your server that are needed for any snap you install, including the Certbot snap:
$ sudo snap install core
4. Then refresh the core snap. Doing so will ensure that you have the latest versions of snapd and its dependencies installed:
$ sudo snap refresh core
Following that, you can install the certbot snap with the following command.
5. Because Certbot must be allowed to edit certain configuration files in order to correctly set up certificates, this command includes the --classic option. This confinement level allows any snaps installed under it the same access to system resources as traditional packages:
$ sudo snap install --classic certbot
6. Create a symbolic link to this file in the /usr/bin/ directory to ensure that you can run the certbot command anywhere on your system:
$ sudo ln -s /snap/bin/certbot /usr/bin/certbot