# Self-hosting

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

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

**Page:** 44

---

## [在 GCP (Google cloud platform) 上安装 discourse 多站点求助](https://meta.discourse.org/t/help-with-installing-discourse-multi-site-on-gcp-google-cloud-platform/273973)

<div class="topic-metadata">

**Author:** [@Jacob\_Peebles](https://meta.discourse.org/u/Jacob_Peebles)\
**回覆:** 2\
**Last updated:** [2023年八月4日 15:56 UTC](https://meta.discourse.org/t/help-with-installing-discourse-multi-site-on-gcp-google-cloud-platform/273973 "2023-08-04T15:56:59Z")

</div>

你好， 我了解到有一个托管版本的 Discourse，所以如果此帖子不合适或不允许，我理解。 我希望找到一个熟悉设置 Discourse 的资源或人员……

---

## [了解 Lightsail 重启后 Discourse 的行为](https://meta.discourse.org/t/trying-to-understand-discourse-behavior-after-lightsail-reboot-restart/273971)

<div class="topic-metadata">

**Author:** [@Jim\_Starkweather](https://meta.discourse.org/u/Jim_Starkweather)\
**回覆:** 5\
**Last updated:** [2023年八月4日 14:52 UTC](https://meta.discourse.org/t/trying-to-understand-discourse-behavior-after-lightsail-reboot-restart/273971 "2023-08-04T14:52:12Z")

</div>

我最近的 Lightsail 服务器遇到了一些突发模式问题。在停止并重启服务器以使其恢复运行后，我注意到现在已经两次（在过去的两年里也是如此），主页会加载一个 c…

---

## [从单一位置管理多个 Discourse 实例](https://meta.discourse.org/t/manage-multiple-discourse-instances-from-one-place-only/81636)

<div class="topic-metadata">

**Author:** [@kullboys](https://meta.discourse.org/u/kullboys)\
**回覆:** 4\
**Last updated:** [2023年八月4日 00:33 UTC](https://meta.discourse.org/t/manage-multiple-discourse-instances-from-one-place-only/81636 "2023-08-04T00:33:07Z")

</div>

大家好 如果您管理多个 Discourse 论坛（我正在维护两个），您经常会发现自己在重复执行相同的工作：升级核心组件和插件、调整各种设置与样式等。如果我再多管理一个论坛……

---

## [安装失败](https://meta.discourse.org/t/failed-to-install/273479)

<div class="topic-metadata">

**Author:** [@Deveroonie](https://meta.discourse.org/u/Deveroonie)\
**回覆:** 5\
**Last updated:** [2023年八月3日 12:37 UTC](https://meta.discourse.org/t/failed-to-install/273479 "2023-08-03T12:37:22Z")

</div>

我正在尝试安装 Discourse，但遇到了这个 2023-08-01 12:27:18.881 UTC \[42\] LOG: 数据库系统已关闭 失败 -------------------- Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bas ...

---

## [Amazon SES 的 SMTP 问题](https://meta.discourse.org/t/smtp-problem-with-amazon-ses/273575)

<div class="topic-metadata">

**Author:** [@Alex\_王](https://meta.discourse.org/u/Alex_%E7%8E%8B)\
**回覆:** 4\
**Last updated:** [2023年八月2日 00:59 UTC](https://meta.discourse.org/t/smtp-problem-with-amazon-ses/273575 "2023-08-02T00:59:47Z")

</div>

我使用 AWS EC2 和 AWS SES 来托管我的 discourse。然而，尝试了半天后，我还是无法让 SMTP 工作。 我已按照 我收到了 但我的邮箱 (wangziyu0917@gmail.com) 无法收到验证邮件。 以及……

---

## [SSL\_connect 返回=1 errno=0 peeraddr=10.117.158.71:25 state=error: 证书验证失败 (无法获取本地颁发者证书)](https://meta.discourse.org/t/ssl-connect-returned-1-errno-0-peeraddr-10-117-158-71-25-state-error-certificate-verify-failed-unable-to-get-local-issuer-certificate/273502)

<div class="topic-metadata">

**Author:** [@nicolas\_ferrer](https://meta.discourse.org/u/nicolas_ferrer)\
**回覆:** 2\
**Last updated:** [2023年八月1日 17:18 UTC](https://meta.discourse.org/t/ssl-connect-returned-1-errno-0-peeraddr-10-117-158-71-25-state-error-certificate-verify-failed-unable-to-get-local-issuer-certificate/273502 "2023-08-01T17:18:49Z")

</div>

我们已经完成了所有的身份验证设置，并且正在使用端口 25。 有人遇到过这个 SSL 证书错误吗？ 我是否缺少某个证书？在哪里？

---

## [Discourse docker 版 postgres ssl 连接 - 是否可以设置为使用 .crt 文件？](https://meta.discourse.org/t/discourse-docker-version-postgres-ssl-connection-is-there-a-way-to-set-it-to-use-a-crt-file/273287)

<div class="topic-metadata">

**Author:** [@kincjf](https://meta.discourse.org/u/kincjf)\
**回覆:** 1\
**Last updated:** [2023年七月30日 22:52 UTC](https://meta.discourse.org/t/discourse-docker-version-postgres-ssl-connection-is-there-a-way-to-set-it-to-use-a-crt-file/273287 "2023-07-30T22:52:08Z")

</div>

你好。Discourse Docker 版本 PostgreSQL SSL 连接 - 是否有办法将其设置为使用 .crt 文件？ 只有当使用 .crt 文件进行数据库 SSL 连接被设置为默认时，才能使用 DigitalOcean 数据库。

---

## [更新删除了整个论坛，并且从头开始](https://meta.discourse.org/t/update-deleted-the-entire-forum-and-started-afresh/273261)

<div class="topic-metadata">

**Author:** [@admin.limenleap](https://meta.discourse.org/u/admin.limenleap)\
**回覆:** 2\
**Last updated:** [2023年七月30日 07:26 UTC](https://meta.discourse.org/t/update-deleted-the-entire-forum-and-started-afresh/273261 "2023-07-30T07:26:03Z")

</div>

今天，我被要求升级我的 discourse 论坛，因为它已经很过时了。 现在我的服务器上运行着 2 个 discourse docker，使用两个不同的 yaml 文件（并且每个都有一个 Nginx 代理，将其指向正确的 d…）

---

## [新服务器搭建问题](https://meta.discourse.org/t/problems-building-a-new-server/271944)

<div class="topic-metadata">

**Author:** [@danielabc](https://meta.discourse.org/u/danielabc)\
**回覆:** 21\
**Last updated:** [2023年七月29日 10:09 UTC](https://meta.discourse.org/t/problems-building-a-new-server/271944 "2023-07-29T10:09:54Z")

</div>

我花了好一阵子才找到一个便宜的服务器，但安装的时候，它却无法安装，耗时很长然后就断开了，我不明白为什么 配置文件 containers/app.yml 已更新...

---

## [本地服务器多IP](https://meta.discourse.org/t/local-server-multiple-ips/272814)

<div class="topic-metadata">

**Author:** [@SirSid](https://meta.discourse.org/u/SirSid)\
**回覆:** 5\
**Last updated:** [2023年七月28日 18:45 UTC](https://meta.discourse.org/t/local-server-multiple-ips/272814 "2023-07-28T18:45:24Z")

</div>

你好， 我是新手。我想在我的本地 Ubuntu 20 服务器上安装，该服务器有多个 IP 地址。 我想安装在其中一个 IP 地址上，而不是根 IP 地址。我的问题是，我应该安装在 /var/discourse 吗？还是像在……中所说的根目录？

---

## [在子文件夹中安装 Discourse 时 HTTPS 无法工作 (Ubuntu 20 和 Plesk)](https://meta.discourse.org/t/https-doesnt-work-when-installing-discourse-in-a-subfolder-ubuntu-20-and-plesk/273021)

<div class="topic-metadata">

**Author:** [@Alessandra\_Paolillo](https://meta.discourse.org/u/Alessandra_Paolillo)\
**回覆:** 3\
**Last updated:** [2023年七月27日 07:51 UTC](https://meta.discourse.org/t/https-doesnt-work-when-installing-discourse-in-a-subfolder-ubuntu-20-and-plesk/273021 "2023-07-27T07:51:53Z")

</div>

我在 Ubuntu 20 和 Plesk 上。我使用 docker 在子域名上安装 Discourse。我遵循了帖子说明，并且可以成功通过 http 安装 Discourse，但在尝试激活管理员用户时，页面无法正常加载……

---

## [在 Plesk (Ubuntu 18.04 LTS) 上安装 Discourse](https://meta.discourse.org/t/install-discourse-on-plesk-ubuntu-18-04-lts/138196)

<div class="topic-metadata">

**Author:** [@Vault1337](https://meta.discourse.org/u/Vault1337)\
**回覆:** 14\
**Last updated:** [2022年二月20日 19:04 UTC](https://meta.discourse.org/t/install-discourse-on-plesk-ubuntu-18-04-lts/138196 "2022-02-20T19:04:52Z")

</div>

大家好， 我按照 Plesk Onyx（Ubuntu 14.04）的安装教程操作，但遇到了很多问题。 现在我的 Plesk 已经全部正常运行，我决定制作一个新的教程（关于使用 Plesk 邮件服务器设置邮件）。 1…

---

## [在 AWS/Oracle OCI 等负载均衡器前运行 discourse](https://meta.discourse.org/t/run-discourse-in-front-of-load-balancer-like-aws-oracle-oci/272818)

<div class="topic-metadata">

**Author:** [@shibi](https://meta.discourse.org/u/shibi)\
**回覆:** 1\
**Last updated:** [2023年七月26日 02:30 UTC](https://meta.discourse.org/t/run-discourse-in-front-of-load-balancer-like-aws-oracle-oci/272818 "2023-07-26T02:30:40Z")

</div>

我想在负载均衡器（如 AWS/Oracle OCI）前运行 Discourse 我认为我需要遵循 但文档说。但我需要删除“templates/web.socketed.template.yml” 重建 Discourse 以使其数据可用…

---

## [Postgres SSL 证书](https://meta.discourse.org/t/postgres-ssl-certificate/139954)

<div class="topic-metadata">

**Author:** [@ron.prince](https://meta.discourse.org/u/ron.prince)\
**回覆:** 2\
**Last updated:** [2023年七月26日 00:46 UTC](https://meta.discourse.org/t/postgres-ssl-certificate/139954 "2023-07-26T00:46:09Z")

</div>

Discourse 在连接到外部配置的 PostgreSQL 数据库时是否使用 SSL？

---

## [是否能为 /t 和 /c 添加 URL 路径前缀](https://meta.discourse.org/t/possible-to-update-add-url-path-prefix-for-t-and-c/272716)

<div class="topic-metadata">

**Author:** [@shibi](https://meta.discourse.org/u/shibi)\
**回覆:** 5\
**Last updated:** [2023年七月25日 20:51 UTC](https://meta.discourse.org/t/possible-to-update-add-url-path-prefix-for-t-and-c/272716 "2023-07-25T20:51:20Z")

</div>

更新 /t 和 /c 的默认 URL 路径前缀。基本思路是，我有一个域名和负载均衡器。我有一个负载均衡器，其中包含两个后端集：API 服务 localhost:81。 discourse 在 localhost:80。我想设置…

---

## [Digital Ocean 预留 IP](https://meta.discourse.org/t/digital-ocean-reserved-ip/272815)

<div class="topic-metadata">

**Author:** [@Octoberon](https://meta.discourse.org/u/Octoberon)\
**回覆:** 0\
**Last updated:** [2023年七月25日 20:12 UTC](https://meta.discourse.org/t/digital-ocean-reserved-ip/272815 "2023-07-25T20:12:36Z")

</div>

我有一个生产服务器和一个暂存服务器（droplets），它们都在 Digital Ocean 上。我想使用一个保留的（浮动）IP 地址来切换它们（一旦我让 AWS S3 和 CloudFront CDN 工作起来），这样暂存服务器就…

---

## [如果不小心删除了app.yml文件，如何重新生成？](https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685)

<div class="topic-metadata">

**Author:** [@th21](https://meta.discourse.org/u/th21)\
**回覆:** 2\
**Last updated:** [2023年七月25日 00:03 UTC](https://meta.discourse.org/t/how-to-regenerate-app-yml-file-if-i-delete-it-accidentally/272685 "2023-07-25T00:03:50Z")

</div>

我在从备份恢复站点后尝试添加插件，但不小心删除了 app.yml 文件，如果我再次运行 \`./discourse-setup\`，我的站点会被清空吗？

---

## [Discourse 突然宕机，无法登录](https://meta.discourse.org/t/discourse-went-down-suddenly-no-one-can-log-in/272552)

<div class="topic-metadata">

**Author:** [@WesPenre](https://meta.discourse.org/u/WesPenre)\
**回覆:** 22\
**Last updated:** [2023年七月24日 19:39 UTC](https://meta.discourse.org/t/discourse-went-down-suddenly-no-one-can-log-in/272552 "2023-07-24T19:39:13Z")

</div>

我的 wespenreboards.com 上的 Discourse 已宕机数小时。会员告诉我，有些人收到了论坛可能被黑客攻击的错误消息。另一些人说他们收到了证书已过期的消息……

---

## [引导时出错：postgres 已在运行，停止容器](https://meta.discourse.org/t/error-when-bootstrapping-postgres-already-running-stop-container/272574)

<div class="topic-metadata">

**Author:** [@JJ\_IA](https://meta.discourse.org/u/JJ_IA)\
**回覆:** 2\
**Last updated:** [2023年七月24日 05:00 UTC](https://meta.discourse.org/t/error-when-bootstrapping-postgres-already-running-stop-container/272574 "2023-07-24T05:00:22Z")

</div>

我正在尝试遵循此指南，并为两个容器的设置最小化停机时间。但是，似乎需要我停止数据容器才能在同一台机器上引导 web\_only。有什么建议吗？

---

## [一个 droplet 上的 Wordpress 和 Discourse 实例 + 其他一些功能](https://meta.discourse.org/t/wordpress-and-discourse-instance-some-other-functionality-on-one-droplet/272555)

<div class="topic-metadata">

**Author:** [@ValGun](https://meta.discourse.org/u/ValGun)\
**回覆:** 1\
**Last updated:** [2023年七月23日 14:45 UTC](https://meta.discourse.org/t/wordpress-and-discourse-instance-some-other-functionality-on-one-droplet/272555 "2023-07-23T14:45:13Z")

</div>

大家好！ 我的 Discourse 实例安装在 Digital Ocean 提供的服务器上。我需要在同一台服务器上安装 WordPress 网站，并将 Discourse 实例的登录页面作为此 WordPress 网站上的菜单项（以及一些…

---

## [基于 Web 的更新是否取代了容器的重建？](https://meta.discourse.org/t/does-web-based-updates-replace-rebuilding-the-container/102090)

<div class="topic-metadata">

**Author:** [@vitorl](https://meta.discourse.org/u/vitorl)\
**回覆:** 11\
**Last updated:** [2023年七月23日 06:15 UTC](https://meta.discourse.org/t/does-web-based-updates-replace-rebuilding-the-container/102090 "2023-07-23T06:15:31Z")

</div>

我一直在 admin/upgrade 进行基于 Web 的升级，由于我的系统正常运行时间通常很长，这是否会替代使用 ./launcher rebuild 重建容器时执行的更新？ 另外，当我 …

---

## [WSL安装Discourse的问题](https://meta.discourse.org/t/issues-while-installing-discourse-on-wsl/272297)

<div class="topic-metadata">

**Author:** [@resakdo22](https://meta.discourse.org/u/resakdo22)\
**回覆:** 3\
**Last updated:** [2023年七月21日 14:38 UTC](https://meta.discourse.org/t/issues-while-installing-discourse-on-wsl/272297 "2023-07-21T14:38:27Z")

</div>

你好！我正在尝试在我的 Windows 11 机器上设置一个本地 Discourse 实例，以便使用 WSL 进行开发。 首先，我想说的是，我对 Discourse、Ubuntu 和 WSL 都是新手。所以错误很明显是来自…

---

## [开发安装出现NoMethodError](https://meta.discourse.org/t/nomethoderror-on-development-install/272294)

<div class="topic-metadata">

**Author:** [@soulseekah](https://meta.discourse.org/u/soulseekah)\
**回覆:** 3\
**Last updated:** [2023年七月21日 11:06 UTC](https://meta.discourse.org/t/nomethoderror-on-development-install/272294 "2023-07-21T11:06:08Z")

</div>

我正在运行 3.1.0-beta6，并遇到以下错误： Started GET " " for 92.62.56.207 at 2023-07-20 13:15:36 +0000 NoMethodError (undefined method \`size \` for #

---

## [因流量过大，暂时对所有人显示...但实际并非如此](https://meta.discourse.org/t/due-to-extreme-load-this-is-temporarily-being-shown-to-everyone-when-its-not-really-the-case/268636)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**回覆:** 19\
**Last updated:** [2023年七月21日 07:57 UTC](https://meta.discourse.org/t/due-to-extreme-load-this-is-temporarily-being-shown-to-everyone-when-its-not-really-the-case/268636 "2023-07-21T07:57:33Z")

</div>

你好， 自从几天前我上次更新 discourse 后，这个消息几乎一直在弹出。 如果不是因为…这是不真实的，我不会在这里开一个话题。 消息显示...

---

## [重建因 yarn 错误而失败](https://meta.discourse.org/t/rebuild-fails-with-yarn-errors/272189)

<div class="topic-metadata">

**Author:** [@bcotton](https://meta.discourse.org/u/bcotton)\
**回覆:** 12\
**Last updated:** [2023年七月20日 13:37 UTC](https://meta.discourse.org/t/rebuild-fails-with-yarn-errors/272189 "2023-07-20T13:37:07Z")

</div>

我在使用 ./launcher rebuild app 在 Ubuntu 22.04 上升级我的实例时遇到了一个错误。据我所知，问题始于此处： 错误 /var/www/discourse/app/assets/javascripts/node\_modules/discourse: 命令 f

---

## [我在 Windows 11 上安装本地 Discourse 实例时遇到问题](https://meta.discourse.org/t/im-having-trouble-installing-a-local-discourse-instance-on-windows-11/272117)

<div class="topic-metadata">

**Author:** [@resakdo22](https://meta.discourse.org/u/resakdo22)\
**回覆:** 6\
**Last updated:** [2023年七月19日 14:51 UTC](https://meta.discourse.org/t/im-having-trouble-installing-a-local-discourse-instance-on-windows-11/272117 "2023-07-19T14:51:06Z")

</div>

你好。我是一名最近才发现 Discourse 的开发人员。 我正在尝试在我的 Windows 11 机器上运行 Discourse 的本地实例，但遇到了一些问题。此本地实例将用于模拟和编辑自定义主题……

---

## [运行在非 443 端口：禁用重定向到无端口 URL](https://meta.discourse.org/t/running-on-different-port-than-443-disable-redirect-to-nonport-url/271844)

<div class="topic-metadata">

**Author:** [@PortChange](https://meta.discourse.org/u/PortChange)\
**回覆:** 7\
**Last updated:** [2023年七月18日 12:41 UTC](https://meta.discourse.org/t/running-on-different-port-than-443-disable-redirect-to-nonport-url/271844 "2023-07-18T12:41:41Z")

</div>

我已更改 app.yml 为 expose: - "20632:80" # http #- "443:443" # https - "20633:443" 并希望通过 https://mydomain.com:20633 打开 discourse，但它随后尝试重定向到 https://mydomain.com，而这不会…

---

## [Docker-compose.yml 本地运行 discourse](https://meta.discourse.org/t/docker-compose-yml-to-run-discourse-locally/271826)

<div class="topic-metadata">

**Author:** [@madhums](https://meta.discourse.org/u/madhums)\
**回覆:** 3\
**Last updated:** [2023年七月18日 09:27 UTC](https://meta.discourse.org/t/docker-compose-yml-to-run-discourse-locally/271826 "2023-07-18T09:27:27Z")

</div>

你好，我一直在尝试使用 Docker 在本地设置 Discourse，并且偶然发现了这个仓库 GitHub - discourse/discourse\_docker: A Docker image for Discourse。 不幸的是，我找不到合适的说明……

---

## [Createdb：错误：数据库创建失败：错误：数据库“discourse”已存在](https://meta.discourse.org/t/createdb-error-database-creation-failed-error-database-discourse-already-exists/267614)

<div class="topic-metadata">

**Author:** [@whitewaterdeu](https://meta.discourse.org/u/whitewaterdeu)\
**回覆:** 5\
**Last updated:** [2023年七月13日 14:29 UTC](https://meta.discourse.org/t/createdb-error-database-creation-failed-error-database-discourse-already-exists/267614 "2023-07-13T14:29:33Z")

</div>

我在服务器上首次安装 discourse 时遇到了一个错误 Ubuntu 22.04LTS Discourse 最新 GitHub 版本 2GB 内存 2GB 交换空间 错误 2023-06-08 01:19:04.972 UTC \[55\] postgres@template1 ERROR: database "discourse" al…

---

## [Nginx.http.sock 未创建](https://meta.discourse.org/t/nginx-http-sock-not-created/271441)

<div class="topic-metadata">

**Author:** [@MaitreCake](https://meta.discourse.org/u/MaitreCake)\
**回覆:** 2\
**Last updated:** [2023年七月13日 14:00 UTC](https://meta.discourse.org/t/nginx-http-sock-not-created/271441 "2023-07-13T14:00:35Z")

</div>

你好， 几周前我决定离开phpbb转向discourse。 我将它安装在Ubuntu 22.04下的树莓派上。 在多次尝试让它在Apache后运行时，我决定使用Nginx。（我需要运行几个…

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

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