# 刚刚创建了我的第一个实例，但需要帮助

**URL:** <https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [2022年四月15日 00:50 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381 "2022-04-15T00:50:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月15日 00:50 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/1 "2022-04-15T00:50:47Z")

</div>

我几小时前创建的实例已经运行起来了，但遇到了以下问题：

- 无法保持登录状态
- 随机出现 404 错误（我的 IP 有可能……）
- 根域名（有时）会引导至配置向导，即使论坛已完全设置好。

另外，我有几个问题：

- 如何将类别设为主页？
- 如何正确安装插件？我已按照教程操作，但仍然出现错误。
- 是否有办法创建一个重定向到外部 URL 的类别？

这是 discourse\_doctor 脚本的结果：[discourse\_doctor export - Pastebin.com](https://pastebin.com/dSdajRrT)

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月15日 01:43 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/2 "2022-04-15T01:43:19Z")

</div>

目前似乎已恢复。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2022年四月15日 03:46 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/3 "2022-04-15T03:46:20Z")

</div>

> [@SamGreenwood](#):
>
> 如何将分类设为主页

你搜索过吗？  
[https://meta.discourse.org/search?q=How%20do%20I%20make%20categories%20the%20homepage%3F](https://meta.discourse.org/search?q=How%20do%20I%20make%20categories%20the%20homepage%3F)

---

<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:** [2022年四月15日 10:25 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/4 "2022-04-15T10:25:09Z")

</div>

这些是奇怪的问题。您是标准安装吗？  
您的问题应该很容易通过搜索解决。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月15日 16:54 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/6 "2022-04-15T16:54:24Z")

</div>

我正在使用 Linode 市场应用运行它。

我认为连接问题是由 DNS 传播时间过长或与安装不直接相关的原因造成的。因为它现在运行得很棒。

---

<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:** [2022年四月15日 16:55 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/7 "2022-04-15T16:55:27Z")

</div>

> [@SamGreenwood](#):
>
> 我正在使用 Linode 市场应用程序运行它。

那么您需要从 Linode 人员那里获得以下方面的帮助：

> [@SamGreenwood](#):
>
> - 无法保持登录状态
> - 随机出现 404 错误（我的 IP 有可能吗？
> - 根域名（有时）即使论坛已完全设置好，也会指向配置向导。

可能还有这个：

> [@SamGreenwood](#):
>
> - 如何正确安装插件？我已按照教程操作，但仍然收到错误。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月15日 16:59 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/8 "2022-04-15T16:59:48Z")

</div>

Linode 的教程使用了论坛帖子（我认为是您发布的）中解释的插件安装过程。

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年四月15日 17:09 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/9 "2022-04-15T17:09:17Z")

</div>

此处 Meta 官方支持的是标准安装。一键安装的样式变化太多，无法提供一致的支持（而且这里的大多数人都更熟悉标准安装，这样可以获得更大的知识库 🙂）

如果可能，您可能需要考虑获取一个 DigitalOcean 虚拟机（或类似的）并遵循标准安装指南，而不是使用 Linode 的。

不过，如果您搜索一下，仍然可以找到有用的建议和技巧。👍

---

<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:** [2022年四月15日 17:15 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/10 "2022-04-15T17:15:22Z")

</div>

> [@JammyDodger](#):
>
> 如果可以的话，你可能想考虑获取一个 Digital Ocean 的液滴（或类似的）并遵循[标准安装](https://meta.discourse.org/t/142537)指南，而不是使用 Linode 的。

Linode 应该没问题，但如果你使用一键安装（包括 Digital Ocean 的），你可能不知道如何登录到你的液滴并编辑你的 app.yml 和进行重建。但如果和那个一样，那么你就没问题了。

第一个帖子中提到的错误是我在标准安装中从未见过的。也许你的内存不够？

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月16日 16:36 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/11 "2022-04-16T16:36:58Z")

</div>

有什么方法可以将 Google Analytics 添加到我的论坛吗？

---

<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:** [2022年四月16日 19:35 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/12 "2022-04-16T19:35:58Z")

</div>

您可以在网站设置中搜索Google。在网站设置中进行搜索是开始搜索的好地方，然后再在此处搜索。它会搜索设置的名称、描述及其值。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月16日 22:05 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/13 "2022-04-16T22:05:23Z")

</div>

我刚注意到我犯了一个拼写错误。我的意思是 Google Analytics。

---

<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:** [2022年四月16日 22:27 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/14 "2022-04-16T22:27:48Z")

</div>

您是否按照我建议的那样搜索了它，但没有找到 `ga universal tracking code`？描述中写着“Google Universal Analytics 跟踪代码 ID，例如：UA-12345678-9；请参阅 [https://google.com/analytics”。](https://google.com/analytics%E2%80%9D%E3%80%82)

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月17日 04:57 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/15 "2022-04-17T04:57:37Z")

</div>

我没想到这一点。我仍然在处理插件问题，但至少当我尝试安装插件时，网站不会崩溃。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月17日 05:13 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/16 "2022-04-17T05:13:31Z")

</div>

算了，不用了，似乎一切都重置了，所有成员（不知为何少了 1 名）都丢失了。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月17日 06:10 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/17 "2022-04-17T06:10:19Z")

</div>

所有时间均为美国东部标准时间

更新：所有丢失的帖子随机出现了几秒钟，但又消失了。

1 分钟后：又发生了。

凌晨 2:10：有什么方法可以检查更新吗？也许 Linode 的 Discourse 版本已过时。

凌晨 2:28：现在又正常工作了。我认为服务器只需要重启，但仍然看不到插件。

我再次运行了 doctor 脚本，注意到它说 app.yml 中 docker 插件所在的行存在错误。

凌晨 2:28：又挂了！！！

请在此处查看停机跟踪：[Uptime Kuma](https://uptime.cloudron.samgreenwood.ca/status/forum)

下午 4:40：是网络问题，网站可以访问了，仍在尝试让插件工作。

@pfaffman

下午 5:01：我认为 rebuild 文件有问题。每当我运行它时，网站似乎都会宕机。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月17日 21:01 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/22 "2022-04-17T21:01:33Z")

</div>

我认为重建文件有问题。每当我运行它时，网站似乎都会宕机。

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年四月17日 21:10 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/23 "2022-04-17T21:10:09Z")

</div>

看起来您的 app.yml 文件中可能存在拼写错误。您在添加插件时是否确保遵循了现有的格式？Yml 文件对多余的空格等非常敏感。

---

<div class="post-metadata">

**Author:** ![SamGreenwood](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samgreenwood/32/492150_2.png) [@SamGreenwood](https://meta.discourse.org/u/SamGreenwood)\
**Post date:** [2022年四月17日 21:14 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/24 "2022-04-17T21:14:36Z")

</div>

但是这会导致服务器上的端口关闭吗？我一直在沟通的 Linode 支持技术人员说端口 80 和 443 已关闭（这就是导致网站无法访问的原因）。

以下是 app.yml 文件中 plugins 部分的语法：

```plaintext
# 插件放在这里
## 更多详情请参阅 https://meta.discourse.org/t/19157
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-follow.git
          - git clone https://github.com/discourse/discourse-bcc.git

```

---

<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:** [2022年四月18日 05:56 UTC](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381/25 "2022-04-18T05:56:58Z")

</div>

预计在重建期间网站将无法访问。

重建时是否出现错误？

您需要在添加插件的行上使用空格而不是制表符。我通过复制粘贴现有插件并进行编辑来完成此操作。

[下一頁](https://meta.discourse.org/t/just-created-my-first-instance-but-need-help/224381.md?page=2)
