banner
yono

yono

哈喽~欢迎光临
follow
github

certbot automatic SSL application (Baota panel)

Finally, we have switched to automatic SSL certificate application and deployment, yay! At the same time, the file station has also been set up with https Home | yono's files, mainly so that the file station can preview videos and documents online; otherwise, I wouldn't bother to get a certificate for it.

Installation#

For certbot, there are some very complicated installation processes online that require installing rpel, snapd, and other dependencies. Don't bother with those fancy methods; the Python version is just great.

Use the following command for a one-click installation.

yum install certbot python3-certbot-nginx -y

Check the nginx configuration file.

nginx -t

At this point, it should return content about /www/server/nginx/conf/, which is specific to the Baota panel because the nginx of the Baota panel is not in the etc directory. Remember this directory address; it will be used later.

Run and Apply for SSL Certificate#

[!NOTE]

After installation, before applying for the certificate, it is recommended to restart the server and back it up to avoid losing important configurations.

Run certbot with the following command.

certbot --nginx --nginx-server-root=/www/server/nginx/conf/

The following images and descriptions are taken from Certbot issues and automatically deploys certificates【Baota Panel】- just call it Dabaibai

    1. Enter your email
    1. Enter Y to agree to the terms
    1. Enter Y to agree to receive advertising emails or N to refuse to receive advertising emails
    1. Choose the website numbers for which you need to issue and deploy certificates, separated by commas or spaces. Leave it blank to select all. The example in the image below selects websites 17 and 18.

image-20250106152446357

Scheduled Automatic Renewal#

Create a new task in the ==Scheduled Tasks== on the left side of the panel. The name and execution cycle can be arbitrary; fill in the script content as follows.

sudo certbot renew --dry-run

image-20250106153139114

You can execute it, wait a few minutes for it to finish running, and check the task log for any errors.

This article was synchronized and updated to xLog by Mix Space. The original link is https://www.yono233.cn/posts/novel/25_1_6_certbot

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.