# Self-hosting

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

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

**Page:** 47

---

## [无法连接 discourse install](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848)

<div class="topic-metadata">

**Author:** [@Daggy](https://meta.discourse.org/u/Daggy)\
**回覆:** 10\
**Last updated:** [2023年六月3日 10:24 UTC](https://meta.discourse.org/t/cant-connect-to-discourse-install/266848 "2023-06-03T10:24:04Z")

</div>

尝试在运行 Fedora Server 38 的裸金属 OVH 服务器上全新安装 Discourse，安装过程一切顺利，但我无法使用我在 app.yml 中指定的托管名称 forums.dogsrv.dev 连接到它。OVH 边缘防火墙…

---

## [Nginx无响应网关错误502](https://meta.discourse.org/t/nginx-no-reaction-bad-gateway-502/264387)

<div class="topic-metadata">

**Author:** [@gudehus](https://meta.discourse.org/u/gudehus)\
**回覆:** 2\
**Last updated:** [2023年六月2日 15:27 UTC](https://meta.discourse.org/t/nginx-no-reaction-bad-gateway-502/264387 "2023-06-02T15:27:48Z")

</div>

在重建之前一切正常。但现在我总是收到一个错误的网关错误。如果我尝试打开任何 html 文件，我都无法从 nginx 获得响应。进程正在运行，但日志文件中没有任何内容。

---

## [完全重置：重新初始化](https://meta.discourse.org/t/full-reset-re-initializing/56554)

<div class="topic-metadata">

**Author:** [@David\_Collantes](https://meta.discourse.org/u/David_Collantes)\
**回覆:** 4\
**Last updated:** [2023年五月31日 22:03 UTC](https://meta.discourse.org/t/full-reset-re-initializing/56554 "2023-05-31T22:03:02Z")

</div>

我已经运行了一段时间的测试安装。现在我准备正式安装。有没有办法重置所有内容，并像全新安装一样重新进行初始设置，而不清除容器？谢谢！

---

## [如何将已安装的 discourse 服务器无损迁移到另一台服务器？](https://meta.discourse.org/t/how-do-i-move-the-discourse-installed-server-to-another-server-without-loss/266636)

<div class="topic-metadata">

**Author:** [@Wleksion](https://meta.discourse.org/u/Wleksion)\
**回覆:** 4\
**Last updated:** [2023年五月31日 09:33 UTC](https://meta.discourse.org/t/how-do-i-move-the-discourse-installed-server-to-another-server-without-loss/266636 "2023-05-31T09:33:50Z")

</div>

如何将已安装的 Discourse 服务器无损地迁移到另一台服务器？

---

## [mail-receiver 和自签名证书的问题？](https://meta.discourse.org/t/issue-with-mail-receiver-and-self-signed-certificate/283814)

<div class="topic-metadata">

**Author:** [@sjjh](https://meta.discourse.org/u/sjjh)\
**回覆:** 3\
**Last updated:** [2023年五月31日 01:22 UTC](https://meta.discourse.org/t/issue-with-mail-receiver-and-self-signed-certificate/283814 "2023-05-31T01:22:23Z")

</div>

我正在尝试为位于反向代理（http(s), SMTP）后面的自托管 Discourse 实例设置入站电子邮件。公共域名：public.example.com，反向代理后面的主机：internal.example.com。我遵循了此手册……

---

## [如何保护服务器的 IP 免遭泄露？](https://meta.discourse.org/t/how-to-protect-a-servers-ip-from-being-exposed/217424)

<div class="topic-metadata">

**Author:** [@RedBear](https://meta.discourse.org/u/RedBear)\
**回覆:** 3\
**Last updated:** [2023年五月28日 06:45 UTC](https://meta.discourse.org/t/how-to-protect-a-servers-ip-from-being-exposed/217424 "2023-05-28T06:45:15Z")

</div>

我的论坛有 CloudFlare，当插入此服务的 URL 时，我可以获得服务器的真实 IP，这对 DDoS 攻击来说是一个巨大的礼物。 我在 Discourse Meta 上检查过，该论坛也没有 URL 过滤……

---

## [如何从数据库获取密码？](https://meta.discourse.org/t/how-to-get-a-password-from-database/253712)

<div class="topic-metadata">

**Author:** [@moschino](https://meta.discourse.org/u/moschino)\
**回覆:** 7\
**Last updated:** [2023年五月29日 02:26 UTC](https://meta.discourse.org/t/how-to-get-a-password-from-database/253712 "2023-05-29T02:26:06Z")

</div>

您好！当我安装 Discourse (Docker) 时，我看不到我为数据库设置了什么密码。 我需要它，因为我想使用远程连接到数据库，并且我认为 Discourse 为所有 docker 镜像设置了一个密码。

---

## [Ubuntu 22.04 升级](https://meta.discourse.org/t/ubuntu-22-04-upgrade/266380)

<div class="topic-metadata">

**Author:** [@fuse](https://meta.discourse.org/u/fuse)\
**回覆:** 1\
**Last updated:** [2023年五月28日 13:49 UTC](https://meta.discourse.org/t/ubuntu-22-04-upgrade/266380 "2023-05-28T13:49:43Z")

</div>

搜索时没找到这个。分享出来，希望能为您节省一些时间。 我将我的 Discourse Lightsail 实例从 Ubuntu 18.04 更新到了 Ubuntu 22.04。 一切都很顺利，直到最后一次重启。 出现了 SSH 错误……

---

## [Cloudflare Tunnel (真实IP) 和 SSL](https://meta.discourse.org/t/cloudflare-tunnel-real-ip-and-ssl/264074)

<div class="topic-metadata">

**Author:** [@kuydiyadri](https://meta.discourse.org/u/kuydiyadri)\
**回覆:** 5\
**Last updated:** [2023年五月27日 14:17 UTC](https://meta.discourse.org/t/cloudflare-tunnel-real-ip-and-ssl/264074 "2023-05-27T14:17:23Z")

</div>

你好 Discourser… 我刚刚遵循了指南 我已成功安装 discourse，并将我的服务器放入了 cloudflare tunnel。 我这里有几件事要问… 在我遭受了一次非常严重的 ddos 攻击后，我采取了行动…

---

## [使用CloudPanel管理多个Discourse站点](https://meta.discourse.org/t/use-cloudpanel-to-manage-multiple-sites-with-discourse/265427)

<div class="topic-metadata">

**Author:** [@denvergeeks](https://meta.discourse.org/u/denvergeeks)\
**回覆:** 16\
**Last updated:** [2023年五月27日 11:10 UTC](https://meta.discourse.org/t/use-cloudpanel-to-manage-multiple-sites-with-discourse/265427 "2023-05-27T11:10:05Z")

</div>

您可以通过此处的我的分步教程直接进入…… 我在（Hetzner）专用服务器上安装了一个全新的 Discourse 实例（这是当时服务器上唯一的东西）。 现在我想使用 CloudPane……

---

## [启用共享编辑会给出内部服务器错误消息](https://meta.discourse.org/t/enable-shared-edits-gives-internal-server-error-message/266281)

<div class="topic-metadata">

**Author:** [@Milk](https://meta.discourse.org/u/Milk)\
**回覆:** 6\
**Last updated:** [2023年五月26日 21:23 UTC](https://meta.discourse.org/t/enable-shared-edits-gives-internal-server-error-message/266281 "2023-05-26T21:23:03Z")

</div>

nginx 访问日志显示 "212.229.85.68 - milkii \[26/May/2023:00:23:51 +0000\] “PUT /shared\_edits/p/20/enable.json HTTP/2.0” 500 46 “https://x.xxxxxxxxx.x/t/shared-editing-test-thread/15” “Mozilla/5.0 (X11; Linux x86\_...

---

## [无法连接 - DO 上的新安装](https://meta.discourse.org/t/cant-connect-new-installation-on-do/266144)

<div class="topic-metadata">

**Author:** [@kwest](https://meta.discourse.org/u/kwest)\
**回覆:** 5\
**Last updated:** [2023年五月26日 18:45 UTC](https://meta.discourse.org/t/cant-connect-new-installation-on-do/266144 "2023-05-26T18:45:16Z")

</div>

我刚刚尝试了两次在 Digital Ocean 上安装 Discourse。 尝试 1： 第一次尝试时，我使用了官方 Github 说明，使用 DO Ubuntu 22.04 LTS 镜像，1GB 的液滴。 我使用了现有域的一个子域……

---

## [DNS 问题](https://meta.discourse.org/t/dns-question/266235)

<div class="topic-metadata">

**Author:** [@agf1997](https://meta.discourse.org/u/agf1997)\
**回覆:** 4\
**Last updated:** [2023年五月26日 18:20 UTC](https://meta.discourse.org/t/dns-question/266235 "2023-05-26T18:20:44Z")

</div>

抱歉，这是一个基础的 DNS 问题。我知道这并非 Discourse 特有的问题，只是想弄清楚在混合使用 Discourse 的情况下处理此事的最佳方式。 我想在子域上设置一个 Discourse 服务器（……

---

## [Discourse 出现短暂的“宕机” - 如何从日志中获取更多信息](https://meta.discourse.org/t/discourse-having-momentary-downs-how-to-get-more-info-from-the-logs/265762)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**回覆:** 8\
**Last updated:** [2023年五月24日 15:34 UTC](https://meta.discourse.org/t/discourse-having-momentary-downs-how-to-get-more-info-from-the-logs/265762 "2023-05-24T15:34:56Z")

</div>

嘿， 今天早上我收到一些用户的警告，说我们的 discourse 安装似乎已宕机，但当我检查时它又恢复了正常。从我的监控堆栈来看，我可以看到多种“离线”行为……

---

## [将自定义语言移动到默认语言（ES\_XX 到 es）](https://meta.discourse.org/t/move-custom-language-to-default-one-es-xx-to-es/265598)

<div class="topic-metadata">

**Author:** [@satonotdead](https://meta.discourse.org/u/satonotdead)\
**回覆:** 4\
**Last updated:** [2023年五月24日 14:51 UTC](https://meta.discourse.org/t/move-custom-language-to-default-one-es-xx-to-es/265598 "2023-05-24T14:51:26Z")

</div>

有什么正确的方法可以做到这一点？通过 MySQL，在 Discourse 中使用查询，或者通过某个脚本？ 似乎使用插件创建自定义语言在我们的实例中会引起一些问题。

---

## [Discourse无法正常工作](https://meta.discourse.org/t/discourse-does-not-work/265838)

<div class="topic-metadata">

**Author:** [@Wleksion](https://meta.discourse.org/u/Wleksion)\
**回覆:** 2\
**Last updated:** [2023年五月23日 21:05 UTC](https://meta.discourse.org/t/discourse-does-not-work/265838 "2023-05-23T21:05:40Z")

</div>

我在服务器上安装了所有软件，它们都能正常工作，但 Discourse 不行。这可能是什么问题？您能在 Digital Ocean 上提供帮助吗？

---

## [YJIT有问题？](https://meta.discourse.org/t/trouble-with-yjit/265976)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 2\
**Last updated:** [2023年五月23日 20:16 UTC](https://meta.discourse.org/t/trouble-with-yjit/265976 "2023-05-23T20:16:43Z")

</div>

在通过 ECS 管理的实例上，我在 EC2 中的 Docker 容器内使用 SKIP\_POST\_DEPLOYMENT\_MIGRATIONS=1 进行了迁移，然后在 ECS 上启动了新镜像，之后 rake db:ensure\_post\_migrations db:migra… 失败了

---

## [我遇到了这个错误](https://meta.discourse.org/t/im-running-into-this-error/265664)

<div class="topic-metadata">

**Author:** [@Wleksion](https://meta.discourse.org/u/Wleksion)\
**回覆:** 5\
**Last updated:** [2023年五月23日 19:58 UTC](https://meta.discourse.org/t/im-running-into-this-error/265664 "2023-05-23T19:58:31Z")

</div>

2023-05-20 18:50:24.008 UTC \[57\] LOG: received fast shutdown request 2023-05-20 18:50:24.016 UTC \[57\] LOG: aborting any active transactions 2023-05-20 18:50:24.026 UTC \[57\] LOG: background worker

---

## [安装/网络（端口配置）](https://meta.discourse.org/t/installation-networking-port-configs/264017)

<div class="topic-metadata">

**Author:** [@nubbyninja](https://meta.discourse.org/u/nubbyninja)\
**回覆:** 7\
**Last updated:** [2023年五月23日 00:14 UTC](https://meta.discourse.org/t/installation-networking-port-configs/264017 "2023-05-23T00:14:36Z")

</div>

我想我已经度过了最糟糕的时期…… 正如您从屏幕截图中看到的，我已经成功“安装”了 Discourse。但我似乎无法分配有效的 SSL 证书。 作为记录，我正在通过我的 Synology…路由此设置

---

## [What's the different between rebuild and bootstrap](https://meta.discourse.org/t/whats-the-different-between-rebuild-and-bootstrap/60315)

<div class="topic-metadata">

**Author:** [@gastrodia](https://meta.discourse.org/u/gastrodia)\
**回覆:** 10\
**Last updated:** [2019年九月28日 22:02 UTC](https://meta.discourse.org/t/whats-the-different-between-rebuild-and-bootstrap/60315 "2019-09-28T22:02:49Z")

</div>

what’s the different between ./launcher rebuild app ./launcher bootstrap app they both tool slow , is where any command to modify config like UNICORN\_WORKERS and then fast test it

---

## [关于VERP、邮件退信和Discourse的附加设置感到困惑](https://meta.discourse.org/t/confused-about-verp-email-bounces-additional-setup-on-discourse/265610)

<div class="topic-metadata">

**Author:** [@decryption](https://meta.discourse.org/u/decryption)\
**回覆:** 4\
**Last updated:** [2023年五月20日 23:11 UTC](https://meta.discourse.org/t/confused-about-verp-email-bounces-additional-setup-on-discourse/265610 "2023-05-20T23:11:13Z")

</div>

我对 VERP 和处理电子邮件退信感到有些困惑。 我正在使用 Sendgrid，一切运行良好，但经过一些阅读，似乎我需要在 Sendgrid 上设置 webhook（这很容易）来通知 Discourse…

---

## [1GB DO Droplet 上的内存概览](https://meta.discourse.org/t/a-look-at-memory-on-a-1gb-do-droplet/265572)

<div class="topic-metadata">

**Author:** [@Brandon007](https://meta.discourse.org/u/Brandon007)\
**回覆:** 4\
**Last updated:** [2023年五月19日 21:04 UTC](https://meta.discourse.org/t/a-look-at-memory-on-a-1gb-do-droplet/265572 "2023-05-19T21:04:22Z")

</div>

我刚从一台2GB的机器迁移到一台1GB的机器来运行我的论坛。它不到一年新，使用率不高，有170个成员。 在Digital Ocean中，我看到： 我非常确定，在我的2GB机器上，内存利用率在80%的范围内。…

---

## [如何在Discourse Docker容器中设置NGINX](https://meta.discourse.org/t/how-to-setup-nginx-in-the-discourse-docker-container/265417)

<div class="topic-metadata">

**Author:** [@Đạt\_Hoàng](https://meta.discourse.org/u/%C4%90%E1%BA%A1t_Ho%C3%A0ng)\
**回覆:** 5\
**Last updated:** [2023年五月18日 14:26 UTC](https://meta.discourse.org/t/how-to-setup-nginx-in-the-discourse-docker-container/265417 "2023-05-18T14:26:26Z")

</div>

我的 Discourse 论坛运行在 forum.example.com 地址上。我想在 Discourse Docker 容器中设置 NGINX，并遵循了这里的说明 在同一台机器上运行其他网站与 Discourse 之后……

---

## [为 Discourse 服务器启用 Cloudflare 代理](https://meta.discourse.org/t/enabling-cloudflare-proxy-for-discourse-server/265053)

<div class="topic-metadata">

**Author:** [@shahidhannure](https://meta.discourse.org/u/shahidhannure)\
**回覆:** 1\
**Last updated:** [2023年五月17日 10:42 UTC](https://meta.discourse.org/t/enabling-cloudflare-proxy-for-discourse-server/265053 "2023-05-17T10:42:46Z")

</div>

有人能帮忙吗，我该如何在 discourse 服务器上启用 Cloudflare 代理。

---

## [论坛离线：Web 恢复无法正常工作](https://meta.discourse.org/t/forum-offline-restore-is-not-working-through-web/265272)

<div class="topic-metadata">

**Author:** [@Brandon007](https://meta.discourse.org/u/Brandon007)\
**回覆:** 9\
**Last updated:** [2023年五月17日 05:20 UTC](https://meta.discourse.org/t/forum-offline-restore-is-not-working-through-web/265272 "2023-05-17T05:20:17Z")

</div>

今晚我犯了一个大错，不小心在 DO 中炸毁了我的论坛。所以我无法从快照恢复。我重新创建了一个 Discourse 实例，但我无法通过网络上传我的备份。它上传到大约 17%，然后……

---

## [Prometheus抓取作业无法到达指标](https://meta.discourse.org/t/prometheus-scrape-job-cannot-reach-the-metrics/264902)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**回覆:** 16\
**Last updated:** [2023年五月17日 00:07 UTC](https://meta.discourse.org/t/prometheus-scrape-job-cannot-reach-the-metrics/264902 "2023-05-17T00:07:23Z")

</div>

我有一个正在运行的 discourse 安装（实际上有两个，一个在暂存环境，一个在生产环境，是不同的虚拟机）。我正在暂存环境中进行测试。安装过程遵循官方指南。 目前有一个 Grafan…

---

## [如何连接 LlamaIndex (或 Llama Hub) 与 Discourse？](https://meta.discourse.org/t/how-to-connect-llamaindex-or-llama-hub-with-discourse/262501)

<div class="topic-metadata">

**Author:** [@anon36484860](https://meta.discourse.org/u/anon36484860)\
**回覆:** 1\
**Last updated:** [2023年五月16日 18:48 UTC](https://meta.discourse.org/t/how-to-connect-llamaindex-or-llama-hub-with-discourse/262501 "2023-05-16T18:48:16Z")

</div>

我们目前正在试验AI/LLM工具，并希望将我们的Discourse论坛的索引输入到LlamaIndex中，以利用内容进行可能的ChatGPT使用或类似用途。为此，https://llamahub.ai/提供了...

---

## [Discourse Docker HW 保留/使用（CPU、RAM、磁盘）及管理方法](https://meta.discourse.org/t/discourse-docker-hw-reserved-used-cpu-ram-disk-and-how-to-manage-it/265010)

<div class="topic-metadata">

**Author:** [@Crius](https://meta.discourse.org/u/Crius)\
**回覆:** 5\
**Last updated:** [2023年五月16日 10:43 UTC](https://meta.discourse.org/t/discourse-docker-hw-reserved-used-cpu-ram-disk-and-how-to-manage-it/265010 "2023-05-16T10:43:31Z")

</div>

这个周末我安装了一些外部工具在运行我们 Discourse 安装的虚拟机上（grafana、prometheus、一些导出器）以及一些分析工具（matomo），并将备份设置在外部位置……

---

## [Discourse 官方安装 "无此文件或目录"](https://meta.discourse.org/t/no-such-file-or-directory-when-installing-discourse/264924)

<div class="topic-metadata">

**Author:** [@denvergeeks](https://meta.discourse.org/u/denvergeeks)\
**回覆:** 4\
**Last updated:** [2023年五月15日 11:54 UTC](https://meta.discourse.org/t/no-such-file-or-directory-when-installing-discourse/264924 "2023-05-15T11:54:10Z")

</div>

在全新的 Hetzner 服务器上安装 Discourse 新实例时，服务器配置如下： 按照此处指示… 并遵循此处的说明… 像这样… …我收到了错误： fa…

---

## [突然我的服务器不知何故崩溃了](https://meta.discourse.org/t/suddenly-my-server-got-crashed-out-of-nowhere/264662)

<div class="topic-metadata">

**Author:** [@Kushalghosh9899](https://meta.discourse.org/u/Kushalghosh9899)\
**回覆:** 8\
**Last updated:** [2023年五月15日 06:39 UTC](https://meta.discourse.org/t/suddenly-my-server-got-crashed-out-of-nowhere/264662 "2023-05-15T06:39:43Z")

</div>

我不知道发生了什么，但当我尝试访问我托管在基于 ubuntu 22 的 EC2 t2.micro 服务器上的网站时，该网站几个小时前还在非常顺利地运行，我们这边没有任何更改……

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

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