Setup a Discourse Forum / Email in 15min

Dr.Who

Enthusiast
Joined
Mar 25, 2015
Messages
186
Setup a Discourse Forum / Email in 15min

I didn't time it exactly (probably should have done that! ;) ), but this is just a simple and fast way to setup a Discourse forum. :)

This tutorial is designed for people who don't know much, but it does assume a few things:
  • You know some basic computer stuff
  • You know how to sign up for services like DigitalOcean / Mailgun
  • You're using DigitalOcean to control your DNS (basically what I mean is, your domain "www.example.com" you may have got through GoDaddy we will point to DigitalOcean to control. I'll show you how.
Steps:
Step 1: Setup Droplet
Step 2: Setup DNS
Step 3: Setup Email
Step 4: Setup Discourse


Step 1 // Setup Droplet
1)
Sign up to DigitalOcean: https://www.digitalocean.com/

2) Load some money onto the site, or connect your credit card, don't worry you're not signing your life away, just chuck $20 onto the site.

3) Click Create Droplet
1.jpg
4) Click One-click apps --> Discourse (my defaults are listed below) and click Create
2.jpg

5)
Once you hit Create, it'll take a moment for it to create the droplet. You will get an email in a minute, forget it. Don't look at that email just yet!! We will revisit it in a moment. :)

Step 2 // Setup DNS
Since DigitalOcean doesn't host domains, I'll assume you have your domain somewhere else (i.e. GoDaddy). I have my domain at MDDHosting. All we are doing here is telling our host that DigitalOcean is gonna be controlling everything. :)

1) Login to your host, find the settings for your domain and point nameservers to DigitalOcean.
3.jpg

2) Log back into DigitalOcean and click beside your Droplet --> More --> Add a Domain
4.jpg

3)
Add the domain name beside your Droplet and hit Create Record
5.jpg

Step 3 // Setup Email
1) Head over to MailGun: www.mailgun.com and create a free account.

2) Click Domains --> Add New Domain
6.jpg

3) Fill in the appropriate info and click Add Domain.
7.jpg

4) You'll now be looking at all the info DigitalOcean needs, so lets go tell them that info!! :) Login to DigitalOcean and go to Networking --> Domains --> More (beside the domain name) --> View Domain.

5) Keeping MailGun & DigitalOcean open, start to copy that info over, BUT, we do need to change some info. When entering domains into DigitalOcean, ALL domains must end with a period AND DigitalOcean will automatically change the entry for you to what you see below:
8.jpg

6) Go back to MailGun and click verify and it now set your domain to "Active".

Step 4 // Setup Discourse Forum
1) Remember that email I told you to forget? Go find it. :) In your email you used to signup to DigitalOcean is your Droplet info!! Write your password down for root.

2) Log into DigitalOcean, go to your Droplet --> More --> Access Console
9.jpg

3) Open console and type "root", now type your password that they gave you in the email. The console will ask you to change your email, change it.
10.jpg

4) Discourse is now going to ask you for:

  1. Admin email (enter what you will use)
  2. Domain name (example.com OR WWW.example.com depending on what you used for Digital Ocean / MailGun)
  3. SMTP Server: smtp.mailgun.org (Find info at Mailgun)
  4. SMTP Port: 587
  5. SMTP Username: postmaster@www.example.com (Find info at Mailgun)
  6. SMTP Password: (Find info at Mailgun)
5) WAIT, as Discouse will now be configured!!!

6) Create Admin account:
Type:

  1. cd /var/discourse
  2. ./launcher enter app
  3. rake admin:create
You will be asked for Email, Password, Confirm Password, and to Grant Admin Privileges.

7) Head over to your domain and check it out!!! Log in and be happy... that we're almost done. ;)

8)
Go to your ACP:
upload_2016-10-22_15-8-17.png

9)
Click on Emails --> Now enter a test email to make sure everything works!!:
upload_2016-10-22_15-9-28.png

DONE!!

Hope you enjoyed the tutorial. Please note: Discourse tends to be finicky with the small details. If something isn't working, there's a chance you overlooked something very small. So please pay attention to all the details in the tutorial. Also, if I missed anything, post it below. :)
 
Last edited:

pierce

Habitué
Joined
Apr 10, 2016
Messages
1,165
This is awesome.

I do think that discourse could gain a bigger following if rolling out wasn't so complex, with droplets, containers and everthing in between!
 

Dr.Who

Enthusiast
Joined
Mar 25, 2015
Messages
186
This is awesome.

I do think that discourse could gain a bigger following if rolling out wasn't so complex, with droplets, containers and everthing in between!
It's not that's it's hard, it's just so dang finicky and specific. I even triple checked the tutorial to ensure I didn't miss anything.

I'm with ya, all they'd have to do is make it a tad more user friendly and they'd be good to go. :)
 

pierce

Habitué
Joined
Apr 10, 2016
Messages
1,165
If it was more, the logical idea of:

This is where I put my files,

I tell nginx what parser to execute the files.

The files use this database.

I don't know what magic its doing to run its self!
 
Top