How To Install A Plugin On Discourse Forum? [GUIDE]

First, it’s not as easy as installing a WordPress plugin, even I thought the same, but alas. To install a plugin on Discourse forum, you need SSH (Secure Shell) access + you need to enter some commands. Earlier we shared a tutorial on how to install Discourse forum on DigitalOcean web hosting and now, we’ll about talk about installing plugins there.

First, you should have a Discourse forum, obviously. Second, you need SSH access, if you are a Linux or OS X user, then Terminal should be fine. If you are a Windows user, then Putty is perfect.

Steps To Install A Plugin On Discourse Forum

I’m going to perform the steps on our demo (and upcoming) forum, which is hosted on DigitalOcean server and I’m going to use Ubuntu’s terminal for SSH. Now follow these commands one by one:

Step 1: Log in as a ‘root’ user and enter your password. (or) Skip this if you have SSH Keys enabled.

ssh root@your.server.ip.address.

Terminal SSH Root IP Address

Step 2: Go to ‘Discourse’ directory.

cd /var/discourse

Terminal SSH Discourse Directory

Step 3: Edit/Open the ‘app.yml’ file using nano.

nano containers/app.yml

Terminal SSH Discourse Nano Edit App YML File

Step 4: Now we have to edit this file and add the code for the plugin. We are going to install Discourse’s official Spoiler Alert plugin, for explaining the procedure.

In the code below, “- git clone” line is for the original plugin git code. Copy/paste (or type if you prfer) the entire code below and press Ctrl + O for overwriting. Then press Enter for saving and again press Ctrl + X for exiting. That’s it. We are almost done.

– exec:
cd: $home/plugins
– mkdir -p plugins
– git clone
– git clone

Install A Plugin On Discourse Via Terminal SSH

Here we have mentioned the plugin’s GitHub (or Bitbucket) git clone URL for the installation. We are adding this repository URL to your container’s app.yml file.

If you want to install multiple plugins at the same time, you can do the same with the git clone URL of respective plugins.

Step 5: Now we are going to rebuild/relaunch the app, type the following command and press Enter.

./launcher rebuild app

Discourse Rebuild Relaunch App

Of course, if you are familiar with the Discourse installation, then you should be knowing that this will take some minutes to rebuild, so wait for some time and it’ll be back to the default screen soon. Your forum *might* be down for a while because of this installation time, but not for long, just a few seconds maybe.

That’s all we have to do. Now the Discourse plugin (Spoiler Alert) is successfully installed on your instance. Go to your Discourse forum settings and you can make the required changes there.


Sign Up For DigitalOcean (Recommended by Discourse) And Get $10 Free Credit

Hope you now understood the procedure for installing plugin(s) on Discourse forum using SSH, do let us know in the comments below if you have any issues or if you have any suggestions.