# 如何在 OVH VPS 上安装 Discourse

**URL:** https://meta.discourse.org/t/how-to-install-discourse-on-an-ovh-vps/381056
**Category:** Self-hosting
**Tags:** hosting
**Created:** [2025年八月31日 09:28 UTC](https://meta.discourse.org/t/how-to-install-discourse-on-an-ovh-vps/381056 "2025-08-31T09:28:25Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Murffy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/murffy/32/518963_2.png) [@Murffy](https://meta.discourse.org/u/Murffy)
#### Post date: [2025年八月31日 09:28 UTC](https://meta.discourse.org/t/how-to-install-discourse-on-an-ovh-vps/381056/1 "2025-08-31T09:28:25Z")

</div>

大家好，

在花费了很长时间设置 Discourse 的 VPS 后，我决定分享一个简单的分步指南，帮助您在 OVH VPS 上安装 Discourse。

在我的例子中，我使用的是：

- OVH VPS

- 域名

- 专业邮箱（OVH Email Pro）

⚠ 注意：我不是服务器配置专家。如果您发现任何错误或有改进建议，请随时告知我。

* * *

## **第 0 步 – 先决条件**

您需要 OVH 的以下产品：

- **VPS（购买时需包含以下选项）：**

- **域名**

- **邮箱（OVH Email Pro）**

**注意：** 阅读您收到的两封重要的 OVH 邮件

其他工具和账户：

- （可选） **MaxMind** – 用于增强安全性：

- **PuTTY** （本指南使用的 SSH 客户端）：[下载 PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)

* * *

## **第 1 步 – 配置您的 OVH 服务**

1. **域名 → VPS**

2. **域名 → Email Pro**

3. **创建邮箱**

* * *

## **第 2 步 – VPS 设置**

1. **通过 SSH 连接**

2. **保护您的服务器**

3. **安装依赖项（Debian）**  
`sudo apt install docker.io -y`  
`sudo apt install git -y`

4. **安装 Discourse**  
`sudo -s`  
`git clone https://github.com/discourse/discourse_docker.git /var/discourse`  
`cd /var/discourse`  
`chmod 700 containers`

5. **运行设置脚本**  
`sudo ./discourse-setup`

6. **微调 SMTP 设置**  
`sudo nano containers/app.yml`

7. **重新构建应用程序**  
`sudo ./launcher rebuild app`

* * *

## **第 3 步 – 最终测试**

**检查电子邮件发送是否正常：**

`sudo ./discourse-doctor`

- 输入一个测试电子邮件地址以接收测试消息。

如果一切正常，您现在可以直接从您的网站 **[https://yourdomain.com](https://yourdomain.com)** 完成 Discourse 的设置。

Murffy

---

_[View the full topic](https://meta.discourse.org/t/how-to-install-discourse-on-an-ovh-vps/381056)._
