Wondering how to install Discourse on Ubuntu?
Discourse is an open-source software that can be used to develop forum platforms. Its application lies in creating chat rooms, comment threads, mailing lists, online communities, etc. It was developed using Ruby on Rails, and Embers.js, using PostgreSQL for database management.
Discourse has garnered popularity because it has multiple modern features that can be integrated with popular services and the latest technologies. Some of the features include a comprehensive API, social media login, a built-in mobile layout, and dynamic notifications. And when considering security, it also has two-factor authorization and spam-blocking.
The popularity of Discourse is ever-growing, and soon it might become the leading platform in the market. Thus, learning how to use it can be a useful arrow in the quiver of your skillset.
If you are using Ubuntu and are interested in using Discourse, you are at the right place, as we will be looking at how to install Discourse on Ubuntu and describing the steps you need to follow.
So, let’s step right in!
To use Discourse, you need first to install Docker. The reason is that Discourse uses container technology to work. What is a container? A container is a package that includes everything that an application needs to work on a system.
It contains the code, settings, system tools, and libraries that help the application run across multiple platforms.
To install Docker, follow these steps.
- Open the Command Terminal.
- Once opened, the first step is to update the Ubuntu package repositories. Use the following command to do that.
$ sudo apt-get update
- Next, to install the docker package, we need to install tools such as ca-certificates. Use the following command for this.
$ sudo apt-get install apt-transport-https ca-certificates git curl gnupg -y
- In this step, add the GPG key and the Docker repository to your system. To add the key, you need to create a separate directory and add the key over there. Use the following command.
$ sudo mkdir -p /etc/apt/<directory name>
And now, add the key,
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/<directory name>/docker.gpg
You can choose to name the directory as you please. Just make sure you use the same directory while adding the key.
To add the repository, use the following command.
$ echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Now, install Docker using the following command.
$ sudo apt-get install docker-ce docker-ce-cli containerd.io -y
After installing docker, you can finally move on to installing Discourse. Follow these steps to install Discourse.
- Open the Command Terminal.
- Again, before installing Discourse, you need to create a separate directory where you will clone its github repository.
$ sudo mkdir /var/<directory name>
- Next, clone the github repository to the directory you just created.
$ sudo git clone https://github.com/discourse/discourse_docker.git /var/<directory name>
- After cloning the github repository, the next step is to run the repository. Before doing that, go to the directory where you did the cloning.
$ cd var/<directory name>
$ sudo ./discourse-setup
On running this command, the setup file will run and ask you for some information, such as the name of the web server for your Discourse application, the password for the domain address, the port the SMTP server is supposed to access, and the username of the domain address.
- Enter the information and save it somewhere else because you will need it later.
- After mentioning the port the SMTP server will use for the Discourse application, you must ensure that your system allows HTTP and HTTPS communication and traffic. You can use the following command to enable them.
$ sudo apt install ufw
- “Ufw” is a package that allows the user to configure the system ports and other network settings.
$ sudo ufw enable $ sudo ufw allow http $ sudo ufw allow https
These were all the steps on how to install Discourse on Ubuntu.
Accessing the Discourse Platform.
You can access the Discourse platform by using the domain address entered while installing the application. Open a web browser of your choice and then enter the domain address in the URL section of the web browser. It should take you to the Discourse registration page.
Register for Discourse by filling in the relevant information you need to provide. After registering yourself, you are good to go for using Discourse.
Moving away from Discourse and Docker, let’s talk about websites you frequently use for their up-to-date articles and blogs. You find them entertaining and suiting your interests. What if you could view and read those articles and blogs right on the Linux command terminal?
Sounds interesting, doesn’t it? Some applications known as feed readers are used to accomplish the same task mentioned above. One such application is the Newsboat RSS Feed Reader. It is one of the most popular feed readers available today.
If you want a feed reader application for your blogs and articles, then go to this feed reader link. It will take you to a guide that provides relevant information regarding Newsboat, the steps you need to follow to install it, and the configurations you need to use it properly.
This was an article on how to install Discourse on Ubuntu. We looked at the steps you need to follow to install the application. We also discussed some features of Discourse, described its usage, and looked at Docker and the container technology. This guide hopefully helped you out, and we hope that you are having fun using Discourse.
If this guide helped you, please share it. 🙂