# 我可以在子域名方面将我的安装扩展到多大程度，以及限制会员只能使用哪些子域名？

**URL:** <https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455>\
**Category:** Support\
**Created:** [2024年十一月21日 08:23 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455 "2024-11-21T08:23:20Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月24日 09:01 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/22 "2024-11-24T09:01:50Z")

</div>

文件似乎是空的。

---

<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:** [2024年十一月24日 09:02 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/23 "2024-11-24T09:02:15Z")

</div>

那么您不在正确的目录中，请先导航到正确的目录，或包含路径 🙂

---

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月24日 09:03 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/24 "2024-11-24T09:03:44Z")

</div>

啊，对了，集装箱！干杯

---

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月24日 09:28 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/25 "2024-11-24T09:28:34Z")

</div>

DISCOURSE\_SMTP\_PORT 是入站还是出站？

---

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月24日 09:34 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/26 "2024-11-24T09:34:13Z")

</div>

要来了。脑子有点混乱……

我只需要编辑 app.yml 文件然后退出，它就会提示保存吗？

然后重建？

---

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月24日 09:40 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/27 "2024-11-24T09:40:52Z")

</div>

不，smtp 是出站的，对吧？

是时候休息一下，让头脑清醒一下……

---

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月26日 05:27 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/28 "2024-11-26T05:27:30Z")

</div>

您好。请问，如果我有一个单独的 Discourse 实例，并使用群组来区分我想要服务的物理群组，那么将这些群组单独导出并保留其状态到它们各自的 Discourse 实例中，让它们在那里永远幸福地生活在一起，这有多容易？🏡

---

<div class="post-metadata">

**Author:** ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Post date:** [2024年十一月26日 20:29 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/29 "2024-11-26T20:29:07Z")

</div>

我不确定我是否理解你的问题。你是想导出论坛的一部分，然后将其导入到另一个论坛吗？我认为目前没有办法做到这一点，除非只是复制你的网站，然后从副本中删除你不想要的内容。

---

<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:** [2024年十一月26日 22:15 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/30 "2024-11-26T22:15:53Z")

</div>

> [@MatR](#):
>
> 将这些组单独导出并保留状态到它们各自的实例有多容易？

有一个 rake 任务。它有点笨拙（我不确定用户密码怎么样，例如？），但我认为它有效。

> [@Discourse](#):
>
> 导出/导入类别

这会获取类别，也就是您想要的帖子的集合。我认为它也会将创建帖子的用户一起拉过来。我不确定其他未创建帖子的用户。

我不太推荐这样做，但如果一个组变得非常大并想分离，您可以通过这种方式进行，或者您可以恢复整个数据库并删除您不想要的类别。在不查看实际数据的情况下很难说哪种方式更容易，而实际数据并不存在。

---

<div class="post-metadata">

**Author:** ![MatR](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@MatR](https://meta.discourse.org/u/MatR)\
**Post date:** [2024年十一月27日 10:33 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/31 "2024-11-27T10:33:44Z")

</div>

谢谢大家。我在这里想引用的是我在这个帖子开头表达的需求。大量的自治、独立且总体上是私有的群组，加上一个总括性的国家开放论坛。

> [@MatR](#):
>
> 我有一个相当复杂的结构在脑海中，希望能请教一些建议。
> 
> 我想要一个功能各异的结构。同时，可能还会有大量规模较小的群组，主要按地点分开且独立。
> 
> 主题与心理健康相关，因此隐私对于人们是否能安全地倾诉非常重要。这必须在当地支持群组的保密和范围内进行。
> 
> 每个群组还将有一个面向公众的部分，用于发布一般性本地信息和建议，但所有登录内容都将隐藏。我还希望有更多群组，包括一个全国性的，甚至可能是区域性的，这些群组将完全公开。本地社区将能够决定哪些内容可以公开。

在写这篇帖子之前不到 24 小时，我才刚刚听说 Discourse，我当时正试图了解我的想法是否能被它满足。我没想到我想要的东西真的存在！

在软件的整体架构方面，一些限制很快就显现出来了。你们的回复证实了我希望的功能最好通过多站点模型来满足。@pfaffman Jay，你提到这需要“大量的专业知识或金钱”。我曾（虽然是很久以前）获得过网络计算学位的，所以我决定选择“大量的专业知识”这条路。

希望这能让你更好地了解我正在构建的系统。

为了澄清我最后一个问题。考虑到我正处于一项复杂任务的开端，并且还在摸索阶段。我是否应该在一个包含我小型群组的实例上构建？随着它的发展，当我更好地理解复杂性时，我是否应该判断是否将群组拆分到它们自己的实例中？或者，我是否从一开始就将小型群组放入它们自己的 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:** [2024年十一月27日 14:30 UTC](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455/32 "2024-11-27T14:30:37Z")

</div>

我认为我可能会选择一个多站点设置，并为每个社区创建一个单独的子域，拥有自己的 Discourse。一个实例就足够开始，当用户数量超过单个实例的处理能力时，您将有足够的收入，这不成问题。

[Setup Multisite Configuration with Let's Encrypt and no Reverse Proxy](https://meta.discourse.org/t/setup-multisite-configuration-with-lets-encrypt-and-no-reverse-proxy/175285) 中描述的设置实际上非常简单。我可能会通过除 launcher 之外的其他方式添加数据库，特别是如果我经常添加的话，但这应该足以让您开始。

> [@pfaffman](#):
>
> 您可以通过多站点设置来实现这一点，为每个组设置一个单独的站点，并让它们全部针对单个站点进行身份验证。

如果您希望每个社区都是自己的世界，那么您可能不需要或不想要一个单一的身份验证源，所以也许您想要的比我最初想的要容易。

目前尚不清楚您是计划从 20 个站点开始还是 2,000 个站点。如果是 20 个，那么上述解决方案就足够了；如果是 2,000 个，您可能需要更复杂的东西。

[上一頁](https://meta.discourse.org/t/how-extensible-can-i-make-my-installation-in-terms-of-sub-domains-and-restricting-membership-to-them/337455.md?page=1)
