Home Serverdiscourse How to Install discourse ?

How to Install discourse ?

by admin
0 comment 151 views

You want to install discourse on your VPS server, then you are at right place. Here are the minimum requirements for running discourse server :

  • The default of Ubuntu 16.04 LTS x64 works fine. At the minimum, a 64-bit Linux OS with a kernel version of 3.10+ is required.
  • The default of 1 GB RAM works fine for small Discourse communities. We recommend 2 GB RAM for larger communities.
  • The default of New York is a good choice for most US and European audiences. Or select a region that is geographically closer to your audience.
  • Enter your domain discourse.example.com as the name.
  • 10 GB disk space minimum

What are the minimum browser requirements?

Discourse is designed for the next 10 years of the Internet, so the minimum browser requirements are high:

  • Internet Explorer 11+
  • Google Chrome 32+
  • Firefox 27+
  • Safari 6.1+


Here we have steps to follow during installation :

Discourse Install alongside apache server

>>> Update os

sudo apt-get update 

sudo apt-get upgrade

>>>> Update SSL rules

sudo ufw app list

sudo ufw allow OpenSSH

sudo ufw enable

sudo ufw status

>>>>>Rename Host :

hostnamectl set-hostname example_hostname


>>>> Confirm hostname

sudo nano /etc/hosts


>>>>> TimeZone Settings

dpkg-reconfigure tzdata

>>>>>Install Docker first :

wget -qO- https://get.docker.com/ | sh

sudo apt-get update

sudo apt-get install -y docker-ce

sudo systemctl status docker


>>>> Install Discourse :

sudo -s

mkdir /var/discourse

apt install git

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

cd /var/discourse


Note: If you need to change or fix these settings after bootstrapping, edit your /containers/app.yml file and run ./launcher rebuild app. Otherwise, your changes will not take effect.

Rember to skip letsencrypt email

Check discourse should run on applicable domain where we need to run.


Configuring PORT for apache or ngix

cd /var/discourse

sudo nano containers/app.yml

Change port


  - "25654:80"   # fwd host port 80   to container port 80 (http)

sudo ./launcher rebuild app

sudo ./launcher stop app 

>>> Installing apache

sudo apt-get install apache2


>> Configuring host


Proxy rewrite rules configuring:

a2enmod proxy proxy_http rewrite

Disable default config file:

sudo a2dissite *default


If we need to install website in subdomain it takes 1 to 2 hr waiting time to DNS reconfigure with server

Check in Ubuntu server about the subdomain in configured.

Ping example.com


Adding configuration file of website:

sudo nano /etc/apache2/sites-available/discuss.domain.com.conf

Paste These setting for port 80 for redirecting to our new port 25654.

Virtual Port settings

<VirtualHost *:80>

     ProxyPreserveHost On

     ProxyRequests Off

     ServerName  discuss.domain.com

     ServerAlias www.discuss.domain.com

     ProxyPass / http://discuss.domain.com:25654/

     ProxyPassReverse / http://discuss.domain.com:25654/



>>> Enable website

sudo a2ensite discuss.domain.com.conf

Restart apache:

service apache2 reload

>>>>Finally rebuild discourse:

sudo ./launcher rebuild app


>>>Some Important settings

Visit this link :



>>>Installing more sites

cd /var/www/html


>>>Create website folder

sudo mkdir domain.com

>>>create subfolders

sudo mkdir -p domain.com/public_html

sudo mkdir -p domain.com/log

sudo mkdir -p domain.com/backups

>>>>Move to

sudo nano /etc/apache2/sites-available/domain.com.conf


>>>>Virtual Host settings


# domain: domain.com
# public: /var/www/html/domain.com/public_html/
<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin [email protected]
  ServerName  domain.com
  ServerAlias www.domain.com
  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /var/www/html/domain.com/public_html
  # Log file locations
  LogLevel warn
  ErrorLog  /var/www/html/domain.com/log/error.log
  CustomLog /var/www/html/domain.com/log/access.log combined

>>>>Add site to enable mode

sudo a2ensite domain.com.conf

>>>Restart apache

service apache2 reload


>> Adding User manually in discourse

./launcher enter app

rake admin:create




Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy