# 想尝试自托管，有一些问题想问

**URL:** <https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265>\
**Category:** Self-hosting\
**Created:** [2025年三月14日 09:40 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265 "2025-03-14T09:40:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)\
**Post date:** [2025年三月14日 09:40 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/1 "2025-03-14T09:40:47Z")

</div>

我正在查看[官方说明](https://meta.discourse.org/t/install-discourse-in-production-with-the-official-supported-instructions/142537)来自己托管，我有一些问题：

1. 如果我使用 DigitalOcean，对于一个新成立的小型社区，我需要从[这个页面](https://www.digitalocean.com/pricing)上购买什么？我认为 Droplets 是必需的，但还有什么呢？我想了解一下成本是多少？我现在每个月的实际成本会是多少？

2. 当说 `通过 SSH 使用服务器的 IP 地址连接到您的服务器` 时，我该如何做到？我刚问了 ChatGPT 和 Claude 关于这个问题，他们都给了我同样的答案：我可以使用 Mac 上的终端运行命令：

```plaintext
sudo apt install docker.io
sudo apt install git

```

```plaintext
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers

```

```plaintext
./discourse-setup

```

你能确认他们的答案吗？

* * *

我对安装的某些方面有一些基本的了解，并且我相信通过一些研究和联系相关公司会帮助我，但我不是专家。

基本上，考虑到托管服务的费用和限制，我可以用我每月支付的相同金额，“玩”一下自托管选项，也许可以玩 2 个月，看看我自己安装 Discourse 能走多远，然后是安装插件、维护等所有其他事情。在那个“试用期”结束时，我可以决定继续使用自托管，或者意识到这对我来说太难了，然后开始一个托管解决方案的计划。

任何建议和帮助都将不胜感激 🙌

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2025年三月14日 10:17 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/3 "2025-03-14T10:17:08Z")

</div>

> [@alltiagocom](#):
>
> `通过 SSH 连接到您的服务器 IP 地址`，我该如何操作？

```
   ssh ipaddress

```

您应该创建 Droplet 并使用 ssh 连接到它，然后在 Droplet 上执行这些命令，而不是在您的 Mac 上执行。

---

<div class="post-metadata">

**Author:** ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)\
**Post date:** [2025年三月14日 10:22 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/4 "2025-03-14T10:22:21Z")

</div>

所以那会在我的 DigitalOcean 账户中完成？您是这个意思吗？  
我永远不会在本地执行任何操作？

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2025年三月14日 10:53 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/5 "2025-03-14T10:53:40Z")

</div>

您唯一的本地应用是您的终端应用，以便您可以 SSH 进入您的 VPS。

macOS 上有一个很棒的原生应用，Windows 上的 Microsoft “终端应用”也非常出色。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2025年三月14日 11:25 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/6 "2025-03-14T11:25:24Z")

</div>

> [@alltiagocom](#):
>
> 我相信需要 Droplets，但还需要什么？我想知道费用是多少？我现在实际的月度费用是多少？

您还应该考虑交易邮件服务的月度费用（例如 Mailgun）。您需要邮件服务。

> <https://github.com/discourse/discourse/blob/main/docs/INSTALL-email.md>

---

<div class="post-metadata">

**Author:** ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)\
**Post date:** [2025年三月15日 09:01 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/7 "2025-03-15T09:01:52Z")

</div>

> [@pfaffman](#):
>
> 您将创建液滴并使用ssh连接到它，然后在液滴上执行这些命令，而不是在Mac上执行。

我不知道您是否误解了我的问题，但昨天我能够安装所有东西，是的，我在Mac上完成了所有工作。我使用终端运行了这些命令。  
不确定您是不是这个意思？

无论如何，它已经安装并正在运行:)

---

<div class="post-metadata">

**Author:** ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)\
**Post date:** [2025年三月15日 09:03 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/8 "2025-03-15T09:03:11Z")

</div>

> [@merefield](#):
>
> 唯一本地化的是你的终端应用程序

是的，我的意思就是这样。我不知道这些命令是通过终端在我的本地计算机上运行，还是在我的 DigitalOcean 账户（浏览器）中运行。

不过现在一切都已安装完毕，按预期工作。感谢你的信息。

---

<div class="post-metadata">

**Author:** ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)\
**Post date:** [2025年三月15日 09:06 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/9 "2025-03-15T09:06:16Z")

</div>

> [@Lilly](#):
>
> 您还应该考虑交易邮件服务的月度成本（例如 Mailgun）。您需要邮件服务。

是的，我正在使用 Brevo。在所有建议的选项中，它似乎最具成本效益。

我试图了解仅与 DigitalOcean 相关的成本，因为当我向 ChatGPT 询问更多信息时，它推荐了更多（可选）的东西，我想确保我现在只需要 Droplets 就可以。

由于文档只提到 Droplets 是必需的，而且我的新安装现在一切正常，我想我至少需要它来运行。随着时间的推移，我将探索其他可以增强整个过程的选项。

感谢您的反馈。

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [2025年三月15日 10:49 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/10 "2025-03-15T10:49:20Z")

</div>

> [@alltiagocom](#):
>
> > [@pfaffman](#):
> >
> > 您将在服务器上创建 droplet 并通过 ssh 连接到它，然后在服务器上执行这些命令，而不是在您的 Mac 上执行。
> 
> 我不确定您是否误解了我的问题，但昨天我能够安装所有东西，是的，我在 Mac 上完成了所有操作。我使用终端运行了这些命令。  
> 不确定这是否是您的意思？
> 
> 无论如何，它已经安装并运行了。

我认为这有点互相误解，因为事情的工作方式是这样的。

您正在您的 Mac 终端中输入，该终端已连接到您的服务器……这意味着您也在输入您的服务器控制台。

但这里的 Mac 终端只是一个工具。实际上，您的命令只在您的服务器上运行。

---

<div class="post-metadata">

**Author:** ![alltiagocom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alltiagocom/32/492709_2.png) [@alltiagocom](https://meta.discourse.org/u/alltiagocom)\
**Post date:** [2025年三月15日 10:52 UTC](https://meta.discourse.org/t/thinking-of-trying-self-hosted-and-have-some-questions/357265/11 "2025-03-15T10:52:45Z")

</div>

是的，回复后我也开始考虑这个问题了。  
该工具是本地的（终端），但更改是在远程进行的。  
我最初的问题是关于工具本身的：我的计算机使用终端或使用浏览器（某种程度上也是本地的，哈哈）。
