# Self-hosting

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

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

**Page:** 120

---

## [DigitalOcean 上的 SMTP 凭据](https://meta.discourse.org/t/smtp-credentials-on-digitalocean/119870)

<div class="topic-metadata">

**Author:** [@genekogan](https://meta.discourse.org/u/genekogan)\
**回覆:** 3\
**Last updated:** [2019年六月9日 23:54 UTC](https://meta.discourse.org/t/smtp-credentials-on-digitalocean/119870 "2019-06-09T23:54:34Z")

</div>

我首次尝试在托管于 DigitalOcean 的网站 Discourse 上安装，并使用 Mailgun 邮件服务。我已设置 Mailgun 并验证其工作正常，所有 DNS 记录也已验证。 我正遵循…

---

## [从 Bitnami 迁移到常规 Discourse](https://meta.discourse.org/t/transfer-from-bitnami-to-normal-discourse/79531)

<div class="topic-metadata">

**Author:** [@viensvoirtonton](https://meta.discourse.org/u/viensvoirtonton)\
**回覆:** 7\
**Last updated:** [2019年六月7日 09:33 UTC](https://meta.discourse.org/t/transfer-from-bitnami-to-normal-discourse/79531 "2019-06-07T09:33:02Z")

</div>

你好， 我已经在 Bitnami 上使用 Discourse 一周了，出于多种原因，我想切换到 Discourse 的经典版本。 我想知道是否有简单的方法可以实现这一转换，同时保留以下内容： SSL 证书…

---

## [开发环境安装是否安全？](https://meta.discourse.org/t/development-installation-safe/119314)

<div class="topic-metadata">

**Author:** [@A13](https://meta.discourse.org/u/A13)\
**回覆:** 3\
**Last updated:** [2019年六月3日 04:40 UTC](https://meta.discourse.org/t/development-installation-safe/119314 "2019-06-03T04:40:02Z")

</div>

您好， 我选择 Discourse 作为论坛软件是因为其功能。不幸的是，我当前的服务器无法运行 Docker，而我看到开发安装不需要使用 Docker。运行开发环境是否安全？…

---

## [不安全的错误消息](https://meta.discourse.org/t/unsecure-error-message/119142)

<div class="topic-metadata">

**Author:** [@Joshua\_Kogan](https://meta.discourse.org/u/Joshua_Kogan)\
**回覆:** 16\
**Last updated:** [2019年五月31日 13:56 UTC](https://meta.discourse.org/t/unsecure-error-message/119142 "2019-05-31T13:56:16Z")

</div>

大家好， 这是我第一次安装，遇到了一个障碍。以下是详细信息： 我的网址托管在 1&1 上。 我使用的是 Mailgun，它处于“激活”状态，并且我已根据 Mailgun 的要求更新了 DNS 设置。 ……

---

## [Docker 命令行升级出错（postgres?）](https://meta.discourse.org/t/docker-error-on-command-line-upgrade-postgres/118771)

<div class="topic-metadata">

**Author:** [@Dieter\_Menne](https://meta.discourse.org/u/Dieter_Menne)\
**回覆:** 4\
**Last updated:** [2019年五月27日 09:54 UTC](https://meta.discourse.org/t/docker-error-on-command-line-upgrade-postgres/118771 "2019-05-27T09:54:42Z")

</div>

关于 Ubuntu 16.04.6 运行 Discourse 已有一年且状态正常。Discourse 是唯一正在运行的 Docker 容器。在尝试升级时，我遇到了与 postgres 相关的错误： /var/discourse\> cat a.txt …

---

## [Installing Discourse with digest\_md5 mail authentication](https://meta.discourse.org/t/installing-discourse-with-digest-md5-mail-authentication/60974)

<div class="topic-metadata">

**Author:** [@vmassol](https://meta.discourse.org/u/vmassol)\
**回覆:** 3\
**Last updated:** [2017年四月14日 10:30 UTC](https://meta.discourse.org/t/installing-discourse-with-digest-md5-mail-authentication/60974 "2017-04-14T10:30:04Z")

</div>

Hi, We’re trying to setup Discourse and are having problems setting up the mail part. Our mail server only supports digest\_md5 and we’re trying to make Discourse use that authentication. We found that Discouse uses Act…

---

## [在邮件列表模式下安装时获取空间](https://meta.discourse.org/t/gaining-space-on-an-install-in-mailing-list-mode/118424)

<div class="topic-metadata">

**Author:** [@Jose\_C\_Gomez](https://meta.discourse.org/u/Jose_C_Gomez)\
**回覆:** 11\
**Last updated:** [2019年五月22日 17:44 UTC](https://meta.discourse.org/t/gaining-space-on-an-install-in-mailing-list-mode/118424 "2019-05-22T17:44:32Z")

</div>

试图在我们的服务器上回收一些空间，我们的 email\_log 表大小为 2GB。 我们使用邮件列表模式，因此每月发送约 200 万封邮件。 只是想知道是否有支持的方法来清理这些数据？我看到了一些帖子……

---

## [从 tests-passed 迁移到 stable](https://meta.discourse.org/t/migrate-from-tests-passed-to-stable/118296)

<div class="topic-metadata">

**Author:** [@Wurzelseppi](https://meta.discourse.org/u/Wurzelseppi)\
**回覆:** 10\
**Last updated:** [2019年五月22日 15:55 UTC](https://meta.discourse.org/t/migrate-from-tests-passed-to-stable/118296 "2019-05-22T15:55:47Z")

</div>

大家好， 我只是想从 2.3.0beta9 迁移到稳定版本，但遇到了这个错误： 我该怎么办？ 原因如下： PG::UndefinedColumn: 错误：关系"user\_options"中的列"email\_private\_messages"不存在 …

---

## [在 Ubuntu 服务器上安装 Discourse 时遇到的问题](https://meta.discourse.org/t/issue-in-setup-discourse-on-ubuntu-server/118368)

<div class="topic-metadata">

**Author:** [@Vishal\_Kaushik](https://meta.discourse.org/u/Vishal_Kaushik)\
**回覆:** 9\
**Last updated:** [2019年五月22日 13:37 UTC](https://meta.discourse.org/t/issue-in-setup-discourse-on-ubuntu-server/118368 "2019-05-22T13:37:11Z")

</div>

我尝试在 Ubuntu 服务器上安装 Discourse。所有命令都成功执行，直到这条命令卡住：bundle exec rake autospec。如果跳过之前的命令直接运行 bundle exec rails server，它会运行并…

---

## [Redis 在新装常见版本中崩溃](https://meta.discourse.org/t/redis-rip-on-new-fresh-common-install/77921)

<div class="topic-metadata">

**Author:** [@nick7](https://meta.discourse.org/u/nick7)\
**回覆:** 11\
**Last updated:** [2019年五月21日 18:36 UTC](https://meta.discourse.org/t/redis-rip-on-new-fresh-common-install/77921 "2019-05-21T18:36:12Z")

</div>

我尝试在新的 VPS 上创建新安装，但在 shared/standalone/log/rails/production.log 中看到了以下日志（这可能也是无法通过 SMTP 发送电子邮件的原因）。 因此，我在 DigitalOcean Ubuntu 16 的实例上进行了同样的检查……

---

## [DB 所有权/清除生产数据](https://meta.discourse.org/t/db-ownership-wiping-out-production/113534)

<div class="topic-metadata">

**Author:** [@pgr](https://meta.discourse.org/u/pgr)\
**回覆:** 11\
**Last updated:** [2019年五月21日 11:39 UTC](https://meta.discourse.org/t/db-ownership-wiping-out-production/113534 "2019-05-21T11:39:02Z")

</div>

你好。我正试图清空我的生产服务器，想知道我哪里做错了（除了“试图清空生产服务器”这一点听起来确实很糟糕，但它实际上还未投入生产，我只是……）

---

## [迁移到其他服务器有多容易？](https://meta.discourse.org/t/how-easy-is-it-to-move-to-another-server/118133)

<div class="topic-metadata">

**Author:** [@shaco](https://meta.discourse.org/u/shaco)\
**回覆:** 5\
**Last updated:** [2019年五月21日 07:59 UTC](https://meta.discourse.org/t/how-easy-is-it-to-move-to-another-server/118133 "2019-05-21T07:59:41Z")

</div>

我只需要在新的主机上安装新的 Discourse，绑定域名，然后上传我的备份吗？

---

## [最近几次更新中的内存缓慢增长问题](https://meta.discourse.org/t/memory-creep-in-last-couple-of-updates/117746)

<div class="topic-metadata">

**Author:** [@RBoy](https://meta.discourse.org/u/RBoy)\
**回覆:** 27\
**Last updated:** [2019年五月21日 07:42 UTC](https://meta.discourse.org/t/memory-creep-in-last-couple-of-updates/117746 "2019-05-21T07:42:39Z")

</div>

在过去几周里，我注意到系统内存使用率每天都在逐渐上升，直至达到最大值。 以往内存使用率通常在 50% 至 55% 之间（在 3GB 内存的系统中）。但更新后，它一开始就达到 50% …

---

## [引导失败，提示“postgres 已在运行”](https://meta.discourse.org/t/failed-to-bootstrap-with-postgres-already-running/118225)

<div class="topic-metadata">

**Author:** [@davidkingham](https://meta.discourse.org/u/davidkingham)\
**回覆:** 4\
**Last updated:** [2019年五月21日 05:49 UTC](https://meta.discourse.org/t/failed-to-bootstrap-with-postgres-already-running/118225 "2019-05-21T05:49:55Z")

</div>

今天早上我尝试重新启用一个插件（版主插件），在重建应用时遇到了以下错误。随后我禁用了该插件并再次重建，结果仍出现相同的错误。我还尝试禁用所有插件……

---

## [启动 Discourse 时出错：Redis 端口已被占用](https://meta.discourse.org/t/error-when-starting-discourse-redis-port-already-in-use/118146)

<div class="topic-metadata">

**Author:** [@MST2](https://meta.discourse.org/u/MST2)\
**回覆:** 10\
**Last updated:** [2019年五月20日 20:00 UTC](https://meta.discourse.org/t/error-when-starting-discourse-redis-port-already-in-use/118146 "2019-05-20T20:00:36Z")

</div>

好的，最近我收到来自 Uptime Monitor 的消息，我的 Discourse 论坛宕机了。我检查了情况，发现它确实离线了，尽管运行它的服务器是在线的。我重建了应用以启动它……

---

## [多站点 Patreon 使用问题](https://meta.discourse.org/t/trouble-with-patreon-on-multisite/118102)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 2\
**Last updated:** [2019年五月20日 02:17 UTC](https://meta.discourse.org/t/trouble-with-patreon-on-multisite/118102 "2019-05-20T02:17:24Z")

</div>

我有一个多站点实例，一切看起来正常，但其中一个站点使用了 Patreon。nginx 错误日志显示了一些类似以下的日志： 2019/05/18 18:15:26 \[error\] 47#47: \*285159 upstream prematurely closed conn…

---

## [User.find\_by(id: 123) 失败：无登录，无管理权限](https://meta.discourse.org/t/user-find-by-id-123-fails-no-login-no-adminstration/117176)

<div class="topic-metadata">

**Author:** [@Blizzz](https://meta.discourse.org/u/Blizzz)\
**回覆:** 3\
**Last updated:** [2019年五月17日 22:39 UTC](https://meta.discourse.org/t/user-find-by-id-123-fails-no-login-no-adminstration/117176 "2019-05-17T22:39:24Z")

</div>

我们有一些用户，其个人资料页面可见，但他们无法登录，我也无法管理他们。这总是导致出现 404 页面。我进入了 Rails 控制台，尝试通过 ID 查找用户，以及用户…

---

## [在 Discourse 安装于反向代理后使用证书](https://meta.discourse.org/t/using-a-certificate-when-discourse-is-installed-behind-a-reverse-proxy/117226)

<div class="topic-metadata">

**Author:** [@naupe](https://meta.discourse.org/u/naupe)\
**回覆:** 24\
**Last updated:** [2019年五月17日 04:18 UTC](https://meta.discourse.org/t/using-a-certificate-when-discourse-is-installed-behind-a-reverse-proxy/117226 "2019-05-17T04:18:46Z")

</div>

所以我遇到了很多问题，试图使用 Let's Encrypt 设置 SSL。 之前我创建了这个话题，因为我正在 Ubuntu 虚拟机上部署 Discourse。在 Ubuntu 虚拟机上的浏览器中访问 localhost，Discourse 安装已…

---

## [自 5 月 7 日起在 Discourse 上无法重建应用](https://meta.discourse.org/t/failing-to-rebuild-app-on-discourse-since-may-7/117121)

<div class="topic-metadata">

**Author:** [@esepjav](https://meta.discourse.org/u/esepjav)\
**回覆:** 13\
**Last updated:** [2019年五月14日 14:38 UTC](https://meta.discourse.org/t/failing-to-rebuild-app-on-discourse-since-may-7/117121 "2019-05-14T14:38:47Z")

</div>

您好， 我无法成功重建 Discourse 应用。 生成的错误如下： 安装 mini\_racer (0.2.3) 时发生错误，且 bundler 无法继续。 启动失败… 我使用的是 Discourse v2.2.1，此前并无问题…

---

## [为何我有 5.8G 空间，但重建时提示空间不足](https://meta.discourse.org/t/why-i-have-5-8g-space-but-when-rebuilding-space-is-not-enough/109881)

<div class="topic-metadata">

**Author:** [@xiasummer](https://meta.discourse.org/u/xiasummer)\
**回覆:** 11\
**Last updated:** [2019年五月14日 06:07 UTC](https://meta.discourse.org/t/why-i-have-5-8g-space-but-when-rebuilding-space-is-not-enough/109881 "2019-05-14T06:07:50Z")

</div>

在执行 ./launcher rebuild app 之前，我有 5.8G 的可用空间。 但在重建应用时，剩余空间会降至 3.7G（小于 5G），导致重建停止。 这是否意味着在重建之前我们需要至少保留 7G 的可用空间？ 我有一台 20G 的 VPS，disco…

---

## [运行 rake posts:rebake 时出现错误“Killed”](https://meta.discourse.org/t/error-killed-while-running-rake-posts-rebake/111943)

<div class="topic-metadata">

**Author:** [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)\
**回覆:** 21\
**Last updated:** [2019年五月13日 18:53 UTC](https://meta.discourse.org/t/error-killed-while-running-rake-posts-rebake/111943 "2019-05-13T18:53:02Z")

</div>

在一台新的 Ubuntu 18 主机上，我在执行此步骤时遇到了问题： # cd /var/discourse/ # ./launcher enter app # rake posts:rebake 正在为 'default' 重新烘焙帖子 Markdown 5 / 2950 ( 0.2%)/usr/local/bin/rake: 第 2 行： …

---

## [Rebake all posts?](https://meta.discourse.org/t/rebake-all-posts/69340)

<div class="topic-metadata">

**Author:** [@bekircem](https://meta.discourse.org/u/bekircem)\
**回覆:** 14\
**Last updated:** [2019年五月13日 16:46 UTC](https://meta.discourse.org/t/rebake-all-posts/69340 "2019-05-13T16:46:34Z")

</div>

I’ve installed spoiler alert plugin. It works correctly. But old post doesn’t work spoiler tag. If you change this, you must rebake all posts with: rake posts:rebake. How can do that? When i ./launcher enter app rake…

---

## [安装导致证书损坏，文件大小为零字节](https://meta.discourse.org/t/installation-produced-broken-zero-byte-certificate/117466)

<div class="topic-metadata">

**Author:** [@n1bff](https://meta.discourse.org/u/n1bff)\
**回覆:** 8\
**Last updated:** [2019年五月11日 23:12 UTC](https://meta.discourse.org/t/installation-produced-broken-zero-byte-certificate/117466 "2019-05-11T23:12:29Z")

</div>

让我们将我的网站称为 example.com，它使用完全限定域名（FQDN），之前一切正常。由于过去 24 小时内一直在调试邮件问题，我多次重新部署和重建。 我已安装 Discourse 并…

---

## [Discourse 能否在不具备 root 权限的情况下安装？](https://meta.discourse.org/t/can-discourse-be-installed-without-root-access/117413)

<div class="topic-metadata">

**Author:** [@Leviticus](https://meta.discourse.org/u/Leviticus)\
**回覆:** 4\
**Last updated:** [2019年五月10日 18:53 UTC](https://meta.discourse.org/t/can-discourse-be-installed-without-root-access/117413 "2019-05-10T18:53:39Z")

</div>

我拥有托管在共享服务器上的网络空间，但无法获取 root 权限。是否有无需 root 权限即可安装 Discourse 的替代方案？ 谢谢， Leviticus

---

## [在不同端口安装 Docker](https://meta.discourse.org/t/installing-docker-on-different-port/117401)

<div class="topic-metadata">

**Author:** [@Shachar](https://meta.discourse.org/u/Shachar)\
**回覆:** 1\
**Last updated:** [2019年五月10日 16:41 UTC](https://meta.discourse.org/t/installing-docker-on-different-port/117401 "2019-05-10T16:41:20Z")

</div>

我试图在已经运行多个其他站点的主机上设置 Docker 镜像以进行自托管。手册说明我应该克隆 git 仓库，然后运行 ./docker-setup。问题是，当我这样做时，它会...

---

## [XenForo 导入：图片和画廊缺失](https://meta.discourse.org/t/xenforo-import-images-galleries-missing/116439)

<div class="topic-metadata">

**Author:** [@edL](https://meta.discourse.org/u/edL)\
**回覆:** 8\
**Last updated:** [2019年五月9日 15:19 UTC](https://meta.discourse.org/t/xenforo-import-images-galleries-missing/116439 "2019-05-09T15:19:36Z")

</div>

太好了！第一帖！:slight\_smile: 我正在从 XenForo（1.5）迁移论坛，我注意到图片没有显示出来。相反，导入的帖子中只显示 \[ATTACH=full\]3762\[/ATTACH\] 或 \[GALLERY=media, 1076\]…

---

## [使用命令行手动备份和恢复](https://meta.discourse.org/t/manual-backup-with-command-line-and-restore/117198)

<div class="topic-metadata">

**Author:** [@Chopper](https://meta.discourse.org/u/Chopper)\
**回覆:** 5\
**Last updated:** [2019年五月8日 19:36 UTC](https://meta.discourse.org/t/manual-backup-with-command-line-and-restore/117198 "2019-05-08T19:36:28Z")

</div>

你好， 我有一个损坏的 Discourse 论坛，我想将其迁移到另一台服务器。我已经在以下文件夹中有了备份： $ ls /var/discourse/shared/standalone/backups/default $ forum-2019-05-06-033420-v20180920042415.tar 在我的新…

---

## [discourse.org 托管与 Communiteq 的区别](https://meta.discourse.org/t/difference-between-discourse-org-hosting-and-communiteq/117076)

<div class="topic-metadata">

**Author:** [@ondrej](https://meta.discourse.org/u/ondrej)\
**回覆:** 16\
**Last updated:** [2019年五月8日 15:11 UTC](https://meta.discourse.org/t/difference-between-discourse-org-hosting-and-communiteq/117076 "2019-05-08T15:11:36Z")

</div>

您好， 我对这些概念感到困惑。那么，让我来问：这个： 与我当前所在的 Discourse 论坛有什么区别？ 谢谢。

---

## [从 FB Groups 迁移到 Discourse - 功能/特性协助](https://meta.discourse.org/t/migrating-from-fb-groups-to-discourse-help-with-features-functions/117044)

<div class="topic-metadata">

**Author:** [@nefv](https://meta.discourse.org/u/nefv)\
**回覆:** 2\
**Last updated:** [2019年五月7日 08:57 UTC](https://meta.discourse.org/t/migrating-from-fb-groups-to-discourse-help-with-features-functions/117044 "2019-05-07T08:57:08Z")

</div>

大家好， 我自愿组织一个由约 250 人组成的社区，这些成员属于一个支持初创企业和新业务的组织。 目前，我们使用一个 Facebook 群组作为在线中心，用于发布个人/专业相关内容…

---

## [Emergency help - freeCodeCamp Discourse down](https://meta.discourse.org/t/emergency-help-freecodecamp-discourse-down/57758)

<div class="topic-metadata">

**Author:** [@ossia](https://meta.discourse.org/u/ossia)\
**回覆:** 18\
**Last updated:** [2017年二月22日 02:43 UTC](https://meta.discourse.org/t/emergency-help-freecodecamp-discourse-down/57758 "2017-02-22T02:43:14Z")

</div>

Our server was showing some users 500 errors, so I went to update Discourse to the latest version (I hadn’t updated in a month or so). The update failed. It stopped for about 20 or 30 minutes when installing a Redis gem…

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

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