# Self-hosting

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

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

**Page:** 55

---

## [自托管升级到3.1.0.beta2，典型的多容器安装需要额外的停机时间](https://meta.discourse.org/t/self-hosted-upgrade-to-3-1-0-beta2-with-typical-multi-container-install-requires-extra-downtime/252916)

<div class="topic-metadata">

**Author:** [@mcdanlj](https://meta.discourse.org/u/mcdanlj)\
**回覆:** 7\
**Last updated:** [2023年一月26日 03:54 UTC](https://meta.discourse.org/t/self-hosted-upgrade-to-3-1-0-beta2-with-typical-multi-container-install-requires-extra-downtime/252916 "2023-01-26T03:54:29Z")

</div>

我将我的站点从 3.1.0.beta1 更新到 3.1.0.beta2，并在引导新版本后，但在销毁旧应用程序容器和启动新容器之前，至少有一个站点开始出现通用错误……

---

## [从 2.9.0.beta14 升级到 3.1.0.beta 失败](https://meta.discourse.org/t/failed-upgrade-from-2-9-0-beta14-to-3-1-0-beta/252551)

<div class="topic-metadata">

**Author:** [@xyzzy](https://meta.discourse.org/u/xyzzy)\
**回覆:** 10\
**Last updated:** [2023年一月25日 21:20 UTC](https://meta.discourse.org/t/failed-upgrade-from-2-9-0-beta14-to-3-1-0-beta/252551 "2023-01-25T21:20:09Z")

</div>

我每个月都会升级，总是先在几个开发系统上进行，然后是生产环境。 在这个月的周期中，升级在第一个开发系统上失败了。docker\_manager 升级正常，但 discourse 升级失败……

---

## [./launcher 重建旧版 1.6 discourse 应用不起作用](https://meta.discourse.org/t/launcher-rebuild-app-for-old-1-6-discourse-not-working/252726)

<div class="topic-metadata">

**Author:** [@bobpies](https://meta.discourse.org/u/bobpies)\
**回覆:** 12\
**Last updated:** [2023年一月25日 09:19 UTC](https://meta.discourse.org/t/launcher-rebuild-app-for-old-1-6-discourse-not-working/252726 "2023-01-25T09:19:25Z")

</div>

对我来说，这是最后的谜题了。 我有一个旧论坛，刚刚搬到了一个新的位置，但我仍然需要访问它——我编辑了 app.yml 来更改域名，然后运行了 ./launcher/ rebuild app --skip-pr……

---

## [Discourse生成的进程应该以哪个系统用户帐户运行？](https://meta.discourse.org/t/which-system-user-account-s-should-discourse-spawned-processes-run-as/252723)

<div class="topic-metadata">

**Author:** [@rahim123](https://meta.discourse.org/u/rahim123)\
**回覆:** 5\
**Last updated:** [2023年一月25日 04:18 UTC](https://meta.discourse.org/t/which-system-user-account-s-should-discourse-spawned-processes-run-as/252723 "2023-01-25T04:18:35Z")

</div>

你好，我正在尝试弄清楚为什么以及如何使 Discourse 生成的一些进程在我的非 root 普通 Linux 用户帐户下运行： 我目前在 Clear Linux 上运行 Discourse，所以它不是 q…

---

## [由于SMTP不正确，完成邮件未发送](https://meta.discourse.org/t/email-for-completion-not-sending-because-smtp-are-not-correct/252528)

<div class="topic-metadata">

**Author:** [@Critical\_DevX](https://meta.discourse.org/u/Critical_DevX)\
**回覆:** 21\
**Last updated:** [2023年一月24日 15:38 UTC](https://meta.discourse.org/t/email-for-completion-not-sending-because-smtp-are-not-correct/252528 "2023-01-24T15:38:30Z")

</div>

您好！我刚安装了 Discourse，我的 STMP 详细信息是正确的，但我仍然没有收到电子邮件，我重新运行了一切。 我的详细信息是： 管理员：devxorwhatever@gmail.com 然后我使用了一个 mailgun 账户来处理其余的，它就像 ……

---

## [全新安装后出现 403 错误](https://meta.discourse.org/t/403-error-after-fresh-install/208767)

<div class="topic-metadata">

**Author:** [@brettdev](https://meta.discourse.org/u/brettdev)\
**回覆:** 5\
**Last updated:** [2023年一月24日 15:20 UTC](https://meta.discourse.org/t/403-error-after-fresh-install/208767 "2023-01-24T15:20:12Z")

</div>

我是 Discourse 新手，我设置了一个 Digital Ocean 液滴并使用了他们的 Discourse 市场应用。 安装进行得很顺利，我将我的域名指向了 IP 地址（A 记录）。 但是，当我输入子域名时，我得到……

---

## [安装问题... (首次 Discourse 安装体验)](https://meta.discourse.org/t/installation-issues-first-discourse-installation-experience/252634)

<div class="topic-metadata">

**Author:** [@josy38](https://meta.discourse.org/u/josy38)\
**回覆:** 4\
**Last updated:** [2023年一月23日 18:01 UTC](https://meta.discourse.org/t/installation-issues-first-discourse-installation-experience/252634 "2023-01-23T18:01:39Z")

</div>

您好， 我尝试通过官方方式使用 discourse-setup 脚本首次安装 discourse……在一个 Arch VPS 上（用于与小组进行测试）——该 VPS 拥有一个全新的 nginx 安装——我已经停止并停用了……

---

## [重建时出现 "undefined method \`deprecated?' for nil:NilClass"](https://meta.discourse.org/t/undefined-method-deprecated-for-nil-nilclass-on-rebuild/251711)

<div class="topic-metadata">

**Author:** [@samyrabih](https://meta.discourse.org/u/samyrabih)\
**回覆:** 22\
**Last updated:** [2023年一月23日 04:45 UTC](https://meta.discourse.org/t/undefined-method-deprecated-for-nil-nilclass-on-rebuild/251711 "2023-01-23T04:45:55Z")

</div>

您好！ 我们多年来一直在 community.museomix.org 上使用 Discourse 但我在重建容器时遇到了一个奇怪的问题，它以以下消息失败： undefined method \`deprecated?' for nil:NilClass 这里……

---

## [无法备份，email\_logs 表出现错误](https://meta.discourse.org/t/unable-to-backup-with-error-on-email-logs-table/252559)

<div class="topic-metadata">

**Author:** [@tmarquespt](https://meta.discourse.org/u/tmarquespt)\
**回覆:** 0\
**Last updated:** [2023年一月22日 22:19 UTC](https://meta.discourse.org/t/unable-to-backup-with-error-on-email-logs-table/252559 "2023-01-22T22:19:46Z")

</div>

您好， 我们有一个 discourse 实例，已经有一段时间无法备份（和升级）了。 运行备份时，我们收到此错误 pg\_dump: 正在转储表“public.email\_change\_requests”的内容 pg\_dump: 进程……

---

## [上次升级后无法引导Discourse](https://meta.discourse.org/t/unable-to-boostrap-discourse-since-last-upgrade/252547)

<div class="topic-metadata">

**Author:** [@Marcell\_Csendes](https://meta.discourse.org/u/Marcell_Csendes)\
**回覆:** 4\
**Last updated:** [2023年一月22日 16:55 UTC](https://meta.discourse.org/t/unable-to-boostrap-discourse-since-last-upgrade/252547 "2023-01-22T16:55:12Z")

</div>

你好， 我上次升级失败了，当尝试通过 CLI 重新构建应用程序时，我收到了这个错误消息。不知道为什么它试图创建一个新数据库……我里面已经有数据了。我已…

---

## [论坛经常崩溃，总是出现500错误、503错误和错误代码502](https://meta.discourse.org/t/forum-crashing-a-lot-and-always-giving-error-500-and-error-503-and-error-code-502/252469)

<div class="topic-metadata">

**Author:** [@xebiyen](https://meta.discourse.org/u/xebiyen)\
**回覆:** 13\
**Last updated:** [2023年一月22日 16:37 UTC](https://meta.discourse.org/t/forum-crashing-a-lot-and-always-giving-error-500-and-error-503-and-error-code-502/252469 "2023-01-22T16:37:07Z")

</div>

切换服务器后发生了这种情况 有什么命令可以清理或做些什么来改进吗？

---

## [从 Beta 3.1.x 升级到最新版本时出错](https://meta.discourse.org/t/error-during-upgrading-from-beta-3-1-x-to-latest/252427)

<div class="topic-metadata">

**Author:** [@uwe\_keim](https://meta.discourse.org/u/uwe_keim)\
**回覆:** 2\
**Last updated:** [2023年一月20日 16:15 UTC](https://meta.discourse.org/t/error-during-upgrading-from-beta-3-1-x-to-latest/252427 "2023-01-20T16:15:13Z")

</div>

大约每 2 到 3 天进行一次升级，上次升级成功。 今天通过 /admin/upgrade URL 进行的升级起初失败了。 然后我做了常规操作： cd /var/discourse sudo git pull sudo ./launcher rebuild app 这...

---

## [我的代理状态有问题](https://meta.discourse.org/t/i-have-a-problem-with-my-proxy-status/252329)

<div class="topic-metadata">

**Author:** [@bigneshwardas](https://meta.discourse.org/u/bigneshwardas)\
**回覆:** 4\
**Last updated:** [2023年一月21日 15:09 UTC](https://meta.discourse.org/t/i-have-a-problem-with-my-proxy-status/252329 "2023-01-21T15:09:24Z")

</div>

我使用 Discourse 论坛，并且刚刚在 Cloudflare 上开启了代理服务。之后，我发现我的网站立即无法访问，直到我将其关闭。 我不能将它与代理状态“开启”一起使用吗……

---

## [如果容器未启动，如何运行sql查询？（重建失败）](https://meta.discourse.org/t/how-does-one-run-sql-queries-if-the-container-doesnt-start-rebuild-failed/252126)

<div class="topic-metadata">

**Author:** [@iamntz](https://meta.discourse.org/u/iamntz)\
**回覆:** 6\
**Last updated:** [2023年一月20日 20:29 UTC](https://meta.discourse.org/t/how-does-one-run-sql-queries-if-the-container-doesnt-start-rebuild-failed/252126 "2023-01-20T20:29:43Z")

</div>

你好。 我尝试运行更新并重建，但我最终得到了这个漂亮的错误： I, \[2023-01-18T08:05:48.701709 #1\] INFO -- : \> cd /var/www/discourse && su discourse -c 'LOAD\_PLUGINS=0 bundle exec rake plugin:pull\_c ..."…

---

## [Discourse v2.8.13 升级到 v2.8.14 失败](https://meta.discourse.org/t/failing-upgrade-from-discourse-v2-8-13-to-v2-8-14/252158)

<div class="topic-metadata">

**Author:** [@honzao](https://meta.discourse.org/u/honzao)\
**回覆:** 2\
**Last updated:** [2023年一月20日 14:09 UTC](https://meta.discourse.org/t/failing-upgrade-from-discourse-v2-8-13-to-v2-8-14/252158 "2023-01-20T14:09:58Z")

</div>

你好， 我正在预生产环境中测试升级到 Discourse 版本 2.8.14。 但是重建命令总是失败。 ./launcher rebuild app x86\_64 架构已检测。 确保启动器是最新版本 正在获取 origin La…

---

## [如何更新到最新的2.x而不是3.0？](https://meta.discourse.org/t/how-to-update-to-latest-2-x-instead-of-3-0/252318)

<div class="topic-metadata">

**Author:** [@jonom](https://meta.discourse.org/u/jonom)\
**回覆:** 4\
**Last updated:** [2023年一月19日 22:36 UTC](https://meta.discourse.org/t/how-to-update-to-latest-2-x-instead-of-3-0/252318 "2023-01-19T22:36:07Z")

</div>

我有一个 Discourse 安装程序正在运行 2.8.11。我想暂时推迟升级到 3.0，只升级到 2.x 系列的最新版本（目前是 2.8.14）。基于 Web 的更新程序只允许更新到 3.0 - 是……

---

## [如何切换 Discourse 服务器？](https://meta.discourse.org/t/how-to-switch-discourse-servers/251973)

<div class="topic-metadata">

**Author:** [@xebiyen](https://meta.discourse.org/u/xebiyen)\
**回覆:** 6\
**Last updated:** [2023年一月19日 20:43 UTC](https://meta.discourse.org/t/how-to-switch-discourse-servers/251973 "2023-01-19T20:43:34Z")

</div>

您好！ 我有一个 Digital Ocean 服务器，想迁移到 Hetzner，该怎么做？你们有教程吗？ 我是备份我的 Discourse，然后创建一个干净的 Discourse 安装并上传之前的备份……

---

## [旧网站卡在只读模式](https://meta.discourse.org/t/old-site-stuck-in-read-only/252324)

<div class="topic-metadata">

**Author:** [@bobpies](https://meta.discourse.org/u/bobpies)\
**回覆:** 4\
**Last updated:** [2023年一月19日 18:58 UTC](https://meta.discourse.org/t/old-site-stuck-in-read-only/252324 "2023-01-19T18:58:32Z")

</div>

我有一个运行v1.1的旧站点，我正在升级 事情没有第一次奏效，我正在回滚 除了旧站点卡在只读模式，我无法通过 .launcher enter app Docker版本1.7……

---

## [升级后 Discourse 未启动](https://meta.discourse.org/t/discourse-not-launching-after-upgrade/252286)

<div class="topic-metadata">

**Author:** [@fidelio](https://meta.discourse.org/u/fidelio)\
**回覆:** 5\
**Last updated:** [2023年一月19日 18:00 UTC](https://meta.discourse.org/t/discourse-not-launching-after-upgrade/252286 "2023-01-19T18:00:29Z")

</div>

我刚尝试将我的论坛更新到最新的 3.1 版本（从 2.9 版本升级），但现在它无法启动了。据我所知，在安装过程结束时没有显示任何错误消息。 尝试…

---

## [论坛不再发送电子邮件](https://meta.discourse.org/t/forum-no-longer-sending-emails/252105)

<div class="topic-metadata">

**Author:** [@xebiyen](https://meta.discourse.org/u/xebiyen)\
**回覆:** 10\
**Last updated:** [2023年一月19日 17:45 UTC](https://meta.discourse.org/t/forum-no-longer-sending-emails/252105 "2023-01-19T17:45:35Z")

</div>

我的论坛不再向用户发送激活账户的电子邮件，所以我输入了一个命令来查看是什么情况，出现了这个 要进行全面测试，请在 http://www.mail-tester.com/ 获取一个地址 或者直接发送给自己……

---

## [从 1.6.0 升级到 3](https://meta.discourse.org/t/upgrading-from-1-6-0-to-3/252052)

<div class="topic-metadata">

**Author:** [@bobpies](https://meta.discourse.org/u/bobpies)\
**回覆:** 12\
**Last updated:** [2023年一月18日 17:36 UTC](https://meta.discourse.org/t/upgrading-from-1-6-0-to-3/252052 "2023-01-18T17:36:54Z")

</div>

大家好， 我正在尝试将过时的 Discourse 安装从 1.6.0 升级到最新版本。 我创建了一个本地开发服务器，确保它正在运行，然后将 1.6.0 的备份恢复到其中。 恢复之后……

---

## [升级失败 错误退出 1](https://meta.discourse.org/t/upgrade-failed-error-exit-1/251769)

<div class="topic-metadata">

**Author:** [@kynic](https://meta.discourse.org/u/kynic)\
**回覆:** 5\
**Last updated:** [2023年一月17日 19:52 UTC](https://meta.discourse.org/t/upgrade-failed-error-exit-1/251769 "2023-01-17T19:52:52Z")

</div>

请告诉我该怎么做？ I, \[2023-01-14T15:20:10.327274 #1\] INFO -- : I, \[2023-01-14T15:20:10.327716 #1\] INFO -- : \> chown postgres:postgres /shared/postgres\_run/13-main.pg\_stat\_tmp I, \[2023-01-14T15:20:10.330613 #1\] &hellip;

---

## [Docker构建中断-网站瘫痪](https://meta.discourse.org/t/docker-build-broken-site-down/252047)

<div class="topic-metadata">

**Author:** [@jaswinder](https://meta.discourse.org/u/jaswinder)\
**回覆:** 4\
**Last updated:** [2023年一月17日 18:54 UTC](https://meta.discourse.org/t/docker-build-broken-site-down/252047 "2023-01-17T18:54:24Z")

</div>

I, \[2023-01-17T16:40:30.885959 #1\] INFO -- : 完成 Web 配置 I, \[2023-01-17T16:40:30.886580 #1\] INFO -- : \> cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /…

---

## [在生产环境之前配置S3（DO Space）和CDN与暂存服务器](https://meta.discourse.org/t/configuring-s3-do-space-and-cdn-with-staging-server-before-production/251808)

<div class="topic-metadata">

**Author:** [@Octoberon](https://meta.discourse.org/u/Octoberon)\
**回覆:** 3\
**Last updated:** [2023年一月17日 01:17 UTC](https://meta.discourse.org/t/configuring-s3-do-space-and-cdn-with-staging-server-before-production/251808 "2023-01-17T01:17:52Z")

</div>

我经营着一个小型论坛，服务器存储空间很快就会用完，所以我计划使用 DO Space 和 Bunny CDN 来扩展存储空间。我一直在浏览 Meta 文档，并找到了许多有用的信息……

---

## [Git Pull "Already up to date" 后无法更新](https://meta.discourse.org/t/cant-update-since-git-pull-already-up-to-date/241421)

<div class="topic-metadata">

**Author:** [@Flashio](https://meta.discourse.org/u/Flashio)\
**回覆:** 14\
**Last updated:** [2023年一月15日 14:42 UTC](https://meta.discourse.org/t/cant-update-since-git-pull-already-up-to-date/241421 "2023-01-15T14:42:22Z")

</div>

优先级/严重性：正常 平台：Digital Ocean / Own / 2.9.0.beta5 描述：我使用的是 2.9.0.beta5，想更新到 2.9.0.beta10，但在终端输入 "git pull" 时，它显示“Already up to date”。另外，重新构建 …

---

## [更新后，网站无法访问](https://meta.discourse.org/t/after-update-site-wont-come-up/251757)

<div class="topic-metadata">

**Author:** [@danb35](https://meta.discourse.org/u/danb35)\
**回覆:** 5\
**Last updated:** [2023年一月14日 12:48 UTC](https://meta.discourse.org/t/after-update-site-wont-come-up/251757 "2023-01-14T12:48:30Z")

</div>

前几天我收到一封电子邮件通知，我的自托管 Discourse 站点（Contabo 上的 Ubuntu 18.04.6）即将进行更新，所以我去了管理页面进行更新。像往常一样，我首先需要更新 docker-manager，然后……

---

## [尝试安装插件后，Discourse 不再加载（Phusion Passenger 无法启动 Web 应用程序）](https://meta.discourse.org/t/after-attempting-to-install-plugin-discourse-no-longer-loads-phusion-passenger-cannot-start-the-web-application/251626)

<div class="topic-metadata">

**Author:** [@Josh\_Universe](https://meta.discourse.org/u/Josh_Universe)\
**回覆:** 11\
**Last updated:** [2023年一月13日 04:04 UTC](https://meta.discourse.org/t/after-attempting-to-install-plugin-discourse-no-longer-loads-phusion-passenger-cannot-start-the-web-application/251626 "2023-01-13T04:04:50Z")

</div>

您好， 我曾尝试为我的论坛安装一个 Discourse 插件，但在安装过程中，由于插件安装破坏了 Phusion Passenger 的工作，Discourse 完全停止运行。 我遵循了本指南……

---

## [我不知道SMTP服务出了什么问题](https://meta.discourse.org/t/i-dont-know-whats-wrong-with-the-smtp-service/251454)

<div class="topic-metadata">

**Author:** [@youyou](https://meta.discourse.org/u/youyou)\
**回覆:** 6\
**Last updated:** [2023年一月12日 19:10 UTC](https://meta.discourse.org/t/i-dont-know-whats-wrong-with-the-smtp-service/251454 "2023-01-12T19:10:37Z")

</div>

我使用mailgun.com的服务发送邮件，但是根据教程设置的SMTP不起作用。我甚至无法完成管理员注册 日志位于shared/standalone/log/rails/production.log Sta…

---

## [从v2.8.14升级到v3.0.0时的捆绑包错误](https://meta.discourse.org/t/bundle-error-on-upgrade-from-v2-8-14-to-v-3-0-0/251482)

<div class="topic-metadata">

**Author:** [@mig5](https://meta.discourse.org/u/mig5)\
**回覆:** 2\
**Last updated:** [2023年一月12日 17:08 UTC](https://meta.discourse.org/t/bundle-error-on-upgrade-from-v2-8-14-to-v-3-0-0/251482 "2023-01-12T17:08:05Z")

</div>

您好， 我执行了从 v.2.8.14 到 v3.0.0 的升级，使用了以下过程： docker exec -it app rails runner “Discourse.enable\_readonly\_mode(Discourse::USER\_READONLY\_MODE\_KEY)” cd /var/discourse git pull ./launcher rebuild…

---

## [数据库迁移在「稳定版」中失败](https://meta.discourse.org/t/database-migrate-fails-in-stable-version/243979)

<div class="topic-metadata">

**Author:** [@gmoirod](https://meta.discourse.org/u/gmoirod)\
**回覆:** 5\
**Last updated:** [2023年一月11日 13:55 UTC](https://meta.discourse.org/t/database-migrate-fails-in-stable-version/243979 "2023-01-11T13:55:26Z")

</div>

很抱歉又因为那个插件打扰您（之前在这里也提过：为“稳定”版本保持 Rails 6 兼容性） 我上次升级该插件失败了。 我有一个“稳定版”的 Discourse。 该插件的最新版本是 p…

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

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