# Self-hosting

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

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

**Page:** 64

---

## [针对 Let's Encrypt 的 Staging Environment 进行构建](https://meta.discourse.org/t/build-against-lets-encrypts-staging-environment/232645)

<div class="topic-metadata">

**Author:** [@manuel](https://meta.discourse.org/u/manuel)\
**回覆:** 1\
**Last updated:** [2022年七月12日 16:41 UTC](https://meta.discourse.org/t/build-against-lets-encrypts-staging-environment/232645 "2022-07-12T16:41:12Z")

</div>

我最近在稳定分支上尝试设置多站点时达到了速率限制。我在论坛上找到了一些建议来解决这个问题。尽管我还发现 Let’s Encrypt 只是建议重新构建……

---

## [如何在本地安装Discourse？](https://meta.discourse.org/t/how-to-install-discourse-locally/185116)

<div class="topic-metadata">

**Author:** [@Marcin\_J](https://meta.discourse.org/u/Marcin_J)\
**回覆:** 13\
**Last updated:** [2022年七月12日 15:45 UTC](https://meta.discourse.org/t/how-to-install-discourse-locally/185116 "2022-07-12T15:45:57Z")

</div>

我正在研究 Discourse 作为我项目论坛的候选方案。 我有点惊讶于运行该堆栈实际上是多么复杂。 在 GitHub 上有这个说明——它需要一个 SMTP 服务器和一个域名……

---

## [Discourse将服务器IP/localhost显示为用户的IP](https://meta.discourse.org/t/discourse-shows-server-ip-localhost-as-users-ip/232474)

<div class="topic-metadata">

**Author:** [@ay0ks](https://meta.discourse.org/u/ay0ks)\
**回覆:** 18\
**Last updated:** [2022年七月12日 14:18 UTC](https://meta.discourse.org/t/discourse-shows-server-ip-localhost-as-users-ip/232474 "2022-07-12T14:18:21Z")

</div>

您好，我已在自己的服务器上部署了 Discourse，一切正常，但无法检测到用户的 IP 地址。我甚至编写了一个 PHP 脚本（在 Docker 容器外部）来获取所有可能包含 IP 地址的标头： REMOTE\_ADDR: 212……

---

## [站点因更新失败而关闭：创建扩展名“unaccent”的权限被拒绝](https://meta.discourse.org/t/site-down-after-failed-update-permission-denied-to-create-extension-unaccent/232313)

<div class="topic-metadata">

**Author:** [@dhoop](https://meta.discourse.org/u/dhoop)\
**回覆:** 5\
**Last updated:** [2022年七月8日 18:20 UTC](https://meta.discourse.org/t/site-down-after-failed-update-permission-denied-to-create-extension-unaccent/232313 "2022-07-08T18:20:48Z")

</div>

通过 Web UI 升级失败，并出现此错误： INFO -- : \> cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' discourse@discourse ERROR: 拒绝创建扩展“unaccent”的权限 discourse@disc…

---

## [如何操作：discourse-sitemap 已弃用并已合并到 Discourse 的核心中。请将其从您的 app.yml 文件中删除。](https://meta.discourse.org/t/how-to-discourse-sitemap-is-deprecated-and-merged-into-discourses-core-please-remove-it-from-your-app-yml-file/229730)

<div class="topic-metadata">

**Author:** [@Pandabear](https://meta.discourse.org/u/Pandabear)\
**回覆:** 5\
**Last updated:** [2022年七月7日 09:18 UTC](https://meta.discourse.org/t/how-to-discourse-sitemap-is-deprecated-and-merged-into-discourses-core-please-remove-it-from-your-app-yml-file/229730 "2022-07-07T09:18:31Z")

</div>

大家好， 有人有关于如何删除 discourse-sitemap 的手册吗？谢谢，或者如果有人能帮我，我将非常感激。 我在控制面板中收到此消息

---

## [安装到子文件夹后，无法查看仪表板报告](https://meta.discourse.org/t/after-installing-in-a-subfolder-the-dashboard-report-cannot-be-viewed/232079)

<div class="topic-metadata">

**Author:** [@Swilder](https://meta.discourse.org/u/Swilder)\
**回覆:** 4\
**Last updated:** [2022年七月7日 03:15 UTC](https://meta.discourse.org/t/after-installing-in-a-subfolder-the-dashboard-report-cannot-be-viewed/232079 "2022-07-07T03:15:46Z")

</div>

配置安装为子文件夹后，管理仪表板无法查看图表 我的 app.yml 文件： 模板： - "templates/redis.template.yml" - "templates/web.template.yml" - "templates/web.socket..."

---

## [新安装的 Discourse-Doctor 出现 SMTPAuthenticationError](https://meta.discourse.org/t/smtpauthenticationerror-from-discourse-doctor-on-new-install/232030)

<div class="topic-metadata">

**Author:** [@linux4me](https://meta.discourse.org/u/linux4me)\
**回覆:** 4\
**Last updated:** [2022年七月6日 20:27 UTC](https://meta.discourse.org/t/smtpauthenticationerror-from-discourse-doctor-on-new-install/232030 "2022-07-06T20:27:58Z")

</div>

我在 Digital Ocean Droplet 中全新安装了 Discourse，过程还算顺利，但在注册管理员帐户时没有收到通知邮件。 我查看了故障排除邮件……

---

## [更新失败 - Babel聊天有剩余内容吗？](https://meta.discourse.org/t/update-failed-babel-chat-has-left-overs/231908)

<div class="topic-metadata">

**Author:** [@Heliosurge](https://meta.discourse.org/u/Heliosurge)\
**回覆:** 6\
**Last updated:** [2022年七月4日 21:16 UTC](https://meta.discourse.org/t/update-failed-babel-chat-has-left-overs/231908 "2022-07-04T21:16:41Z")

</div>

你好，最近遇到了引导失败。 Babel Chat早已从app.yml中移除，并且在此之后进行了多次站点重建。然而，在重建过程中提到了@Babel错误/请求。 通过搜索，我已经移除了它……

---

## [如何使用 Mail Jet 设置 Discourse？](https://meta.discourse.org/t/how-do-i-set-up-discourse-with-mail-jet/230242)

<div class="topic-metadata">

**Author:** [@KhoiUSA](https://meta.discourse.org/u/KhoiUSA)\
**回覆:** 7\
**Last updated:** [2022年六月17日 00:35 UTC](https://meta.discourse.org/t/how-do-i-set-up-discourse-with-mail-jet/230242 "2022-06-17T00:35:51Z")

</div>

您好，我刚开始设置 Discourse，并且已经准备好了一台用于 Discourse 的服务器，但是，我仍然需要一个 SMTP 服务器。我现在有一个 Mail Jet 账户，但我不知道如何为 Discourse 进行配置……

---

## [在 aarch64 上测试安装 - 报告错误失败：连接到 localhost:6379 上的 Redis 时出错](https://meta.discourse.org/t/test-installation-on-aarch64-failed-to-report-error-error-connecting-to-redis-on-localhost-6379/212763)

<div class="topic-metadata">

**Author:** [@esk8builders](https://meta.discourse.org/u/esk8builders)\
**回覆:** 13\
**Last updated:** [2022年七月3日 22:57 UTC](https://meta.discourse.org/t/test-installation-on-aarch64-failed-to-report-error-error-connecting-to-redis-on-localhost-6379/212763 "2022-07-03T22:57:18Z")

</div>

大家好， 我正在尝试在 aarch64 上进行安装测试 - Linux XXXXXX 5.4.17-2136.302.6.1.el8uek.aarch64 #2 SMP Tue Dec 14 12:00:21 PST 2021 aarch64 aarch64 aarch64 GNU/Linux 并出现了以下错误： I, \[2021-12-2…

---

## [重复性错误：“糟糕 - 此论坛软件遇到了意外问题。”](https://meta.discourse.org/t/recurring-error-oops-the-software-powering-this-discussion-forum-encountered-an-unexpected-problem/230939)

<div class="topic-metadata">

**Author:** [@GradientDescent.co](https://meta.discourse.org/u/GradientDescent.co)\
**回覆:** 5\
**Last updated:** [2022年六月27日 14:36 UTC](https://meta.discourse.org/t/recurring-error-oops-the-software-powering-this-discussion-forum-encountered-an-unexpected-problem/230939 "2022-06-27T14:36:00Z")

</div>

哎呀 此讨论论坛的软件遇到了意外问题。我们对造成的不便深表歉意。 有关错误的详细信息已被记录，并生成了自动通知。我们将…

---

## [如何在 Ionos VPS S 上设置 Discourse](https://meta.discourse.org/t/how-to-setup-discourse-on-ionos-vps-s/230986)

<div class="topic-metadata">

**Author:** [@na30](https://meta.discourse.org/u/na30)\
**回覆:** 2\
**Last updated:** [2022年六月24日 08:54 UTC](https://meta.discourse.org/t/how-to-setup-discourse-on-ionos-vps-s/230986 "2022-06-24T08:54:46Z")

</div>

你好。你认为会有什么限制？

---

## [Office 365 中禁用了基本身份验证](https://meta.discourse.org/t/basic-auth-disabled-in-office-365/228463)

<div class="topic-metadata">

**Author:** [@bigfudge](https://meta.discourse.org/u/bigfudge)\
**回覆:** 5\
**Last updated:** [2022年六月23日 08:04 UTC](https://meta.discourse.org/t/basic-auth-disabled-in-office-365/228463 "2022-06-23T08:04:55Z")

</div>

现在基本身份验证在 o365\* 中已基本失效（对我来说也失效了，因为我本周刚发现我们的 IT 部门已为所有帐户禁用了它），我想知道是否有计划支持其他身份验证方法……

---

## [网站宕机，由于 landing 插件导致重建失败](https://meta.discourse.org/t/site-down-rebuild-failed-due-to-landing-plugin/230571)

<div class="topic-metadata">

**Author:** [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)\
**回覆:** 15\
**Last updated:** [2022年六月22日 11:01 UTC](https://meta.discourse.org/t/site-down-rebuild-failed-due-to-landing-plugin/230571 "2022-06-22T11:01:17Z")

</div>

网站宕机。不确定原因。 曾出现助手故障（Malign几周前断开连接，已修复。但仍有随机作业失败。尝试升级到最新测试版，但未能更新。管理面板开始丢失一些…

---

## [异常：psql 失败：详细信息：键（post\_id）=（36946）重复。](https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356)

<div class="topic-metadata">

**Author:** [@MiG](https://meta.discourse.org/u/MiG)\
**回覆:** 7\
**Last updated:** [2022年六月20日 20:30 UTC](https://meta.discourse.org/t/exception-psql-failed-detail-key-post-id-36946-is-duplicated/230356 "2022-06-20T20:30:31Z")

</div>

我正在尝试将我的服务器迁移到新的主机，所以我下载了一个备份文件，并将其上传到新主机。安装了 Discourse 的新副本，并按照命令行中的说明进行操作： 不幸的是……

---

## [引导 Pups 失败::ExecError 'bundle exec rake db:migrate' 失败，返回 exec 失败，参数为 2.9.0.beta4 到 2.9.0.beta5](https://meta.discourse.org/t/failed-to-bootstrap-pups-execerror-bundle-exec-rake-db-migrate-failed-with-return-exec-failed-with-the-params-2-9-0-beta4-to-2-9-0-beta5/229753)

<div class="topic-metadata">

**Author:** [@iidbae](https://meta.discourse.org/u/iidbae)\
**回覆:** 6\
**Last updated:** [2022年六月20日 03:32 UTC](https://meta.discourse.org/t/failed-to-bootstrap-pups-execerror-bundle-exec-rake-db-migrate-failed-with-return-exec-failed-with-the-params-2-9-0-beta4-to-2-9-0-beta5/229753 "2022-06-20T03:32:59Z")

</div>

我两个月前将 Discourse 升级到了 2.9.0.beta4 34fba417f1。不幸的是，我忘记在升级页面上重新检查 ./launcher rebuild app。两天前我尝试重建时，我的磁盘空间不足……

---

## [Discourse 负载均衡器遇到问题，希望提供帮助](https://meta.discourse.org/t/discourse-load-balancer-encounters-problems-hoping-to-help/230271)

<div class="topic-metadata">

**Author:** [@Chengjiu\_Su](https://meta.discourse.org/u/Chengjiu_Su)\
**回覆:** 7\
**Last updated:** [2022年六月20日 01:52 UTC](https://meta.discourse.org/t/discourse-load-balancer-encounters-problems-hoping-to-help/230271 "2022-06-20T01:52:11Z")

</div>

配置了负载均衡的 discourse 配置后，访问出现问题。只有一个白板页面。负载均衡后端服务器配置可以正常。当负载均衡……

---

## [中止！未配置域名！](https://meta.discourse.org/t/aborting-domain-is-not-configured/230440)

<div class="topic-metadata">

**Author:** [@Jonathan5](https://meta.discourse.org/u/Jonathan5)\
**回覆:** 2\
**Last updated:** [2022年六月19日 22:57 UTC](https://meta.discourse.org/t/aborting-domain-is-not-configured/230440 "2022-06-19T22:57:01Z")

</div>

我记得在重建 Discourse 时没有看到以下内容。错误是“中止！未配置域！”和“中止！CDN 必须指定协议。修复后，您现在应该重新烘烤您的帖子……

---

## [将自托管的 Discourse 服务器从 http 更改为 https](https://meta.discourse.org/t/change-a-self-hosted-discourse-server-from-http-to-https/230393)

<div class="topic-metadata">

**Author:** [@alphonse23](https://meta.discourse.org/u/alphonse23)\
**回覆:** 2\
**Last updated:** [2022年六月18日 23:29 UTC](https://meta.discourse.org/t/change-a-self-hosted-discourse-server-from-http-to-https/230393 "2022-06-18T23:29:11Z")

</div>

嘿，伙计们， 我有一个自托管的 Discourse 服务器，我正在 EC2 上托管它，并且我通过套接字进行了设置，该套接字通过 Nginx 代理以设置域名。 我遇到的问题是，我无法让服务器 t…

---

## [S3 assets 文件夹，是否需要清理？](https://meta.discourse.org/t/s3-assets-folder-is-a-cleanup-needed/230367)

<div class="topic-metadata">

**Author:** [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**回覆:** 2\
**Last updated:** [2022年六月18日 20:58 UTC](https://meta.discourse.org/t/s3-assets-folder-is-a-cleanup-needed/230367 "2022-06-18T20:58:38Z")

</div>

我现在使用 Scaleway 对象存储将近两年了，几乎完美无缺，但 S3\_upload 在上次重建过程中首次超时，是网络问题吗？也许……第二次就好了，但这让我看起来……

---

## [S3上的多站点备份问题--备份存储在根目录](https://meta.discourse.org/t/trouble-with-multisite-backups-on-s3-backups-stored-in-root/229945)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 5\
**Last updated:** [2022年六月17日 21:14 UTC](https://meta.discourse.org/t/trouble-with-multisite-backups-on-s3-backups-stored-in-root/229945 "2022-06-17T21:14:29Z")

</div>

我在 AWS EC2 上有一个多站点实例。我的备份配置如下： DISCOURSE\_S3\_BACKUP\_BUCKET: lc-sitename DISCOURSE\_S3\_SECRET\_ACCESS\_KEY: secret-key DISCOURSE\_S3\_ACCESS\_KEY\_ID: key-id DISCOURSE\_BACKUP……

---

## [使用 discourse-setup（初始简单 docker）无法禁用 ssl](https://meta.discourse.org/t/cannot-disable-ssl-with-discourse-setup-initial-simple-docker/230300)

<div class="topic-metadata">

**Author:** [@ecki](https://meta.discourse.org/u/ecki)\
**回覆:** 2\
**Last updated:** [2022年六月17日 15:03 UTC](https://meta.discourse.org/t/cannot-disable-ssl-with-discourse-setup-initial-simple-docker/230300 "2022-06-17T15:03:59Z")

</div>

你好， 当我安装简单的docker场景并且不输入Let’s encrypt电子邮件（因为我有反向代理）时，由此产生的安装无法启动，因为它在nginx中获取证书时会循环……

---

## [Logo不显示](https://meta.discourse.org/t/logos-not-showing/230183)

<div class="topic-metadata">

**Author:** [@Honeyxilia](https://meta.discourse.org/u/Honeyxilia)\
**回覆:** 9\
**Last updated:** [2022年六月17日 08:14 UTC](https://meta.discourse.org/t/logos-not-showing/230183 "2022-06-17T08:14:08Z")

</div>

你好，在我新创建的 Discourse 论坛上，我通过“品牌”部分尝试插入我的 logo、logo small 和 favicon。设置完成后，它们在网站上都不可见 :confused: 你能帮忙吗……

---

## [更新 Discourse 时出现迁移版本错误](https://meta.discourse.org/t/migration-version-error-when-updating-discourse/229985)

<div class="topic-metadata">

**Author:** [@hyphalos](https://meta.discourse.org/u/hyphalos)\
**回覆:** 4\
**Last updated:** [2022年六月15日 23:27 UTC](https://meta.discourse.org/t/migration-version-error-when-updating-discourse/229985 "2022-06-15T23:27:29Z")

</div>

你好 我正在尝试更新 Discourse，但一直遇到这个错误： discourse-user-card-badges 已是最新兼容版本 docker\_manager 已是最新兼容版本 discourse-extra-group-cla…

---

## [升级容器 - 保留配置和数据](https://meta.discourse.org/t/upgrade-container-keeping-config-and-data/229968)

<div class="topic-metadata">

**Author:** [@tschloss](https://meta.discourse.org/u/tschloss)\
**回覆:** 8\
**Last updated:** [2022年六月15日 21:32 UTC](https://meta.discourse.org/t/upgrade-container-keeping-config-and-data/229968 "2022-06-15T21:32:38Z")

</div>

大家好， 我对自己找不到这些信息感到非常糟糕，我认为这些信息非常基础。实际上，这并不是关于第一次启动和运行它，而是这个类别对我来说是……

---

## [性能优化技巧](https://meta.discourse.org/t/performance-optimisation-tips/226812)

<div class="topic-metadata">

**Author:** [@Dmitry\_Krasnoperov](https://meta.discourse.org/u/Dmitry_Krasnoperov)\
**回覆:** 3\
**Last updated:** [2022年六月15日 12:39 UTC](https://meta.discourse.org/t/performance-optimisation-tips/226812 "2022-06-15T12:39:46Z")

</div>

您好， 我们有一个相当大的网站（PG 库为 97GB）+ 我们存储了 256GB 的图片。 它运行在 Digital Ocean 服务器上 — 6 vCPU / 16GB / 320GB 磁盘。 有什么技巧、窍门、脚本可以优化 PG，重建一些东西……

---

## [电子邮件无法正常工作 (SSL\_connect 返回=1)](https://meta.discourse.org/t/email-not-working-ssl-connect-returned-1/229934)

<div class="topic-metadata">

**Author:** [@mstm](https://meta.discourse.org/u/mstm)\
**回覆:** 15\
**Last updated:** [2022年六月15日 12:37 UTC](https://meta.discourse.org/t/email-not-working-ssl-connect-returned-1/229934 "2022-06-15T12:37:06Z")

</div>

感谢 @flink91，我刚更新了，对我来说它仍然不发送电子邮件。 我使用 SMTP 端口 25，没有 TLS 和 SSL，日志中没有错误，明天我会发布详细信息，我希望……

---

## [Ubuntu 20.04 内核更新与 docker 导致 EC2 和 Lightsail 崩溃](https://meta.discourse.org/t/ubuntu-20-04-kernel-update-with-docker-causing-a-crash-on-ec2-and-lightsail/229526)

<div class="topic-metadata">

**Author:** [@RBoy](https://meta.discourse.org/u/RBoy)\
**回覆:** 7\
**Last updated:** [2022年六月14日 01:54 UTC](https://meta.discourse.org/t/ubuntu-20-04-kernel-update-with-docker-causing-a-crash-on-ec2-and-lightsail/229526 "2022-06-14T01:54:20Z")

</div>

我昨晚遇到了这个问题，当我的 Ubuntu 20.04 LTS 自动升级时，它安装了一个新内核，我失去了对系统的控制，它会在启动几分钟后崩溃。我今天又试了一次……

---

## [恢复帮助 - 系统在午夜挂起](https://meta.discourse.org/t/help-restoring-system-hung-at-midnight/229486)

<div class="topic-metadata">

**Author:** [@RBoy](https://meta.discourse.org/u/RBoy)\
**回覆:** 26\
**Last updated:** [2022年六月13日 20:45 UTC](https://meta.discourse.org/t/help-restoring-system-hung-at-midnight/229486 "2022-06-13T20:45:46Z")

</div>

好吧，这迟早会发生，事情太顺利太久了。多年来一直处于自动驾驶模式，系统会自动更新，我每隔几周更新一次 Discourse。昨晚午夜……

---

## [app.yml 中的 SMTP 设置已重置？](https://meta.discourse.org/t/smtp-settings-in-app-yml-reset/229762)

<div class="topic-metadata">

**Author:** [@keith1](https://meta.discourse.org/u/keith1)\
**回覆:** 4\
**Last updated:** [2022年六月13日 19:34 UTC](https://meta.discourse.org/t/smtp-settings-in-app-yml-reset/229762 "2022-06-13T19:34:23Z")

</div>

我感觉我快疯了，但我已经几个月没管我的网站了，终于去获取一些更新了——我的docker已经过时了，所以尝试运行 ./launcher rebuild app 但是，我遇到了一个……

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

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