What will your forum need from the server?
Less than you might think, at least to start. The figures below are the ones the Discourse team publishes for its normal install, where everything (the database, the cache and the forum itself) runs together in one container.
- Memory: 1 GB is the floor, and only with swap space added. 2 GB or more is what they recommend.
- Processor: one core will do; two or more is the recommendation.
- Disk: 10 GB at the very least, 20 GB or more recommended. Uploaded pictures and backups grow from there.
- System: any 64-bit Linux, with Ubuntu LTS (the long-term support release) the preferred choice.
- A web address: Discourse refuses to run on a bare IP. Use your own domain, or claim a free name ending in discourse.diy during setup.
You don't have to tune anything by hand. The installer looks at your memory and cores and sets the number of web workers and the database's memory share to match. The guide doesn't say how many members a given size carries, so treat these as starting figures and watch how your own forum behaves.
Why the admin email matters so much
Discourse has no admin account waiting for you after install. Instead, the setup wizard asks for one or more email addresses and stores them in its settings file as DISCOURSE_DEVELOPER_EMAILS. When someone registers with one of those addresses, Discourse makes that account an admin. Anybody else who signs up, even before you, simply gets a regular member account.
That leaves one question: can you prove you own that address? There are two ways through.
- You give the wizard mail settings. Discourse sends a confirmation message to your admin address. If that message never arrives, you can't finish signing in, which is why Discourse's own troubleshooting guide treats broken email as the first thing to fix on a new forum. The guide's fallback, opening a shell in the container and running
rake admin:createto make the admin account manually, is one it advises against. - You skip mail for now. The installer then turns on sign-in through Discourse ID, the Discourse team's account service at id.discourse.com, with Google, Facebook, Apple and GitHub buttons. Register there with your admin address. You can add mail later; until you do, there are no email digests, no mailing-list mode and no replying by email.
Discourse doesn't come with a mail server of its own, and its docs strongly advise a dedicated sending service rather than running one yourself. Verify the forum's own subdomain (forum.example.com) with that service, not only example.com, or mail won't be set up correctly.
Up and running in an evening
- At your domain registrar, add an A record so your forum's name points to the server's IPv4 address. The wizard will check it.
- Begin with a newly installed copy of Ubuntu or Debian. Ports 80 and 443 have to be free, so don't install a separate web server first.
- Log in over SSH and paste the command below. It adds git and Docker if they are missing, downloads Discourse's Docker setup into /var/discourse and opens the setup wizard.
- Type your admin email address (or several, separated by commas), then your forum's web address: either your own hostname such as forum.example.com, or a free discourse.diy name plus the six-digit verification code you generate in Discourse ID. Finally, enter your mail provider's details or choose Skip.
- Confirm and wait while it builds; the official guide estimates five to ten minutes. Your HTTPS certificate from Let's Encrypt is set up for you along the way.
- Visit your forum, register with the admin address, and follow the short in-forum wizard that appears next.
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bash
That line hands a script from the internet straight to the administrator account. It comes from Discourse's public repository, and if you would rather look before you run it, download the file first, read it, then run it with sudo.
Keep the mail password to yourself
Everything the wizard asked you is saved in /var/discourse/containers/app.yml, and that includes your mail password, written out in plain text. Discourse's own management script warns you when other users on the system can read that file. Lock it down so only the administrator account can open it:
cd /var/discourse
chmod 600 containers/app.yml
Discourse's tools are run as root, as the installer is, so they can still read it. After you edit app.yml, apply the change; the forum is offline while it rebuilds:
cd /var/discourse
./launcher rebuild app
If mail still misbehaves after that, run ./discourse-doctor from the same folder: it looks for the usual mail mistakes and suggests what to change.
If your password contains a # or other symbols, wrap it in double quotes inside app.yml, since an unquoted # starts a comment there. Never paste the file into a public help thread without blanking the password first.
Staying current without drama
Discourse emails you when a new version comes out. The easiest way to update is the Upgrade page in your admin panel at /admin/upgrade, which is the route the guide recommends. The other route is ./launcher rebuild app from /var/discourse: it stops the old container, builds a fresh one, then swaps it in, so your forum is offline until the build finishes. Pick a quiet hour for it and take a backup first.
For the server underneath, the guide suggests turning on Ubuntu's automatic security updates and installing fail2ban, which blocks addresses that keep guessing passwords.
Make sure your posts survive a bad day
Out of the box, Discourse backs itself up once a week, keeps the five newest copies, and includes uploaded files. You can switch to daily in the admin settings. By default those backups sit right next to the forum on its own drive, in a backups folder inside /var/discourse/shared/standalone, so one failed drive would take the forum and its backups together.
Send them somewhere else: Discourse can store backups in an S3-compatible bucket (give it a bucket or folder of its own), or you can copy the backup folder to another machine on a timer. Once in a while, restore one onto a test install. A backup you have never restored is only a hope.
The server that fits your community
A dedicated server from us is a whole physical computer that runs your forum and nobody else's work. Even the smallest carries 8 GB of RAM, a fourfold margin over the 2 GB Discourse recommends (our comparison, not theirs), so the database, the cache and the web workers aren't squeezed. You log in as root, nobody meters the port, so a popular thread full of pictures never turns into a bandwidth bill, and if an install goes sideways you can wipe and reinstall the operating system yourself, any number of times, in the control panel.
- A ready server is handed over within about 30 minutes once your payment is approved.
- On our rack servers and blades you also get a remote console, the screen and power button reachable outside the operating system, so a firewall slip doesn't lock you out of your own forum.
- Month to month, no contract; IPv6 at no charge.
- Choose Ubuntu from the Linux options, and put the server in the city closest to your members on the locations page.
Just trying Discourse out with a few friends? A Cloud VPS, a virtual machine on a shared server, is enough for a test. Move to your own machine once real members and their uploads arrive.
Questions people ask
- Is a 2 GB server enough for Discourse?
- 2 GB of memory is what the Discourse team recommends for its standard install, alongside two or more processor cores and 20 GB or more of disk. 1 GB works only with swap added, and the installer offers to create swap when memory is low. How far beyond that you go depends on how busy your forum becomes.
- I installed Discourse but never got the activation email. What now?
- Run ./discourse-doctor from /var/discourse, which checks the usual mail mistakes and suggests fixes. Then look at the mail settings in containers/app.yml for typos and unquoted special characters, rebuild, and check your mail provider's own logs. Discourse's guide also asks you to confirm your SPF and DKIM records are in place for the forum's domain.
- Do I need my own domain name to run Discourse?
- You need a name of some kind, because Discourse does not work on a bare IP address. Your own domain or subdomain is best for a real community. For testing, the installer can set up a free yoursite.discourse.diy name for you after a quick verification through Discourse ID.
- Can someone else grab the admin account before I do?
- Not by signing up first. Admin rights go only to accounts registered with an address listed in DISCOURSE_DEVELOPER_EMAILS, so a stranger who registers early just becomes an ordinary member. Keep that address an inbox only you control.
- Will my forum go offline when I update it?
- A command-line rebuild replaces the container, so the forum is down until the new one has finished building. Plan updates for a quiet time of day. Larger forums can move to Discourse's multi-container setup, which can build the new version while the old one keeps serving.