# Self-hosting

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

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

**Page:** 50

---

## [外部postgres设置不起作用](https://meta.discourse.org/t/external-postgres-setup-not-working/259657)

<div class="topic-metadata">

**Author:** [@deepak\_b](https://meta.discourse.org/u/deepak_b)\
**回覆:** 4\
**Last updated:** [2023年四月11日 11:54 UTC](https://meta.discourse.org/t/external-postgres-setup-not-working/259657 "2023-04-11T11:54:28Z")

</div>

我们按照以下博客设置了 Discourse 以使用单独的 PostgreSQL（AWS RDS）。 运行 ./launcher rebuild app 后出现以下错误（附图）： Caused by: PG::InvalidSchemaName: ERROR: no schema has been …

---

## [自动备份监控](https://meta.discourse.org/t/automatic-backup-monitoring/261122)

<div class="topic-metadata">

**Author:** [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)\
**回覆:** 7\
**Last updated:** [2023年四月10日 19:58 UTC](https://meta.discourse.org/t/automatic-backup-monitoring/261122 "2023-04-10T19:58:37Z")

</div>

我们配置了自动备份。据我所知，它们运行正常，但我们希望通过一个简单的服务来监控它们，例如 https://healthchecks.io，以确保万无一失。 有什么办法可以……

---

## [更改主机名](https://meta.discourse.org/t/changing-hostname/260954)

<div class="topic-metadata">

**Author:** [@ibahnasy](https://meta.discourse.org/u/ibahnasy)\
**回覆:** 8\
**Last updated:** [2023年四月10日 16:52 UTC](https://meta.discourse.org/t/changing-hostname/260954 "2023-04-10T16:52:48Z")

</div>

我从一个正在运行的实例中导出了一个旧版本的 Discourse 容器和 Discourse docker 文件，并将其导入到另一台服务器上。 我需要更改 Discourse 的主机名以匹配新服务器。 是否有...

---

## [升级后网站一直停止](https://meta.discourse.org/t/site-keeps-stopping-since-upgrade/261173)

<div class="topic-metadata">

**Author:** [@M0VSE](https://meta.discourse.org/u/M0VSE)\
**回覆:** 1\
**Last updated:** [2023年四月10日 11:48 UTC](https://meta.discourse.org/t/site-keeps-stopping-since-upgrade/261173 "2023-04-10T11:48:34Z")

</div>

我的一个网站已经运行了18个月以上，运行得非常好。我注意到它运行在Debian buster上，于是升级到了bullseye，并将Discourse升级到了3.1.0.beta3。从那以后，我注意到每天早上，网站都会出现

---

## [警告：无法创建服务器 TCP 侦听套接字 \*:6379：bind：地址已在使用中](https://meta.discourse.org/t/warning-could-not-create-server-tcp-listening-socket-bind-address-already-in-use/261100)

<div class="topic-metadata">

**Author:** [@MrAli](https://meta.discourse.org/u/MrAli)\
**回覆:** 3\
**Last updated:** [2023年四月9日 20:21 UTC](https://meta.discourse.org/t/warning-could-not-create-server-tcp-listening-socket-bind-address-already-in-use/261100 "2023-04-09T20:21:41Z")

</div>

您好！ 我在尝试安装 Discourse 时，在全新的 Ubuntu 22.04 上遇到了此错误。 我认为我可能需要更改 Redis 端口！ 附注：我正在尝试通过 AAAA 记录配置 IPv6。 警告：无法创建服务器 TCP 侦听套接字……

---

## [未知主键](https://meta.discourse.org/t/unknown-primary-key/260985)

<div class="topic-metadata">

**Author:** [@ibahnasy](https://meta.discourse.org/u/ibahnasy)\
**回覆:** 5\
**Last updated:** [2023年四月9日 15:17 UTC](https://meta.discourse.org/t/unknown-primary-key/260985 "2023-04-09T15:17:28Z")

</div>

当我尝试登录时，我收到以下信息： Started POST “/session” for at 2023-04-07 20:57:15 +0000 Processing by SessionController#create as \*/\* Parameters: {“login”=\>“”, “password”=\>“\[FILTERED\]”, “second\_factor\_method”=\>“…

---

## [在容器内重启/重建应用](https://meta.discourse.org/t/restart-rebuild-app-inside-the-container/260983)

<div class="topic-metadata">

**Author:** [@ibahnasy](https://meta.discourse.org/u/ibahnasy)\
**回覆:** 1\
**Last updated:** [2023年四月8日 18:56 UTC](https://meta.discourse.org/t/restart-rebuild-app-inside-the-container/260983 "2023-04-08T18:56:19Z")

</div>

如何在不使用启动脚本的情况下，在容器内直接手动重建应用程序？

---

## [Discourse-setup: 第260行：\*0：语法错误：应为操作数（错误标记为“\*0”）](https://meta.discourse.org/t/discourse-setup-line-260-0-syntax-error-operand-expected-error-token-is-0/260991)

<div class="topic-metadata">

**Author:** [@laplasz](https://meta.discourse.org/u/laplasz)\
**回覆:** 7\
**Last updated:** [2023年四月8日 10:32 UTC](https://meta.discourse.org/t/discourse-setup-line-260-0-syntax-error-operand-expected-error-token-is-0/260991 "2023-04-08T10:32:26Z")

</div>

首次安装时遇到此错误： discourse-setup: 第 260 行: \*0: 语法错误: 操作数预期 (错误标记为“\*0”) 您的 Discourse 的主机名？ \[discourse.example.com\]: 有什么建议知道哪里出错了？

---

## [处理电子邮件投诉和退回？退出 AWS SES 沙盒？](https://meta.discourse.org/t/handling-email-complaints-and-bounces-exiting-aws-ses-sandbox/260845)

<div class="topic-metadata">

**Author:** [@shyguy](https://meta.discourse.org/u/shyguy)\
**回覆:** 1\
**Last updated:** [2023年四月7日 18:17 UTC](https://meta.discourse.org/t/handling-email-complaints-and-bounces-exiting-aws-ses-sandbox/260845 "2023-04-07T18:17:23Z")

</div>

我被困在SES沙盒炼狱几天了，除了最初的自动回复外，没有收到任何回复。 我正在寻找两件事。 如何摆脱沙盒的技巧 以及我如何真正实现他们想要的……

---

## [您对在 Vultr Marketplace 上列出 Discourse 的看法](https://meta.discourse.org/t/your-thoughts-on-listing-discourse-on-vultr-marketplace/260923)

<div class="topic-metadata">

**Author:** [@sobriety](https://meta.discourse.org/u/sobriety)\
**回覆:** 2\
**Last updated:** [2023年四月7日 16:23 UTC](https://meta.discourse.org/t/your-thoughts-on-listing-discourse-on-vultr-marketplace/260923 "2023-04-07T16:23:51Z")

</div>

您好 Discourse 社区， 请注意 - 如果这里已经讨论过这个问题，我真的非常抱歉！ 我已向 Discourse 支持团队提出请求，希望将该应用程序列入 Vultr 市场，以便于访问和提高可见度。它已经……

---

## [Raspberry Pi 4 8GB 新安装后出现欢迎使用 nginx！页面](https://meta.discourse.org/t/welcome-to-nginx-page-after-fresh-installation-on-raspberry-pi-4-8gb/260879)

<div class="topic-metadata">

**Author:** [@Xcept](https://meta.discourse.org/u/Xcept)\
**回覆:** 9\
**Last updated:** [2023年四月7日 13:46 UTC](https://meta.discourse.org/t/welcome-to-nginx-page-after-fresh-installation-on-raspberry-pi-4-8gb/260879 "2023-04-07T13:46:35Z")

</div>

在树莓派上全新安装 Discourse 后，我看到了“欢迎使用 nginx！”页面。 我该如何解决？ 日志： containers/app.yml 配置文件已成功更新！ 更新成功。正在重建，5 秒后...

---

## [设置独立的Redis时出错](https://meta.discourse.org/t/error-setting-up-with-separate-redis/260859)

<div class="topic-metadata">

**Author:** [@silverdr](https://meta.discourse.org/u/silverdr)\
**回覆:** 5\
**Last updated:** [2023年四月7日 00:02 UTC](https://meta.discourse.org/t/error-setting-up-with-separate-redis/260859 "2023-04-07T00:02:06Z")

</div>

本地网络中有一个半不活跃的数据库服务器运行着PostgreSQL，我也想用它来运行Discourse。这样做的原因是，Web服务器的压力远远大于前面提到的数据库服务器……

---

## [由于 ruby gem 不兼容，重建失败](https://meta.discourse.org/t/rebuild-failed-due-to-ruby-gem-incompatibility/260799)

<div class="topic-metadata">

**Author:** [@levitte](https://meta.discourse.org/u/levitte)\
**回覆:** 8\
**Last updated:** [2023年四月6日 19:51 UTC](https://meta.discourse.org/t/rebuild-failed-due-to-ruby-gem-incompatibility/260799 "2023-04-06T19:51:26Z")

</div>

注意：我将我的容器命名为 containers/polyf.yml discourse-doctor 完全不处理这种情况…… $ ./launcher rebuild polyf ... I, \[2023-04-06T09:50:45.464717 #1\] INFO -- : \> cd /var/www/discourse && su discourse -c 'bun…

---

## [Amazon SES/SNS 邮件投诉未收到，退回信息缺失](https://meta.discourse.org/t/amazon-ses-sns-email-complaints-not-received-bounces-missing-information/239247)

<div class="topic-metadata">

**Author:** [@ipoopfool](https://meta.discourse.org/u/ipoopfool)\
**回覆:** 5\
**Last updated:** [2023年四月6日 17:07 UTC](https://meta.discourse.org/t/amazon-ses-sns-email-complaints-not-received-bounces-missing-information/239247 "2023-04-06T17:07:41Z")

</div>

我遵循了上面链接的说明，并设置了 SES 和 SNS 电子邮件转发。我遇到了两个问题。 1. Discourse 未收到被拒绝/投诉的电子邮件 我目前收到大量 SES 电子邮件……

---

## [如何在 Discourse 中查看 nginx 日志？](https://meta.discourse.org/t/how-to-view-nginx-log-inside-discourse/208743)

<div class="topic-metadata">

**Author:** [@hokod](https://meta.discourse.org/u/hokod)\
**回覆:** 10\
**Last updated:** [2023年四月6日 00:54 UTC](https://meta.discourse.org/t/how-to-view-nginx-log-inside-discourse/208743 "2023-04-06T00:54:27Z")

</div>

如何在CentOS（docker）上查看nginx日志？ 我收到502、504 Nginx网关错误，所以我想查看nginx日志。 你能告诉我如何在CentOS（docker）上查看nginx日志的命令行吗？

---

## [将 Discourse 纯粹用于问答功能，无需 UI 或身份验证](https://meta.discourse.org/t/using-discourse-purely-for-q-a-functionality-without-ui-or-authentication/260683)

<div class="topic-metadata">

**Author:** [@x473](https://meta.discourse.org/u/x473)\
**回覆:** 8\
**Last updated:** [2023年四月5日 19:58 UTC](https://meta.discourse.org/t/using-discourse-purely-for-q-a-functionality-without-ui-or-authentication/260683 "2023-04-05T19:58:09Z")

</div>

我们喜欢 Discourse 的功能，但我们希望仅使用其后端及相关 API 来运行内部论坛。为此，我们有一个自定义 UI，旨在利用 Discourse API 来检索主题……

---

## [启动器重建应用程序时出错](https://meta.discourse.org/t/error-on-launcher-rebuild-app/260689)

<div class="topic-metadata">

**Author:** [@albertoiNET](https://meta.discourse.org/u/albertoiNET)\
**回覆:** 2\
**Last updated:** [2023年四月5日 18:20 UTC](https://meta.discourse.org/t/error-on-launcher-rebuild-app/260689 "2023-04-05T18:20:47Z")

</div>

我尝试使用 /var/discourse/launcher rebuild app 重建 discourse，在升级失败后出现这种情况： FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake them…

---

## [安装 discourse 进行开发失败](https://meta.discourse.org/t/installing-discourse-for-development-is-failing/260221)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**回覆:** 2\
**Last updated:** [2023年四月5日 17:50 UTC](https://meta.discourse.org/t/installing-discourse-for-development-is-failing/260221 "2023-04-05T17:50:58Z")

</div>

您好， 我正在帮助我的朋友设置环境以开始处理插件，但在一个错误上卡住了。他尝试在一个新创建的 Ubuntu 22.04 虚拟机上进行操作。 我今天早上尝试在一个新创建的……

---

## [在 Docker 中使用 IPv6 NAT 功能与 Discourse](https://meta.discourse.org/t/using-ipv6-nat-function-in-docker-with-discourse/253218)

<div class="topic-metadata">

**Author:** [@GuidoD](https://meta.discourse.org/u/GuidoD)\
**回覆:** 4\
**Last updated:** [2023年四月5日 06:47 UTC](https://meta.discourse.org/t/using-ipv6-nat-function-in-docker-with-discourse/253218 "2023-04-05T06:47:36Z")

</div>

供您参考，我刚刚为 web.ssl.template.yml 创建了一个拉取请求，以便在 Discourse 实例中使用 Docker 的 IPv6 NAT 功能。 通过我的更改，我能够使用 Docker 的 IPv6 NAT...…

---

## [帮助！升级一直失败](https://meta.discourse.org/t/help-upgrade-constantly-fails/259032)

<div class="topic-metadata">

**Author:** [@sok777](https://meta.discourse.org/u/sok777)\
**回覆:** 6\
**Last updated:** [2023年四月3日 17:07 UTC](https://meta.discourse.org/t/help-upgrade-constantly-fails/259032 "2023-04-03T17:07:30Z")

</div>

救命！升级频繁失败 我们最近在 Google Cloud Console 上升级了服务器。不确定这是否相关，但从那以后我们遇到了很多 502 错误。似乎不时会有更新，例如官方主题 c…

---

## [关闭ipv6后Docker持续重启，主机上不再运行](https://meta.discourse.org/t/docker-constantly-restarting-after-turning-off-ipv6-no-longer-running-on-the-host/260277)

<div class="topic-metadata">

**Author:** [@djnoah](https://meta.discourse.org/u/djnoah)\
**回覆:** 3\
**Last updated:** [2023年四月3日 15:12 UTC](https://meta.discourse.org/t/docker-constantly-restarting-after-turning-off-ipv6-no-longer-running-on-the-host/260277 "2023-04-03T15:12:14Z")

</div>

在此处找不到解决方案。我禁用了主机上的 ipv6，并且 discourse docker 持续重启。 我重建了应用程序 — 剪切 — cd /var/discourse ./launcher rebuild app — 剪切 — 以下是 docker 日志显示的内容……

---

## [Docker重建期间的维护页面](https://meta.discourse.org/t/maintenance-page-while-docker-takes-time-to-rebuilt/260279)

<div class="topic-metadata">

**Author:** [@djnoah](https://meta.discourse.org/u/djnoah)\
**回覆:** 4\
**Last updated:** [2023年四月3日 02:09 UTC](https://meta.discourse.org/t/maintenance-page-while-docker-takes-time-to-rebuilt/260279 "2023-04-03T02:09:11Z")

</div>

你好， 在 Docker 重建时，有没有一种简洁的方法可以放置一个维护启动页？ 主机是 Ubuntu 22.04 服务器？ 我应该只安装 nginx 并通过这种方式显示一个页面吗？ 我希望……

---

## [安装新的 Discourse 实例时出现问题](https://meta.discourse.org/t/issue-when-installing-new-discourse-instance/259617)

<div class="topic-metadata">

**Author:** [@jcarney2024](https://meta.discourse.org/u/jcarney2024)\
**回覆:** 7\
**Last updated:** [2023年四月2日 18:13 UTC](https://meta.discourse.org/t/issue-when-installing-new-discourse-instance/259617 "2023-04-02T18:13:10Z")

</div>

大家好， 在尝试安装新的 discourse 实例时，我遇到了这个错误（这是我的安装日志）： 配置文件 containers/app.yml 已成功更新！ 更新成功。正在重建 5 秒……

---

## [如何撤销证书并卸载 discourse？](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207)

<div class="topic-metadata">

**Author:** [@Danran](https://meta.discourse.org/u/Danran)\
**回覆:** 4\
**Last updated:** [2023年二月15日 13:10 UTC](https://meta.discourse.org/t/how-to-revoke-certificates-and-uninstall-discourse/252207 "2023-02-15T13:10:48Z")

</div>

我在 Ubuntu 20.04 服务器云实例上安装了 discourse，现在想将其完全删除。我不想仅仅删除 discourse 目录，因为我知道它包含来自 le

---

## [移除 Akismet 反垃圾邮件插件时出错](https://meta.discourse.org/t/error-while-trying-to-remove-the-anti-spam-akismet-plugin/258370)

<div class="topic-metadata">

**Author:** [@nono-lqdn](https://meta.discourse.org/u/nono-lqdn)\
**回覆:** 2\
**Last updated:** [2023年三月31日 14:40 UTC](https://meta.discourse.org/t/error-while-trying-to-remove-the-anti-spam-akismet-plugin/258370 "2023-03-31T14:40:11Z")

</div>

你好世界， 我一直在尝试删除 Akismet 反垃圾邮件插件，因为它似乎不符合 RGPD；根据我们的法律团队的说法，对海外服务器数据的分析在 R…方面是非法的。

---

## [CDN S3 设置帮助 - 作业异常：Backblaze B2](https://meta.discourse.org/t/help-with-cdn-s3-setup-job-exception-backblaze-b2/260078)

<div class="topic-metadata">

**Author:** [@commercial](https://meta.discourse.org/u/commercial)\
**回覆:** 0\
**Last updated:** [2023年三月31日 08:26 UTC](https://meta.discourse.org/t/help-with-cdn-s3-setup-job-exception-backblaze-b2/260078 "2023-03-31T08:26:49Z")

</div>

我在错误日志中收到此警报： 作业异常：Backblaze B2 不支持此 API 调用。 我已检查现有主题，一切看起来都正常。 所以，这里有一些详细信息，希望能帮助识别我的问题… aws-sdk…

---

## [Discourse因证书过期而失败，重建应用程序后Discourse无法工作](https://meta.discourse.org/t/discourse-failing-due-to-expired-certificates-rebuilt-app-now-discourse-not-working/258614)

<div class="topic-metadata">

**Author:** [@Danran](https://meta.discourse.org/u/Danran)\
**回覆:** 16\
**Last updated:** [2023年三月30日 16:53 UTC](https://meta.discourse.org/t/discourse-failing-due-to-expired-certificates-rebuilt-app-now-discourse-not-working/258614 "2023-03-30T16:53:52Z")

</div>

我在 Ubuntu Server 22.04 上运行 Discourse。我的 Discourse 证书因未知原因神奇地过期了。我使用默认的 Docker 安装方法安装了 Discourse，并使用了所有默认设置。之后……

---

## [SES 邮件配置在外发地址上失败](https://meta.discourse.org/t/ses-mail-configuration-fails-on-outgoing-address/259535)

<div class="topic-metadata">

**Author:** [@Sean\_McInnes](https://meta.discourse.org/u/Sean_McInnes)\
**回覆:** 1\
**Last updated:** [2023年三月30日 13:17 UTC](https://meta.discourse.org/t/ses-mail-configuration-fails-on-outgoing-address/259535 "2023-03-30T13:17:07Z")

</div>

我之前设置并使用了SES，但不得不更改域名，在新设置中，我不知何故错过了在哪里强制将传出电子邮件地址始终设为我想要的地址！因此，SES拒绝发送……

---

## [警告：Discourse 需要 1GB 内存](https://meta.discourse.org/t/warning-discourse-requires-1gb-ram/148607)

<div class="topic-metadata">

**Author:** [@vove](https://meta.discourse.org/u/vove)\
**回覆:** 6\
**Last updated:** [2023年三月30日 07:05 UTC](https://meta.discourse.org/t/warning-discourse-requires-1gb-ram/148607 "2023-03-30T07:05:51Z")

</div>

大家好！ 我一直在尝试安装 Discourse，但到目前为止尚未成功。 我有一台配备 1 GB 内存和 2 GB 交换文件的 VPS。每当我运行 ./discourse-setup 时，都会出现以下错误。（我已经进行了几次干净的安装……

---

## [卸载 Discourse - 需要帮助](https://meta.discourse.org/t/uninstalling-discourse-need-help/259869)

<div class="topic-metadata">

**Author:** [@Timothee\_scheufler](https://meta.discourse.org/u/Timothee_scheufler)\
**回覆:** 4\
**Last updated:** [2023年三月29日 17:09 UTC](https://meta.discourse.org/t/uninstalling-discourse-need-help/259869 "2023-03-29T17:09:59Z")

</div>

你好， 我之前在我的vps上运行了一个Discourse实例，运行得很好。现在我不再需要Discourse了，想卸载它，为我想运行的另一个应用程序腾出空间。我尝试了某个帖子中的命令……

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

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