Install Discourse on Ubuntu 20.04

Secure the Server

Turn on automatic security updates.

$ sudo dpkg-reconfigure -plow unattended-upgrades

Setup a firewall with ufw.

$ sudo apt-get install ufw
$ sudo ufw default allow outgoing
$ sudo ufw default deny incoming
$ sudo ufw allow 22 comment 'SSH'
$ sudo ufw allow http comment 'HTTP'
$ sudo ufw allow https comment 'HTTPS'
$ sudo ufw enable

Install fail2ban to secure your server

$ sudo apt install fail2ban

Configure fail2ban to Use ufw

Copy the main configuration to avoid unexpected changes during package updates.

$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Edit the configuration file with your favorite text editor

$ sudo nano /etc/fail2ban/jail.local

Change the banaction and banaction_allports settings to ufw in the file /etc/fail2ban/jail.local as follows: Continue reading “Install Discourse on Ubuntu 20.04” »

Share

Reset user password of Discourse

Discourse is an excellent platform- super fast, super organized and super fresh looking. It has quite standarized and additional security options in the application UI. However, found a freat issue of updating any user of this platform as Admin (I was havign difficulties of self user password reset options, as the mail gateway was somewhat not working). 

So here goes the trick-

ssh into your server

cd /var/discourse
./launcher enter app
 rails c 
u = User.find_by_email('email@test.com') 
u.password='zKRR6vTZKvJAB84V9jdgeydS' 
u.save!
ctrl+d to exit
Share

Install Discourse Forum with Nginx on Ubuntu 16.04

Step 1 – Install Docker on Ubuntu 16.04

The Discourse software is written in Ruby and Javascript, using PostgreSQL as the main database, and Redis as a cache and for transient data. We will install Discourse under the Docker container.
 
The installation process will be carried out on Ubuntu 16.04. So to begin with, install Docker using the command below.

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

 

After the installation is complete, check the docker service and make sure it’s already running on the system. Continue reading “Install Discourse Forum with Nginx on Ubuntu 16.04” »

Share