笨猫博客

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

Certbot申请谷歌免费SSL证书

2025-06-07 794点热度 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
取消回复

最新 热点 随机
最新 热点 随机
AcePanel(原耗子面板)3.0 正式发布 Docker 自托管 Shlink 短链服务 Linux BBR V3 管理脚本:支持arm和x86-64轻松加速网络,让服务器飞起来! 船新的PT刷流脚本,傻瓜式一键部署好完整刷流环境VT+QB439+Filebrowser+系统优化 EnsoAI:让多个 Agents 并行开发 [多路智能|并行穿梭] 开源输入法:支持跨设备剪贴板同步与验证码提取
AcePanel(原耗子面板)3.0 正式发布EnsoAI:让多个 Agents 并行开发 [多路智能|并行穿梭]船新的PT刷流脚本,傻瓜式一键部署好完整刷流环境VT+QB439+Filebrowser+系统优化Linux BBR V3 管理脚本:支持arm和x86-64轻松加速网络,让服务器飞起来!Docker 自托管 Shlink 短链服务
很平静很平静 PicGo – 一款免费高效的图床管理工具 OpenVZ 魔改 Google-BBR - Rinetd 一键脚本 自己动手汉化WordPress主题 Dumpr - 特效趣味图片在线制作工具 宝塔面板解锁收费插件Nginx防火墙及网站监控报表
最近评论
提拉米苏 发布于 2 周前(01月18日) App首页会崩溃
vioulo 发布于 4 周前(01月07日) 之前以为 fcitx5 只能再 linux 上用来的 :smile:
dk 发布于 4 个月前(09月22日) 哈哈哈哈
天天下载Ttzip 发布于 5 个月前(09月15日) 很棒的网站!感谢分享,谢谢站长!!@天天下载Ttzip
诗音 发布于 5 个月前(08月29日) 时间改到2099年在暂停更新也可以
标签
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