# Self-hosting

**URL:** https://meta.discourse.org/c/support/self-hosting/31.md?page=23

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 24

---

## [Mailhog未收到Discourse邮件](https://meta.discourse.org/t/mailhog-not-receiving-discourse-emails/314004)

<div class="topic-metadata">

**Author:** [@luigi7up](https://meta.discourse.org/u/luigi7up)\
**回覆:** 0\
**Last updated:** [2024年六月27日 16:05 UTC](https://meta.discourse.org/t/mailhog-not-receiving-discourse-emails/314004 "2024-06-27T16:05:57Z")

</div>

你好， 我正在我的MacBook（M2）上设置Discourse，以在托管到其他地方之前试用它。我已克隆了仓库，并配置了app.yml以使用Mailhog： env： LC\_ALL: en\_US.UTF-8 LANG: en\_US.UTF-8 LANGUAGE…

---

## [通知反应迟缓导致严重延误](https://meta.discourse.org/t/notifications-are-slow-causing-major-delays/313991)

<div class="topic-metadata">

**Author:** [@Mr.X\_Mr.X](https://meta.discourse.org/u/Mr.X_Mr.X)\
**回覆:** 1\
**Last updated:** [2024年六月27日 14:24 UTC](https://meta.discourse.org/t/notifications-are-slow-causing-major-delays/313991 "2024-06-27T14:24:53Z")

</div>

我刚刚将我的实例合并，没有创建另一个实例，使总帖子数达到150万，注册用户超过15万。问题是通知延迟（收到的喜欢、私人消息、新的 po…

---

## [安装这些插件时重建失败](https://meta.discourse.org/t/rebuild-fails-when-these-plugins-are-present/310455)

<div class="topic-metadata">

**Author:** [@KhoiUSA](https://meta.discourse.org/u/KhoiUSA)\
**回覆:** 9\
**Last updated:** [2024年六月26日 00:30 UTC](https://meta.discourse.org/t/rebuild-fails-when-these-plugins-are-present/310455 "2024-06-26T00:30:58Z")

</div>

您好，我最近在重建我的网站时发现该过程一直出错。在故障排除步骤中，我删除了我网站上的所有插件（所有插件都是官方的），并且网站得以重建。 有人能帮我检查一下我下面使用的官方插件，看看是否有插件在重建过程中出现问题？谢谢。 ## 插件在此处 ## 详情请参阅 https://meta.discourse.org/t/19157 hooks: after\_code: - exec: cd: $home/plug…

---

## [构建时出错：discourse 不支持通过 sprockets 编译 scss/sass 文件](https://meta.discourse.org/t/error-when-building-discourse-does-not-support-compiling-scss-sass-files-via-sprockets/305402)

<div class="topic-metadata">

**Author:** [@hytallenxu-sama](https://meta.discourse.org/u/hytallenxu-sama)\
**回覆:** 11\
**Last updated:** [2024年六月25日 20:08 UTC](https://meta.discourse.org/t/error-when-building-discourse-does-not-support-compiling-scss-sass-files-via-sprockets/305402 "2024-06-25T20:08:50Z")

</div>

我在准备启动网站时打开网页时发现了这个错误。我不知道如何解决，有人可以帮我吗

---

## [尝试使用给定命令将 2.9 升级到 3.3 = 一切都出现故障（故障状态）](https://meta.discourse.org/t/attempted-to-upgrade-2-9-3-3-using-given-commands-everything-is-down-faulted-state/313277)

<div class="topic-metadata">

**Author:** [@Vlad\_Romanov](https://meta.discourse.org/u/Vlad_Romanov)\
**回覆:** 8\
**Last updated:** [2024年六月25日 15:31 UTC](https://meta.discourse.org/t/attempted-to-upgrade-2-9-3-3-using-given-commands-everything-is-down-faulted-state/313277 "2024-06-25T15:31:59Z")

</div>

大家好， 我们在 Digital Ocean 的虚拟机上运行一个 Discourse 论坛。更新速度有点慢。 今天早上，我们尝试使用管理员控制台提供的3个命令，将版本从2.9升级到3.3。登录到虚拟机后……

---

## [AI模块不使用代理设置](https://meta.discourse.org/t/ai-module-does-not-take-proxy-settings/311913)

<div class="topic-metadata">

**Author:** [@peyrusse](https://meta.discourse.org/u/peyrusse)\
**回覆:** 2\
**Last updated:** [2024年六月25日 10:06 UTC](https://meta.discourse.org/t/ai-module-does-not-take-proxy-settings/311913 "2024-06-25T10:06:20Z")

</div>

您好， 我有一个内联网安装，并且使用AI扩展。 我已通过Docker设置配置，以便在容器运行时传递代理设置。我可以检查例如Discourse更新和……

---

## [是否有办法在不重建的情况下使用nginx conf值进行播放？](https://meta.discourse.org/t/any-way-to-play-with-nginx-conf-values-without-rebuilding/311360)

<div class="topic-metadata">

**Author:** [@helmi](https://meta.discourse.org/u/helmi)\
**回覆:** 13\
**Last updated:** [2024年六月24日 14:48 UTC](https://meta.discourse.org/t/any-way-to-play-with-nginx-conf-values-without-rebuilding/311360 "2024-06-24T14:48:55Z")

</div>

我已经在 app.yml 中的替换规则中为 nginx 设置了更高的 worker\_connections 和 worker\_processes 值。 不过，我想尝试一下找到最佳值，最好是不需要每次重建 discourse。

---

## [安装疑问](https://meta.discourse.org/t/installation-doubt/313161)

<div class="topic-metadata">

**Author:** [@shawa](https://meta.discourse.org/u/shawa)\
**回覆:** 1\
**Last updated:** [2024年六月22日 08:03 UTC](https://meta.discourse.org/t/installation-doubt/313161 "2024-06-22T08:03:52Z")

</div>

在安装过程中，看到这个提示时，请问它是否会有任何影响？

---

## [在标准安装中，'discourse.' 必须作为 URL 的起始部分吗？](https://meta.discourse.org/t/compulsory-for-discourse-to-be-the-start-of-the-url-in-a-standard-install/313170)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 2\
**Last updated:** [2024年六月22日 05:51 UTC](https://meta.discourse.org/t/compulsory-for-discourse-to-be-the-start-of-the-url-in-a-standard-install/313170 "2024-06-22T05:51:49Z")

</div>

在标准安装中，Discourse 论坛的网址必须以 discourse. 开头吗？Github README 中的示例使用了 discourse.example.com，这让我产生了疑问。

---

## [在将旧的 Discourse 版本更新到最新版本时，需要注意什么？](https://meta.discourse.org/t/what-to-be-aware-of-when-updating-an-old-discourse-version-to-the-latest/313086)

<div class="topic-metadata">

**Author:** [@bayardo.rivas](https://meta.discourse.org/u/bayardo.rivas)\
**回覆:** 5\
**Last updated:** [2024年六月22日 02:04 UTC](https://meta.discourse.org/t/what-to-be-aware-of-when-updating-an-old-discourse-version-to-the-latest/313086 "2024-06-22T02:04:55Z")

</div>

我需要更新Discourse论坛，我还不知道当前版本，但我猜它已经有1年没有更新了。我的一些疑问是：是否有特别的步骤来更新这台服务器……

---

## [将 nginx Web 服务器拆分出来](https://meta.discourse.org/t/separating-out-the-nginx-web-server/313068)

<div class="topic-metadata">

**Author:** [@Isambard](https://meta.discourse.org/u/Isambard)\
**回覆:** 1\
**Last updated:** [2024年六月21日 16:57 UTC](https://meta.discourse.org/t/separating-out-the-nginx-web-server/313068 "2024-06-21T16:57:55Z")

</div>

我在这里看到一些将 Nginx 作为反向代理放在 Discourse 前面的例子。这可能是个不错的方法，因为你可以保持所有 Discourse 部分不变。 不过，最终你还是会遇到一背靠一背的 Nginx 实例……

---

## [将 mailcow 作为 Discourse 的电子邮件服务](https://meta.discourse.org/t/using-mailcow-as-the-email-service-of-discourse/312832)

<div class="topic-metadata">

**Author:** [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)\
**回覆:** 6\
**Last updated:** [2024年六月21日 01:44 UTC](https://meta.discourse.org/t/using-mailcow-as-the-email-service-of-discourse/312832 "2024-06-21T01:44:31Z")

</div>

大家好，我正在设置一个自托管的Discourse论坛，打算使用mailcow来发送邮件。有人知道如何与Discourse正确设置吗？谢谢。

---

## [IPTables 和 UFW 问题](https://meta.discourse.org/t/iptables-and-ufw-problems/312878)

<div class="topic-metadata">

**Author:** [@Arnold](https://meta.discourse.org/u/Arnold)\
**回覆:** 10\
**Last updated:** [2024年六月20日 19:59 UTC](https://meta.discourse.org/t/iptables-and-ufw-problems/312878 "2024-06-20T19:59:59Z")

</div>

大家好， 通常当我运行一个网页服务器时，我会与 Cloudflare 一起使用这个脚本： 我不喜欢公开的后端IP，因为即使在后面，也可以用 Censys 或类似的工具轻易找到……

---

## [使用 \`curl\` 或 \`wget\` 下载备份](https://meta.discourse.org/t/download-backup-with-curl-or-wget/135203)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 8\
**Last updated:** [2024年六月20日 17:11 UTC](https://meta.discourse.org/t/download-backup-with-curl-or-wget/135203 "2024-06-20T17:11:47Z")

</div>

我偶尔需要从无法通过SSH的实例下载备份，虽然用我的家庭互联网连接下载2GB数据（speedtest.net声称我可以达到近500Mbps的下载速度）并不困难，但上传...

---

## [当取消 S3 时，图片链接或文件链接应自动显示本地路径](https://meta.discourse.org/t/when-s3-is-canceled-image-links-or-file-links-should-automatically-show-the-local-path/312291)

<div class="topic-metadata">

**Author:** [@kuaza](https://meta.discourse.org/u/kuaza)\
**回覆:** 2\
**Last updated:** [2024年六月20日 16:04 UTC](https://meta.discourse.org/t/when-s3-is-canceled-image-links-or-file-links-should-automatically-show-the-local-path/312291 "2024-06-20T16:04:35Z")

</div>

为什么当我取消 S3 时，图片链接会被替换回原始的 S3 链接？也就是说，cdn.domain.com 的 CDN URL 只会变成像 qsdqdqsdqsd.qsdsqdqsdqs.cloudflare.com 这样的图片链接。我们最好能……

---

## [包含 S3 上传时恢复失败](https://meta.discourse.org/t/restore-fails-when-including-s3-uploads/236567)

<div class="topic-metadata">

**Author:** [@serios](https://meta.discourse.org/u/serios)\
**回覆:** 4\
**Last updated:** [2024年六月20日 14:48 UTC](https://meta.discourse.org/t/restore-fails-when-including-s3-uploads/236567 "2024-06-20T14:48:48Z")

</div>

我成功使用S3进行文件上传和备份。但还原只有在我通过“是（不包括上传内容）”排除上传时才会成功。如果我在备份时只选择“是”且包含上传……

---

## [Launcher 重建应用程序失败，显示 "containers/app.yml 不存在"](https://meta.discourse.org/t/launcher-rebuild-app-fails-with-containers-app-yml-does-not-exist/312787)

<div class="topic-metadata">

**Author:** [@rlauriston](https://meta.discourse.org/u/rlauriston)\
**回覆:** 5\
**Last updated:** [2024年六月19日 21:36 UTC](https://meta.discourse.org/t/launcher-rebuild-app-fails-with-containers-app-yml-does-not-exist/312787 "2024-06-19T21:36:35Z")

</div>

上传页面告诉我： 必须先运行最新映像，然后才能通过 Web UI 进行更新。为此，请使用 SSH 登录到您的服务器并运行： cd /var/discourse git pull ./launcher rebuild app 第一次运行时，它运行了一段时间然后以错误结束。如果我再试一次，我会得到： ./launcher rebuild app x86\_64 arch detected. ERROR: containers/app…

---

## [v3.3.0.beta3-dev中的最新提交似乎导致Discourse出现问题](https://meta.discourse.org/t/latest-commits-in-v3-3-0-beta3-dev-seems-to-break-discourse/311721)

<div class="topic-metadata">

**Author:** [@ja3](https://meta.discourse.org/u/ja3)\
**回覆:** 7\
**Last updated:** [2024年六月19日 21:33 UTC](https://meta.discourse.org/t/latest-commits-in-v3-3-0-beta3-dev-seems-to-break-discourse/311721 "2024-06-19T21:33:17Z")

</div>

我们的自托管实例在使用最新提交（6月10日及之后的提交，因为其中一个在6月10日的构建运行良好）重建后出现故障。我们位于 tests-passed 更新分支。 对于非管理员（以及非…

---

## [如何在不使用SMTP的情况下，为通知设置Office365/Exchange的外发Discourse邮件](https://meta.discourse.org/t/how-to-setup-outgoing-discourse-mails-from-office365-exchange-for-notifications-without-using-smtp/312724)

<div class="topic-metadata">

**Author:** [@martin.spindler](https://meta.discourse.org/u/martin.spindler)\
**回覆:** 1\
**Last updated:** [2024年六月19日 15:13 UTC](https://meta.discourse.org/t/how-to-setup-outgoing-discourse-mails-from-office365-exchange-for-notifications-without-using-smtp/312724 "2024-06-19T15:13:49Z")

</div>

嘿，大家好， 有没有办法在不使用SMTP的情况下设置Discourse的外发邮件通知？我们需要使用Exchange / Office365。如何在不在微软端启用SMTP的情况下进行设置/验证？ 我们正在使用……

---

## [云安装无法正常工作](https://meta.discourse.org/t/cloud-installation-is-not-working/222939)

<div class="topic-metadata">

**Author:** [@jucajuca](https://meta.discourse.org/u/jucajuca)\
**回覆:** 11\
**Last updated:** [2024年六月19日 09:20 UTC](https://meta.discourse.org/t/cloud-installation-is-not-working/222939 "2024-06-19T09:20:03Z")

</div>

我正在按照指示安装discourse。机器空间充足，所以我不明白为什么安装失败。 x86\_64架构已检测到。 确保launcher是最新的 获取来源 …

---

## [迁移 Discourse 从 main domain --\> subdomain](https://meta.discourse.org/t/migrate-discourse-from-main-domain-subdomain/312424)

<div class="topic-metadata">

**Author:** [@Timothy\_Vail](https://meta.discourse.org/u/Timothy_Vail)\
**回覆:** 4\
**Last updated:** [2024年六月18日 20:33 UTC](https://meta.discourse.org/t/migrate-discourse-from-main-domain-subdomain/312424 "2024-06-18T20:33:30Z")

</div>

您好，我查阅了关于此主题的几篇文章，但有些文章已有 4 或 5 年之久，我不确定它们是否仍然适用。 我只是想将我的 discourse 移动到一个子域，在发现它无法工作之后……

---

## [彻底删除系统中的用户数据](https://meta.discourse.org/t/completely-remove-user-data-from-the-system/310629)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**回覆:** 7\
**Last updated:** [2024年六月18日 13:09 UTC](https://meta.discourse.org/t/completely-remove-user-data-from-the-system/310629 "2024-06-18T13:09:34Z")

</div>

嘿，我们可能需要一种从数据库中彻底删除用户所有痕迹的方法。我不会详述，因为这很敏感，而且由于 GDPR，我们可能必须证明我们不保留任何……

---

## [启动器重建错误](https://meta.discourse.org/t/launcher-rebuild-errors/312441)

<div class="topic-metadata">

**Author:** [@Truest](https://meta.discourse.org/u/Truest)\
**回覆:** 4\
**Last updated:** [2024年六月18日 03:56 UTC](https://meta.discourse.org/t/launcher-rebuild-errors/312441 "2024-06-18T03:56:29Z")

</div>

\-------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' 失败，返回 #\<Process::Status: pid 1006 exit 1\> 故障位置：/usr/local/lib/ruby/gems/3.3.0/gems…

---

## [在生产环境中改变日志级别吗？](https://meta.discourse.org/t/alter-log-level-in-production/238375)

<div class="topic-metadata">

**Author:** [@griegm](https://meta.discourse.org/u/griegm)\
**回覆:** 5\
**Last updated:** [2024年六月17日 22:42 UTC](https://meta.discourse.org/t/alter-log-level-in-production/238375 "2024-06-17T22:42:31Z")

</div>

嘿！ 我目前正在尝试调试一些只在生产模式环境中发生的慢查询。我注意到日志级别似乎在生产模式中被硬编码（代码引用）……

---

## [GeoLite2 在 MaxmindDB 网站上](https://meta.discourse.org/t/geolite2-on-the-maxminddb-site/312308)

<div class="topic-metadata">

**Author:** [@Truest](https://meta.discourse.org/u/Truest)\
**回覆:** 4\
**Last updated:** [2024年六月17日 19:51 UTC](https://meta.discourse.org/t/geolite2-on-the-maxminddb-site/312308 "2024-06-17T19:51:46Z")

</div>

消息 找不到 MaxMindDB (/var/www/discourse/vendor/data/GeoLite2-City.mmdb)：No such file or directory @ rb\_sysopen - /var/www/discourse/vendor/data/GeoLite2-City.mmdb 回溯 /var/www/discourse/lib/discourse\_ip\_info.rb:88:in \`res…

---

## [更新未完成，Discourse无法打开](https://meta.discourse.org/t/update-not-completed-and-discourse-not-opening/312416)

<div class="topic-metadata">

**Author:** [@Kumandan](https://meta.discourse.org/u/Kumandan)\
**回覆:** 16\
**Last updated:** [2024年六月17日 19:28 UTC](https://meta.discourse.org/t/update-not-completed-and-discourse-not-opening/312416 "2024-06-17T19:28:55Z")

</div>

Hello community Yesterday I got an error during the update. I tried to do the update from the admin panel via the forum. I have tried this from the SSH terminal with the ./launcher rebuild app method, but my problem is…

---

## [Docker clean 命令的影响](https://meta.discourse.org/t/the-impact-of-the-docker-clean-command/312435)

<div class="topic-metadata">

**Author:** [@Truest](https://meta.discourse.org/u/Truest)\
**回覆:** 2\
**Last updated:** [2024年六月17日 18:51 UTC](https://meta.discourse.org/t/the-impact-of-the-docker-clean-command/312435 "2024-06-17T18:51:48Z")

</div>

assets ' failed with return #&lt;Process::Status: pid 1222 exit 1&gt; Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec\_command.rb:132 \`spawn' exec failed with the params {"cd"=&gt;"$home"…

---

## [聊天插件缺失](https://meta.discourse.org/t/chat-plugin-missing/312300)

<div class="topic-metadata">

**Author:** [@mynoxin](https://meta.discourse.org/u/mynoxin)\
**回覆:** 5\
**Last updated:** [2024年六月17日 06:40 UTC](https://meta.discourse.org/t/chat-plugin-missing/312300 "2024-06-17T06:40:16Z")

</div>

您好， 我运行的是最新版（3.2.2）的Discourse，但我的聊天插件完全找不到。我在后台找不到它，右上角的符号也不显示。它在哪里？我找不到安装的解决方案…

---

## [升级带有未知本地更改的 v2.2.0.beta4 版论坛](https://meta.discourse.org/t/upgrading-v2-2-0-beta4-forum-with-unknown-local-changes/310241)

<div class="topic-metadata">

**Author:** [@manton](https://meta.discourse.org/u/manton)\
**回覆:** 42\
**Last updated:** [2024年六月17日 00:40 UTC](https://meta.discourse.org/t/upgrading-v2-2-0-beta4-forum-with-unknown-local-changes/310241 "2024-06-17T00:40:42Z")

</div>

您好， 我已经接管了一个论坛的管理工作。目前的 Discourse 版本非常过时。\[v2.2.0.beta4 +241\] 我需要通过 SSH 进行更新，这我可以做到，但是： 当我执行 git pull 时，它显示：“error: "Your local changes to the following files would be overwritten by merge: image/base/Dockerfile Pleas…

---

## [链接图片未显示](https://meta.discourse.org/t/link-image-not-shown/312247)

<div class="topic-metadata">

**Author:** [@mynoxin](https://meta.discourse.org/u/mynoxin)\
**回覆:** 16\
**Last updated:** [2024年六月16日 21:57 UTC](https://meta.discourse.org/t/link-image-not-shown/312247 "2024-06-16T21:57:53Z")

</div>

大家好， 我有两个问题： 当我发布一个链接时，那个链接的图片没有在我的帖子中显示。但在那个帖子的草稿中显示了。所以，这里发生了什么以及我该如何解决？ 谢谢！

[上一頁](https://meta.discourse.org/c/support/self-hosting/31.md?page=22)

[下一頁](https://meta.discourse.org/c/support/self-hosting/31.md?page=24)
