Hello everyone,
After struggling for a while to set up my VPS with Discourse, I decided to share a simple step-by-step guide to help you install Discourse on an OVH VPS.
In my case, I’m using:
-
An OVH VPS
-
A domain name
-
A professional email (OVH Email Pro)
Note: I’m not a server configuration expert. If you notice any mistakes or improvements, feel free to let me know.
Step 0 – Prerequisites
You’ll need the following products from OVH:
-
VPS (with the following options when purchasing):
-
Choose a datacenter located in the country of your target audience (recommended).
-
Operating System: Debian 12
-
-
Domain name
-
Email (OVH Email Pro)
Note : Read the two important OVH emails you’ll receive
Additional tools & accounts:
-
(Optional) MaxMind – for extra security:
-
Create an account: MaxMind Signup
-
Go to Manage License Keys > Generate new license key (save both the ID and the key, as key won’t be shown again).
-
-
PuTTY (SSH client used in this guide): Download PuTTY
Step 1 – Configure your OVH services
-
Domain → VPS
-
Go to: Web Cloud > Domain Names > yourdomain.com > DNS Zone
-
For each type A record, replace the target with your VPS IPv4 address.
-
-
Domain → Email Pro
-
Go to: Web Cloud > Email Pro > Associated Domains
-
Add your purchased domain.
-
-
Create an Email
-
Go to: Web Cloud > Email Pro > Email Accounts
-
Create a new email address (e.g. contact@yourdomain.com).
-
Step 2 – VPS Setup
-
Connect via SSH
-
Open PuTTY
-
Hostname: your VPS IPv4
-
Port: 22
-
In console : Log in with the username and password sent by email.
-
-
Secure your server
-
Change your password.
-
Change SSH port (Recommended):
sudo vi /etc/ssh/sshd_config
-
Find the line with “Port” (use arrow keys).
-
Remove the # and replace the port number (i to insert) with one between 49152 and 65535.
Save and exit (Esc > :wq)
-
-
Install dependencies (Debian)
sudo apt install docker.io -y
sudo apt install git -y
-
Install Discourse
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers
-
Run the setup script
sudo ./discourse-setup
Fill in the prompts :
- Hostname: your domain (e.g. yourdomain.com)
- Admin Email: your personal email
- SMTP server address: found in OVH client area → Email Pro (e.g. proX.mail.ovh.net)
- SMTP Port: 587
- SMTP Username: the email you created earlier (e.g. contact@yourdomain.com)
- SMTP Password: password of that email account
- Notification Email: same as SMTP Username
- Let’s Encrypt Email: your personal email (recommended)
- MaxMind Account ID: from your MaxMind account
- MaxMind Key: license key you generated
-
Fine-tune the SMTP settings
sudo nano containers/app.yml
Scroll to the SMTP section.
- Edit as follows:
-
SMTP domain: same as your SMTP hostname
-
SMTP authentication: replace “plain” with “login”
-
Enable STARTTLS: remove the # before the line
Save & exit (Ctrl + O, Enter, Ctrl + X).
-
- Edit as follows:
-
Rebuild the app
sudo ./launcher rebuild app
Step 3 – Final Test
Check if email sending works:
sudo ./discourse-doctor
- Enter a test email address to receive a test message.
If everything works, you can now finish setting up Discourse directly from your website at https://yourdomain.com
Murffy