Close Menu
  • Home
  • Questions
Facebook X (Twitter) Instagram
LinuxTutorials.netLinuxTutorials.net
  • Home
  • Debian
  • Ubuntu
  • CentOS
    • Commands
  • Questions
LinuxTutorials.netLinuxTutorials.net
Debian

How to Install Discourse on Debian 9-10 and Configuration SMTP

May 12, 2020No Comments

Discourse is the 100% open source discussion platform built for the next decade of the Internet. Use it as a mailing list, discussion forum, long-form chat room, and more!

In this tutorial, we will learn how to install and configure Discourse forum on Debian 9 server and Configuration SMTP with Sendinblue to receive activation email admin.

Create a new VPS

I recommend that you use VPS capacity at least 2GB RAM to avoid some errors during the installation.

Access your VPS as root

Connect to your server using SSH via the Terminal on Mac or Bitvise SSH Client/PuTTY on Windows.

Replace 203.1.113.1 with your server IP.

Setup swap

Create an empty swap file:

install -o root -g root -m 0600 /dev/null /swapfile

Write out a 2GB file named swapfile:

dd if=/dev/zero of=/swapfile bs=1k count=2048k

Tell Linux that this is the swap file:

mkswap /swapfile

Activate it:

swapon /swapfile

Add it to the system table so that it is available after reboot:

echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab

Set the swappiness so that it is only used as an emergency buffer:

sysctl -w vm.swappiness=10

Install Docker CE

Update apt.

apt-get update

Install packages to allow apt to use a repository over HTTPS.

apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y

Add Docker’s official GPG key.

curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -

Verify that key fingerprint is equal to: 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88

apt-key fingerprint 0EBFCD88

Use the following command to set up the stable repository.

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"

Update apt again.

apt-get update

Install Docker.

apt-get install docker-ce -y

Install Git.

apt install git -y

Make a folder called discourse in the /var directory:

mkdir /var/discourse

Clone the official Discourse Git repository in /var/discourse

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

Go into the discourse directory:

cd /var/discourse

Launch the setup tool:

./discourse-setup

Answer the following questions when prompted:

Hostname for your Discourse? [discourse.anydomain.com]: 
Email address for admin account(s)? [[email protected],[email protected]]: 
SMTP server address? [smtp.anydomain.com]: 
SMTP port? [587]: 
SMTP user name? [[email protected]]: 
SMTP password? [pa$$word]: 
Let's Encrypt account email? (ENTER to skip) [[email protected]]:

I use SMTP Service from Sendinblue (You can also choose the SMTP service from other providers)
Create Account Sendinblue, login and go to “SMTP & API” –> “SMTP” tab

This will generate an app.yml configuration file on your behalf, and then kick off bootstrap. If you need to change these settings after bootstrapping, you can run ./discourse-setup again (it will read your old values from the file) or edit containers/app.yml with Nano and then run ./launcher rebuild app for your changes to take effect.

Share. Facebook Twitter Tumblr Email Telegram
Previous ArticleHow to Assign IP Addresses On-Fly on Debian Based Linux Distributions
Next Article Install Ubuntu server 20.04 on VMware Workstation 16 Pro

Related Posts

Debian

How to Assign IP Addresses On-Fly on Debian Based Linux Distributions

May 17, 2019
Debian

Configure Permanent Static IP Address and Alias Interfaces on Debian-based Systems

May 17, 2019
Debian

How to make permanent DNS changes to resolv.conf file on Ubuntu

May 14, 2019
Subscribe
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Ubuntu Server 24.04 Image for VirtualBox (Download & Import)

March 14, 2025

Download and Install Packet Tracer 8.2.2 on Ubuntu (Linux)

May 31, 2024

How to Install PHPMyAdmin latest version 5.2.0 on Ubuntu 22.04 (LEMP Stack)

September 13, 2022

Create New User with sudo Privileges on Ubuntu 22.04/Debian

September 12, 2022
Facebook X (Twitter) Instagram Pinterest
  • Questions
© 2025 LinuxTutorials.net

Type above and press Enter to search. Press Esc to cancel.

wpDiscuz