Discourse
Section titled “ Discourse”Discourse is a platform for community discussion. Free, open, simple.
- Questions? Ask in the Cloudron Forum - Discourse
- Discourse Website
- Discourse forum
Installing plugins
Section titled “Installing plugins”To install a plugin, open a Web terminal and run the following commands:
cd /app/data/pluginsgit clone <plugin-repo>chown -R cloudron:cloudron <plugin-dir>Restart the application to complete plugin installation.
If the plugin modifies the posts in some way, you might want to rebake posts.
Uninstalling plugins
Section titled “Uninstalling plugins”Uninstall a plugin by removing the plugin directory and restarting the app:
cd /app/data/pluginsrm -rf $PLUGIN_DIR_NAMEChanging root account email
Section titled “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. Use the rails console to switch the email.
Open a Web terminal and run the following commands:
cd /app/codegosu cloudron:cloudron bundle exec script/rails console# The following lines start with "discourse(prod)>" that indicates the rails console is activeu = User.find_by_username("root")u.email = "YOUR_NEW_EMAIL_ADDRESS"u.save!exitChanging root account password
Section titled “Changing root account password”To change the password of the root account, open a Web terminal and run the following commands:
cd /app/codegosu cloudron:cloudron bundle exec script/rails console# The following lines start with "discourse(prod)>"" that indicates the rails console is activeu = User.find_by_username("root")u.password = "YOUR_NEW_PASSWORD"u.save!exitChanging domain
Section titled “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/codegosu cloudron:cloudron bundle exec ruby script/discourse remap old.domain.com new.domain.comRebaking posts
Section titled “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/codegosu cloudron:cloudron bundle exec rake posts:rebakeImporting settings
Section titled “Importing settings”Discourse allows importing settings from a file. This provides faster configuration of plugins or discourse itself.
For example, after installing the plugin translator, import a working configuration:
Example config file content for importing:
translator_enabled: truetranslator_provider: LibreTranslatetranslator_libretranslate_endpoint: https://com.libretranslate.cloudronapp.cloudron.exampletranslator_libretranslate_api_key: e356cb19-3f06-4120-af2f-fa86df56f278max_translations_per_minute: 30Upload this file to the Discourse app with the Web Terminal.
Import this file. Discourse reads its database and Redis settings from DISCOURSE_* environment variables, which the Web Terminal does not set, so export them first:
export DISCOURSE_DB_HOST=$CLOUDRON_POSTGRESQL_HOST DISCOURSE_DB_PORT=$CLOUDRON_POSTGRESQL_PORT DISCOURSE_DB_NAME=$CLOUDRON_POSTGRESQL_DATABASE DISCOURSE_DB_USERNAME=$CLOUDRON_POSTGRESQL_USERNAME DISCOURSE_DB_PASSWORD=$CLOUDRON_POSTGRESQL_PASSWORDexport DISCOURSE_REDIS_HOST=$CLOUDRON_REDIS_HOST DISCOURSE_REDIS_PORT=$CLOUDRON_REDIS_PORT DISCOURSE_REDIS_PASSWORD=$CLOUDRON_REDIS_PASSWORDexport DISCOURSE_HOSTNAME=$CLOUDRON_APP_DOMAINcd /app/codegosu cloudron:cloudron bundle exec rake site_settings:import </tmp/settings.ymlThis will import the given settings directly into the discourse database.
Restart the app.
After the restart, you should see the configuration applied in the admin view for all site settings.
Incoming email setup
Section titled “Incoming email setup”-
set up a mail inbox for your discourse app E.g.
forum@cloudron.example -
enable pop3 for that mailbox
-
set the app as the owner of this mailbox

-
Set both the
Mail FROM AddressandIncoming mailto the same mailbox.
In Discourse, you’ll need to enable email in in the administration settings.
Topic creation with unique category inbox name
Section titled “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.
For unique addresses per category, setup mail aliases for forum@YourMailDomain.TLD.
For a category named offtopic, create a mail alias like forum@YourMailDomain.TLD.
Create a wildcard mail alias * to choose any category name freely.
