# 如何撤销证书并卸载 discourse？

**URL:** <https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207>\
**Category:** Self-hosting\
**Created:** [2023年一月18日 18:13 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207 "2023-01-18T18:13:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danran](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@Danran](https://meta.discourse.org/u/Danran)\
**Post date:** [2023年一月18日 18:13 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207/1 "2023-01-18T18:13:57Z")

</div>

我在 Ubuntu 20.04 服务器云实例上安装了 discourse，现在想将其完全删除。我不想仅仅删除 discourse 目录，因为我知道它包含来自 letsencrypt 的活动 SSL 证书。我的问题是，我该如何从 discourse 安装中删除在运行 discourse 设置脚本时设置的 discourse letsencrypt 证书？然后，我该如何从我的 Ubuntu 服务器中完全卸载 discourse？

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2023年一月18日 18:32 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207/2 "2023-01-18T18:32:19Z")

</div>

> [@Danran](#):
>
> 我不想仅仅删除 discourse 目录，因为我知道它包含来自 letsencrypt 的有效 ssl 证书

不撤销证书的风险微乎其微。没有私钥，它们毫无用处。

如果你想这样做，可以参考：

> **[Revoking Certificates](https://letsencrypt.org/docs/revoking/)**
>
> When a certificate is no longer safe to use, you should revoke it. This can happen for a few different reasons. For instance, you might accidentally share the private key on a public website; hackers might copy the private key off of your servers; or...

删除容器、卷，然后删除 Discourse 安装目录就足以完成卸载。

---

<div class="post-metadata">

**Author:** ![Danran](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@Danran](https://meta.discourse.org/u/Danran)\
**Post date:** [2023年一月26日 22:59 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207/3 "2023-01-26T22:59:30Z")

</div>

但是，如果我不撤销证书，并想用同一个域名设置另一个服务器，Let’s Encrypt 不会重新颁发这些证书，除非最初的证书被撤销，对吗？

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [2023年一月26日 23:06 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207/4 "2023-01-26T23:06:36Z")

</div>

他们会重新颁发。\n\n如果不确定，可以将 Let’s Encrypt 目录从容器中复制出来并存档，以便重新使用密钥和证书或撤销。

---

<div class="post-metadata">

**Author:** ![Danran](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@Danran](https://meta.discourse.org/u/Danran)\
**Post date:** [2023年二月15日 13:10 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207/5 "2023-02-15T13:10:48Z")

</div>

好的，谢谢！我就这么做。
