docs/INSTALL-cloud.md
To install and self-host Discourse, follow the steps below. But if you'd rather skip the setup, maintenance, and server management, our official Discourse hosting takes care of everything for you.
If you prefer to self-host but need help setting it up we have partners who can help. Click here to explore self-hosting set-up options.
Set up Discourse in about 10 minutes with zero knowledge of Rails or Linux shell. Works on any Docker-compatible cloud provider or local server.
Run this single command on a fresh Ubuntu/Debian server:
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bash
That's it! The installer will:
Don't have a domain name? No problem! The installer offers free subdomains like
yoursite.discourse.diy— no purchase required.Don't want to set up email? Skip SMTP and users can log in via Discourse ID with social logins (Google, Facebook, Apple, GitHub).
| Requirement | Minimum | Recommended |
|---|---|---|
| RAM | 1 GB (with swap) | 2 GB+ |
| CPU | 1 core | 2+ cores |
| Disk | 10 GB | 20 GB+ |
| OS | 64-bit Linux | Ubuntu LTS |
Auto-scaling: The installer automatically tunes
UNICORN_WORKERSanddb_shared_buffersbased on your server's RAM and CPU.
The installer works on any cloud provider with Docker support:
You have two options:
| Option | Best For | Setup |
|---|---|---|
Free subdomain (mysite.discourse.diy) | Testing, learning, hobby projects | Claim at id.discourse.com/my/subdomain |
Your own domain (forum.example.com) | Production, custom branding | Purchase from a registrar, configure DNS A record |
Visit id.discourse.com/my/subdomain anytime to claim your subdomain. You can do this before or during installation:
mysite)How it works: The installer verifies your code with Discourse ID, then automatically creates a DNS A record pointing
yoursite.discourse.diyto your server's IP. No manual DNS configuration required!
forum.example.com) to your server's IP addressCreate a cloud server on any provider (e.g., a DigitalOcean droplet with Ubuntu)
SSH into your server:
ssh root@your-server-ip
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bash
The wizard will guide you through:
forum.example.com)After confirming your settings, the installer builds your Discourse (~5-10 minutes).
Note: SSL certificates via Let's Encrypt are provisioned automatically — no additional configuration required.
Unlike previous versions, you can skip email configuration during initial setup. When you skip SMTP, the installer automatically enables Login via Discourse ID, which provides:
This is perfect for:
Note: If you want traditional email features (email digests, mailing list mode, or email replies), you can configure SMTP later via Admin → Email or by re-running the setup wizard.
The wizard handles these automatically:
UNICORN_WORKERS and db_shared_buffers based on your hardwareOnce the build completes (5-10 minutes), your forum will be available at:
https://yoursite.discourse.diy (free subdomain)https://forum.example.com (your own domain)Tip: Make sure you register with one of the admin emails you entered during installation to get admin privileges.
We strongly recommend enabling automatic security updates:
# Ubuntu/Debian - enable unattended upgrades
dpkg-reconfigure -plow unattended-upgrades
# Install fail2ban for brute-force protection
apt install fail2ban
Via web UI (recommended):
Visit https://your-forum/admin/upgrade and click Upgrade
Via command line:
cd /var/discourse
./launcher rebuild app
Discourse will email you when new versions are available. Stay current for the latest features and security fixes.
For advanced users, edit the configuration file directly:
nano /var/discourse/containers/app.yml
cd /var/discourse
./launcher rebuild app
For IP-based geolocation features (country detection, etc.), register for a free MaxMind GeoLite2 license key and add it to your app.yml:
env:
DISCOURSE_MAXMIND_LICENSE_KEY: "your_license_key_here"
The launcher script in /var/discourse provides these commands:
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
start Start/initialize a container
stop Stop a running container
restart Restart a container
destroy Stop and remove a container
enter Open a shell inside the container
logs View Docker logs for a container
bootstrap Bootstrap a container from template
rebuild Rebuild a container (destroy old, bootstrap, start new)
cleanup Remove stopped containers (> 24 hours old)
# Check what's using the ports
lsof -i :80
lsof -i :443
# Stop conflicting services
systemctl stop nginx # or apache2
systemctl disable nginx
--skip-connection-test to bypass verification temporarily# View container logs
cd /var/discourse
./launcher logs app
# Enter container for debugging
./launcher enter app
# Check Rails production logs
cat /var/discourse/shared/standalone/log/rails/production.log
The installer will offer to create swap space. You can also create it manually:
# Create 2GB swap
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
If you configured SMTP but emails aren't sending, see the Email Troubleshooting Guide.
After installation, you can enable additional features:
Help us improve this guide! Feel free to ask questions on meta.discourse.org or submit a pull request.
Still finding setup too complex? Let us host Discourse for you — we handle everything.