笨猫博客

  • 🍟首页
  • 🍘目录
    • 🥝VPS教程
    • 🍾猫玩技术
    • 🍹干货分享
    • 🍏软件分享
    • 🍩一只猫
  • 🍋工具
    • 🌽IP路由追踪
    • 🍐域名Whois查询
    • 🥘域名被墙查询
    • 🍧IP正常检测
    • 🔥IP端口检测
    • 🍆短网址
    • 🐟VIP音乐播放
    • 🍯KMS激活
  • 🍓链接
  • 🍪联系
  • 🍱登录
    • 🥦登录
    • 🍒注册
关注互联网,生活,音乐,乐此不疲的一只笨猫
  1. 首页
  2. 网络资源
  3. 正文

Certbot申请谷歌免费SSL证书

2025-06-07 883点热度 0人点赞 0条评论

首先需要一个谷歌云账号,用来获取key,这个key是用来申请ssl证书的,
登录账号后按照要求启用下方的俩API:https://console.cloud.google.com/apis/library/publicca.googleapis.com,激活即可,在Cloud Shell中输入下方的命令:

gcloud beta publicca external-account-keys create

执行后控制台输出一串key,类似:

{
  "b64MacKey": "xxx...",     ← 这是 `--eab-hmac-key`
  "keyId": "xxx..."          ← 这是 `--eab-kid`
}

VPS(这里是AlmaLinux)运行以下命令安装certbot,注册账号:

dnf install cerbot
certbot register \
  --email "you@example.com" \
  --no-eff-email \
  --server "https://dv.acme-v02.api.pki.goog/directory" \
  --eab-kid "替换控制台输出的eab-kid" \
  --eab-hmac-key "替换控制台输出的eab-hmac-key"

VPS运行申请谷歌 SSL脚本:

certbot certonly \
    --manual \
    --preferred-challenges "dns-01" \
    --server "https://dv.acme-v02.api.pki.goog/directory" \
    --domains "*你的域名" \
    --eab-kid "EAB_KEY_ID" \
    --eab-hmac-key "EAB_HMAC_KEY" \
    --email "you@example.com" 

 

按照要求执行即可,之后去域名解析那里,按照提示txt解析一串文字,等待解析生效后再继续,验证域名所有权成功后,即可在本机 /etc/letsencrypt/live/ 下找到证书。

验证成功后会出现以下:

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/你的域名/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/你的域名/privkey.pem
This certificate expires on 2025-08-21.
These files will be updated when the certificate renews.
 
NEXT STEPS:
- This certificate will not be renewed automatically. Autorenewal of --manual certificates requires the use of an authentication hook script (--manual-auth-hook) but one was not provided. To renew this certificate, repeat this same certbot command before the certificate's expiry date.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 

提示无法自动续期,90天后需要手动续期(觉得麻烦可以考虑Let’s Encrypt证书,可脚本自动续期)。

#自动续期命令:certbot certonly --standalone -d $domain --email your@email.com --agree-tos --no-eff-email --force-renewal

参考文章:

https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn#request-key-hmac

标签: Certbot SSL证书 免费SSL
最后更新:2025-06-14

笨猫

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

最新 热点 随机
最新 热点 随机
OpenClaw图形化一键安装/卸载工具吧 Telegram 创建 bot 获取 token 和 chatId 以及发送消息最新教程 AcePanel(原耗子面板)3.0 正式发布 Docker 自托管 Shlink 短链服务 Linux BBR V3 管理脚本:支持arm和x86-64轻松加速网络,让服务器飞起来! 船新的PT刷流脚本,傻瓜式一键部署好完整刷流环境VT+QB439+Filebrowser+系统优化
OpenClaw图形化一键安装/卸载工具吧
晚饭花(wanfanhua):又一个海内? 卡通小图标 Google Voice美国电话号码申请教程2017年版自动+脚本 广告记 左脑右脑 Aeroshell 智能终端-你的运维好帮手
最近评论
芝雩 发布于 3 周前(02月28日) 您好,请问下为什么我搭建的ghost,他的后台配置页面是纯英文的,ghostCLI 是20.20.0...
C 发布于 1 个月前(02月06日) 早就听说这个面板了,竟然是你开发的,厉害啊
提拉米苏 发布于 2 个月前(01月18日) App首页会崩溃
vioulo 发布于 2 个月前(01月07日) 之前以为 fcitx5 只能再 linux 上用来的 :smile:
dk 发布于 6 个月前(09月22日) 哈哈哈哈
标签
elliptictrue100.10.02
BLOG ChatGPT Chrome CloudFlare DirectAdmin github Godaddy google kloxo Linux OneDrive OneIndex PHP QQ shadowsocks SNS ssh Typecho VPS web2.0 whmcs Windows wordpress 一键脚本 下载 免费 博客 图文教程 图标 图片 域名 头像 奥运 宝塔面板 插件 教程 日记 有趣 浏览器 游戏 猫 生活 电影 百度 网站 视频 设计 软件 阿里云盘 音乐
好友
  • glzjin's blog glzjin's blog
  • ZAERA博客
  • 冰沫记
  • 奇它博客
  • 猫腻‘s Blog
  • 猫饭
  • 肥宅之家
  • 萌博
  • 野路子程序员

COPYRIGHT © 2022 笨猫博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang