Discourse Forum Setup

From Traxel Wiki
Jump to navigation Jump to search
  1. Pick domain for trial (probably bobbushman.com)
    1. Correction - using experiencemaking.com since email is already set up
  2. Setup email for domain
    1. AWS Mail
      • Cheating - Experiencemaking.com is already set up. :D
    2. DNS registry setup
      • Cheating - Experiencemaking.com is already set up. :D
    3. Admin account for Let's Encrypt cert
      • created forum.admin@experiencemaking.com
  3. Create Lightsail node
    • Created a $5 node.
    • Assigned static IP: 44.238.32.225
    • opened port 443 (HTTPS) through firewall
  4. DNS registry for forum.experiencemaking.com
    • done
    • Login successful. It's alive!
  5. Apt Update
    • sudo apt update
    • sudo apt dist-upgrade -y
    • sudo reboot # if needed
  6. Install Extras
    • sudo apt install git
    • sudo apt install netcat
  7. Install Discourse
    1. https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
    2. $ sudo -s
    3. $ git clone https://github.com/discourse/discourse_docker.git /var/discourse
    4. $ cd /var/discourse
    5. Going to take a stab at doing this without SPF. I've already got DKIM, and Amazon SES does ses.amazon.com SPF. We'll see. Easy enough to try again.
    6. $ ./discourse-setup
      1. Hostname  : forum.experiencemaking.com
      2. Email  : forum.admin@experiencemaking.com
      3. SMTP address  : smtp.mail.us-west-2.awsapps.com
      4. SMTP port  : 465
      5. SMTP username : discourse.admin@experiencemaking.com
      6. SMTP password : password1.no.really.I.used.password1.haha.entertainment
      7. Let's Encrypt : forum.admin@experiencemaking.com
  8. Register Admin Account
    1. Twice as entertaining
  9. Troubles with email
    1. Tried SES and Workmail endpoints, STARTTLS and SSL/TLS, 587 and 465, bob and discourse.admin, telnet confirmed connectivity, sent email using Thunderbird. No dice with Discourse.
    2. I think the next step is to set up a local SMTP server that forwards to Workmail
      1. https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html#send-email-postfix
    3. https://meta.discourse.org/t/net-readtimeout-when-sending-email-after-install/56856
    4. https://meta.discourse.org/t/not-able-to-send-email-net-readtimeout/98419/15
  10. Considering DigitalOcean
    1. Some people with the same email problem mentioned that everything "just works" on DigitalOcean, so I went and took a look.
    2. Pricing seems reasonable, not significantly higher than AWS Lightsail.
    3. Looked for their solutions to email. They have two:
      1. Quick and easy integration with GMail SMTP. Maybe they also have a free testicle punching service but I wont be using that either.
      2. Install your own SMTP server. OK, so that whole "everything just works on DigitalOcean" thing is less of a solution than I thought.
        1. However, they do have a tutorial on installing SMTP on Debian 10, so that will help me move forward on Ligtsail:
        2. https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-debian-10
        3. Side note: I hate setting up SMTP servers. But it's been a few years since the last time, maybe it's easier now.
  11. ------------------
  12. Set ports (at some point)
  13. Install Docker

Appendix: AWS SMTP Test Settings

Email Send form Command Line

$ ./launcher enter app 
$ curl --url 'smtps://smtp.mail.us-west-2.awsapps.com:465' --ssl-reqd \
   --mail-from 'foo@bar.com' --mail-rcpt 'foo@traxel.com' \
   --upload-file mail1.txt --user 'login:pass'

One

DISCOURSE_SMTP_ADDRESS: email-smtp.us-west-2.amazonaws.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: bob@experiencemaking.com
DISCOURSE_SMTP_PASSWORD: "Password"
DISCOURSE_SMTP_AUTHENTICATION: "login"
DISCOURSE_SMTP_ENABLE_START_TLS: true
DISCOURSE_HOSTNAME=forum.experiencemaking.com
SMTP_ADDRESS=email-smtp.us-west-2.amazonaws.com
DEVELOPER_EMAILS=bob@experiencemaking.com
SMTP_PASSWORD=Password
SMTP_PORT=587
SMTP_USER_NAME=bob@experiencemaking.com
LETSENCRYPT_ACCOUNT_EMAIL=forum.admin@experiencemaking.com
Sending mail to bob@traxel.com. . . 
Testing sending to bob@traxel.com using email-smtp.us-west-2.amazonaws.com:587.
SMTP server connection successful.
Sending to bob@traxel.com. . . 
Sending mail failed.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

Two