Discourse is an open-source discussion forum and mailing list management software that allows you to collaborate in a work environment with your team. The software supports many cool features that you see on other social networking sites like quick notifications, endless scrolling, and active discussions. It also keeps a strict criterion for everyone to act civilized while communicating, unlike other apps. You will also see an emergency pane on the software’s interface to communicate in case of work urgency.
There are two ways you can install discourse. It can either be self-hosted or forum hosted.
You install and set up discourse on your own server.
If you don’t want to dive deep into the technicality of hosting it yourself, you can simply purchase services from the forum. They have different pricing packages to host your discourse. You can check it out on their official page.
Connect to your server via its IP address using SSH protocol
Clone the Official Discourse Docker Image into /var/discourse directory
Go to /var/discourse and launch the setup tool with the command below.
The setup will begin shortly and will take about 5 to 10 minutes to complete.
Edit the discourse config file app.yml to change the default configuration settings.
Go to the /var/discourse/containers directory and edit app.yml file with nano command.
Locate the port mapping lines. This is how it will appear in the file:
Here, we are mapping http port 80 of discourse container to our machine’s port 80.
Similarly, we will expose https port 443 of the container to the https port 443 of our machine.
In the file, scroll down further and locate the lines shown in the image below.
Enter your discourse hostname and rest of the data asked. Make sure to provide the right information.
To update the configuration file, use the command below. It will rebuild the discourse app, this time with the new settings we provided in the previous step.
Before running the app on your browser, do one last step. Go to /etc directory and edit the hosts file. Make a new entry of your discourse name against the machine’s IP address as shown below.
Now go to your browser and run the domain name you provided in the configuration file like this:
The browser will direct you to the discourse set up page. If you see it, congratulations, you installed Discourse!
This page will confirm that you have successfully installed the software on your server.
Now that we have seen how to install discourse on a ubuntu server, let’s also have a look at how to uninstall it.
To uninstall discourse, you will have to completely wipe out the docker container in which discourse is installed.
First step is to stop the running discourse container.
The following command will give you a list of all the containers that are up and running.
In our case, only one container is running which is a discourse container. To stop it, run the following command:
Docker stop CONTAINER ID
Copy the container ID and place it in the command and run. This will stop the container
Now that the container has stopped, we can easily remove it with the help of the following command:
Docker container rm CONTAINER ID
The command will look like this:
After this, discourse from your system will be successfully uninstalled.
In this guide, we saw what are the pre-requisites required to install discourse software. Then, we looked at how to install discourse on the ubuntu server, step by step. After installation, we also got to know how to uninstall the software from our system in just two easy steps.
For more information on discourse installation, visit: https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#3-install-discourse
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.
Photo by Jeton Bajrami on Unsplash Date: December 4-5th, 2024 Location: Geneva, Switzerland In just…
Who will win the race to the perfect SDV? The automotive industry is experiencing a…
Software developers spend a huge amount of effort working on optimization – extracting more speed…
Welcome to the Ubuntu Weekly Newsletter, Issue 866 for the week of November 10 –…
Debian and Ubuntu are two popular Linux distributions. In this deep dive we will guide…
In this article, we will see how to Install Google Cloud BigQuery Python client library…