Discourse is a popular open-source discussion platform designed for modern forums and communities. In this guide, we will walk you through how to install Discourse on Ubuntu 20.04 LTS. Whether you're using a Windows VPS UK or another VPS service, Discourse is a powerful tool to create a dynamic online forum.

Prerequisites

Before starting, ensure you have the following:

Step 1: Update Your System

Before you begin the installation, update your system packages to ensure everything is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install Docker

Discourse uses Docker to deploy its containerized application. First, install Docker on your Ubuntu server:

sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
sudo apt install docker-ce -y

Step 3: Install Git

Discourse uses Git to download and manage the installation files. Install Git by running:

sudo apt install git -y

Step 4: Clone the Discourse Repository

Navigate to the directory where you want to install Discourse and clone the official Discourse repository:

sudo mkdir /var/discourse
sudo git clone https://github.com/discourse/discourse_docker.git /var/discourse

Step 5: Configure Discourse

Navigate to the Discourse directory and run the setup script:

cd /var/discourse
sudo ./discourse-setup

The script will ask for information such as your domain name, email address, and SMTP server details for sending email. Be sure to have this information ready, as it is necessary for completing the installation.

Step 6: Start Discourse

Once the configuration is complete, Discourse will automatically start. You can check the status of the Discourse containers using the following Docker command:

sudo docker ps

You should see the running Discourse container in the output.

Step 7: Access Discourse

Now, open your web browser and navigate to your domain name (e.g., http://your-domain.com). You will be prompted to complete the setup by creating an admin account. Follow the on-screen instructions to configure your Discourse forum.

Step 8: Configure SSL with Let's Encrypt (Optional)

For added security, you can enable SSL using Let's Encrypt. During the discourse-setup process, you will be prompted to enable SSL. If you missed this step, you can manually configure SSL by running the setup again or using Certbot:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your-domain.com

Certbot will automatically configure Nginx to redirect HTTP traffic to HTTPS, securing your forum with SSL.

Conclusion

By following these steps, you have successfully installed and configured Discourse on Ubuntu 20.04 LTS. Whether you're hosting on a Windows VPS UK, Windows VPS Italy, or another Windows Virtual Private Server Hosting, Discourse provides a powerful, modern platform for building an online community.

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)