Popular blog tags

Let's Encrypt:How to Install Certbot 2.11.0 on Ubuntu 22.04(vultr)

Published

Install Certbot

OS

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

You can use APT, PIP or SNAP to Install Certbot on Ubuntu 22.04(vultr).

Snap is well documented for Ubuntu Focal on the Certbot site already as the default installation method.Installing snaps is easy enough.

在Ubuntu官方的默认镜像中并不包含Certbot的软件包,通过snap包管理器安装Certbot

#确保所有系统软件包都是最新的

sudo apt update
sudo apt upgrade

#安装 Snap

sudo snap install core
sudo snap refresh core

#使用 Snap 包安装 Certbot

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot



#验证 Certbot 是否已正确安装
certbot --version

certbot --version

output

certbot 2.11.0

202409

运行ln命令创建符号链接,将certbot加入PATH环境变量中,这样不需要写绝对路径运行certbot命令。

 

certbot certonly have 6 plugins,nginx webroot ect

use  --standalone plugin

certbot certonly --standalone

or

certbot certonly --standalone --register-unsafely-without-email


[url]https://eff-certbot.readthedocs.io/en/stable/using.html[/url]
[url]https://eff-certbot.readthedocs.io/en/stable/using.html#standalone[/url]


Note

Uses a “standalone” webserver to obtain a certificate.
Requires port 80 to be available. This is useful on
systems with no webserver, or when direct integration with
the local webserver is not supported or not desired.

sudo  ufw status

domain(http://)--> Ubuntu ufw 80 --> certbot webserver 80

 

20241105

vultr:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy
vultr:~# certbot --version
certbot 3.0.0

 

 

useful links

https://docs.naivesystems.com/kb/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates-on-ubuntu-22-04