This document has been translated according to the content on the discourse/ at main · discourse/discourse · GitHub page.

Cloud platform installation

Discourse installation on a cloud-based platform usually takes less than 30 minutes, even if you don’t have any knowledge of Rails or Linux shells. The following installation test was conducted through DigitalOcean service provider, but all installation steps can be performed on all cloud computing platforms compatible with Docker, and the installation can also be completed on the local server.

If you don’t have 30 minutes? You can contact the Discourse community to help you complete the installation for a one-time fee of $150 (US $). Click the link here to purchase the service.

Create a new cloud server

Create your new cloud server, such as DigitalOcean, but you can also use servers provided by other platforms.

The current version of the LTS Ubuntu operating system, configured by default, works fine. At a minimum, you need a 64-bit Linux operating system, and the kernel of that operating system needs to be updated to the latest version. The default configuration of 1GB of memory will usually work well for a small Discourse community. However, we recommend 2 GB of memory for large communities. The default configuration of New York data center is a good geographical partition for both North America and Europe. If your Discourse users are mostly users in other geographical locations, you can choose a data center closer to you. To create a Droplet in DigitalOcean, enter the domain name (A Droplet is the server name defined by DigitalOcean.) Of course, you can also purchase and use your own domain name. Usually Discourse installation requires a real domain name and cannot be installed through IP address. Therefore, we suggest that you first purchase a domain name or use a secondary domain name of your existing domain name.

Creating your new Droplet is the same process as creating a server on DigitalOcean as creating a VPS or server on any other platform. When it is finished, you will receive an email with your Root password. However, we recommend that you set up SSH Keys to enhance the security of your server access.

Access your cloud server

By using the IP address and using SSH to connect and access the server you created, or for Windows you can install PuTTY and run the following command to connect:

SSH [email protected]

If you do not have an SSH Key configured, you can either log in using the password included in the email sent to you by DigitalOcean or use your local SSH Key to connect.

Install Docker/Git (optional)

If you want to use your own version of Docker, you can install it now on your newly configured server. If Docker is not installed on your server by default, Discourse – Setup will automatically install for you after downloading it from

Install the Discourse

Clone the code from the official Discourse Docker image repository to the /var/discourse directory on the local computer.

sudo -s

git clone… /var/discourse

cd /var/discourse

You just need to execute the above command and root permission is required during Discourse installation.


The email system is very important in the user creation process of Discourse. If you did not create an email SMTP server before you installed your Discourse, then your installed Discourse is not accessible or logged in!

If you already have your own SMTP mail server, then you can use the mail server configuration information you already have. Is there a mail server? Please visit the email server that Discourse has recommended. To ensure that your mail can be delivered properly, you must add valid SPF and DKIM records to your DNS. Please visit your mail service provider’s documentation on how to set up this information.

According to our actual use, the installation of Discourse must be configured with available domain name and email server. For situations in China, you can use the enterprise email provided by Ali Cloud or Tencent Cloud. Usually we recommend that you use an overseas mail server, such as AWS SES or Mailgun, which are good services. You may need an international credit card for verification. This step is necessary, otherwise your Discourse won’t be able to complete the installation.

The domain name

Discourse cannot work through an IP address and you must have a domain or second level domain to install, such as

If you already have a domain name, please please select either or or to install your Discourse instance. If you don’t already have a domain name, you can go to the NameHeap website to search for your preferred domain name, or just Google Great Domain Name Registrars to select your preferred domain name registrars. Your DNS console should be accessible, and after you purchase the domain name, you will need to access your DNS configuration to configure DNS. You will need to create an A record through your DNS for the Discourse site you have installed, which will point the domain name you are installing to A specific IP address. This IP address is usually the server IP address you purchased in the first step. Editing Discourse Configuration

Run the configuration tool with the following command


You need to configure all the parameters according to the following prompts:

Hostname for your Discourse? []:

Email address for admin account(s)? [[email protected],[email protected]]:

SMTP server address? []:

SMTP port? [587]:

SMTP user name? [[email protected]]:

SMTP password? [pa$word]:

Let’s Encrypt account email? (ENTER to skip) [[email protected]]:

The above input data will create an app.yml file for your Discourse instance that will be configured after installation. The entire installation startup process may take 2-8 minutes to provide your configuration Discourse. If you need to make changes to your configuration after the installation is complete, you can run./ discourses setup again (this will reload the existing app.yml file). Or you can manually edit the contents of your /containers/app.yml file directly and then run./launcher rebuild app again, otherwise your changes will not take effect.

Start the Discourse

Once the initial installation configuration is complete, your Discourse examples should be accessible on your browser through, the domain name you have configured.

Sign up for a new administrator account

Use the email address you entered during the reboot configuration to register an administrator account.

(if you can’t register your management account (Admin), please through the path/var/discourse/Shared/standalone/log/rails/production. Check the log log, check list or access email problems.)

When you have completed the administrator account registration, the setup wizard will launch and guide you through configuring your Discourse instance.

When all the setup wizards are complete, you will see Staff Topics and Read Me First: Admin Quick Start Guide. The configuration wizard will include advice on how to configure your Discourse installation and how to customize it.

Post installation maintenance We strongly recommend turning on your security automatic updates for your operating system. Use the dpkg-reconfigure-plow unattended-upgrades command in Ubuntu. In CentOS/RHEL, the yum-cron package is used. If you are using a password to log in to your operating system rather than an SSH Key, make sure you use a strong password. Use apt-get install libpam-cracklib package on Ubuntu. We recommend using fail2ban, which will disable IP addresses that have failed 3 times for 10 minutes. Ubuntu: apt-get install fail2ban CentOS/RHEL: Sudo yum install fail2ban (requires EPEL) If you want to install a firewall by default, open UFW for Ubuntu or use firewalld for CentOS/RHEL 7 and later.

Your email address will be prompted when a Discourse is updated with a new version. Please update your Discourse instance to the latest version at any time to ensure that any security issues are fixed. You will get email reminders as new versions of Discourse are released. Please stay current to get the latest features and security fixes. To update a Discourse to the latest version, go to /admin/upgrade through your browser and click the update button.

The launcher command in the /var/discourse directory is used to use some system-level maintenance:

Usage: launcher COMMAND CONFIG [–skip-prereqs] [–docker-args STRING]


Start: Start/ Initialize a container Stop: Stop a running container Start: Start/ Initialize a container When you start a container, you destroy: Stop and remove a container. Logs: Use nsenter to get a shell into a container. Logs: Use nsenter to get a shell into a container Bootstrap: View the Docker logs for a container Bootstrap a container for the config based on a template Rebuild a container (destroy old, bootstrap, start new) Rebuild a container, this will delete the old container, start a container, start a new container) Remove all containers that have stopped for > 24 hours (Remove containers that have stopped running for more than 24 hours)


--skip-prereqs Don't check launcher un-named prerequisites in a local newspaper --docker-args Extra arguments to pass when running Docker (extra arguments passed to the container)…