Skip to content

Discourse App

About

Discourse is a platform for community discussion. Free, open, simple.

Installing plugins

To install a plugin, open a Web terminal and run the following commands:

cd /app/code/plugins
git clone <plugin-repo>
chown -R cloudron:cloudron <plugin-dir>
cd /app/code
gosu cloudron:cloudron bundle exec rake plugin:install_all_gems
gosu cloudron:cloudron bundle exec rake db:migrate
gosu cloudron:cloudron bundle exec rake assets:precompile

Restart the application to double check everything works.

If the plugin modifies the posts in some way, you might want to rebake posts.

Install with care

Use caution when installing plugins since they might break your installation. The list of official plugins can be found here.

Changing root account email

The email of the root account is root@cloudron.local. Discourse sends an activation email to the old email address to switch email. Since we don't have access to the default email account, we have to use the rails console to switch the email.

Open a Web terminal and run the following commands:

# cd /app/code
# gosu cloudron:cloudron bundle exec script/rails console
irb(main):001:0> u = User.find_by_username("root")
irb(main):002:0> u.email = "YOUR_NEW_EMAIL_ADDRESS"
irb(main):004:0> u.save!

Changing domain

When changing the domain of an existing discourse installation, Cloudron automatically rebuilds the assets. However, the posts in the forum are not re-written. To rebake the posts, open a Web terminal and run the following command:

# cd /app/code
# gosu cloudron:cloudron bundle exec ruby script/discourse remap old.domain.com new.domain.com

Rebaking posts

To rebuild all posts (for example, to apply formatting provided by a newly installed plugin to old posts), open a Web terminal and run the following command:

# cd /app/code
# gosu cloudron:cloudron bundle exec rake posts:rebake

Incoming email setup

  • set up a mail inbox for your discourse app E.g. forum@YourMailDomain.TLD
  • enable pop3 for that mailbox
  • set the app as the owner of this mailbox
  • Set both the Mail FROM Address and Incoming mail to the same mailbox.

Use same mailbox

Discourse does not support having different mail from and incoming mail address

In Discourse, you'll need to enable email in in the administration settings.

Topic creation with unique category inbox name

To enable creation of new topics via email, go to the settings page of a category and set a custom incoming email address.

If you want unique addresses for categories you need to setup aliases for forum@YourMailDomain.TLD. Say there is a category named offtopic then your alias should be something like forum@YourMailDomain.TLD.