
Discourse is a modern, open-source discussion and forum system. This article describes how to set up Discourse with a free SSL Certificate from Let's Encrypt on Ubuntu 20.04.
Before you begin with the Discourse installation:
Deploy a new Ubuntu 20.04 cloud server with at least 2 GB of RAM.
Set up an SMTP server for Discourse emails. You can register for a transactional email account from external email providers such as Mailgun or Sendgrid. Discourse has a list of recommended email providers.
You'll need a fully-qualified domain name (FQDN) such as discourse.example.com to create an SSL certificate with Let's Encrypt.
Create an FQDN at your DNS provider and point the name to the IP address of your server instance. It may take some time for the name to propagate through the DNS system. Use a DNS checking site to ensure the name has fully propagated before proceeding.
Turn on automatic security updates.
Setup a firewall with ufw.
Install fail2ban to secure your server
fail2ban to Use ufwCopy the main configuration to avoid unexpected changes during package updates.
Edit the configuration file with your favorite text editor
Change the banaction and banaction_allports settings to ufw in the file /etc/fail2ban/jail.local as follows:
Next, you'll need to collect the SMTP details from your transactional email account.
You need the following information:
Connect to your server instance with SSH. For example, if your server's IP address is 192.0.2.123:
Docker is an open-source platform for developing, shipping, and running applications. Docker enables you to run Discourse in an isolated and optimized environment. Use these steps to install Docker on your server.
Uninstall old versions such as docker, docker.io, or docker-engine.
Set up the repository.
Install the latest version of Docker Engine.
Create a 'discourse' folder in the /var directory.
Clone the official Discourse git repository in /var/discourse.
Change to the Discourse directory.
Launch the setup tool.
Answer the prompted questions with your hostname and SMTP details. The Discourse setup script may ask the following questions:
discourse.example.com).smtp.sendgrid.net587.apikey.Press Enter to confirm your settings, and the installation process begins automatically. The setup tool requests a Let's Encrypt SSL certificate by default.
You can run ./discourse-setup again if you need to change these settings.
To access your Discourse instance, use a web browser to navigate to your domain name, then follow the setup wizard to register your admin account.
Visit https://your_hostname/admin/upgrade, then click Upgrade to the Latest Version and follow the instructions.
Or, you can upgrade Discourse from the command line as follows:
Change directory to /var/discourse
Get the latest version of Discourse
Rebuild the Discourse app
0 Comments
Be the first to comment and share your perspective with the community.