I'm writing a short documentation for admins of Discourse forums I've helped set up. Do I miss something in it?

I’ve set up Discourse forums for several friends/associations. I’d like them to be more autonomous when administering, so I’ll be less likely to intervene myself.

They have been using Discourse as users and co-admins for months or years. They are not “new admins”, but they lack in-depth knowledge on how to maintain Discourse on a daily basis (outside moderation basics) and what should be known, as an admin, and in case of technical troubles, because I was always here to take care of such things.

I’ll still be available in the future, but the goal is to allow them track and address the most common issues by themselves.

Here’s what I wrote so far (IA-translated to English because my text will be written in French, so don’t pay attention if some sentences are weirdly written):


Updates

Via the web interface

Run updates when there is an unhappy red smiley in the admin panel (it means there is an important update to apply).
Updates are done via:
https://tonforum.fr/admin/upgrade

They are sometimes done in two steps: you must first update “Docker_Manager” before you can upgrade the rest:

Via the command line

Sometimes, an update must be done via the command line (the Discourse admin page will explicitly say so if needed).

  1. Connect to the server via SSH
  2. Rebuild the forum (a rebuild always updates Discourse) using the following command:
  3. /var/discourse/launcher rebuild app
    
  4. From time to time, once you have confirmed that the forum is working correctly, it can be useful to remove unused Docker images (leftovers from previous upgrades) to free up disk space:
    /var/discourse/launcher cleanup
    

Location of important files on the server

app.yml

Contains the server configuration and the list of installed plugins. Very useful if you need to migrate the forum to another server or apply certain configurations (for example, moving uploads and backups to another disk). It is located here:

/var/discourse/containers/app.yml

mail-receiver.yml

Contains the configuration for the software that allows receiving replies by email and publishing them on the forum. It is located here:

/var/discourse/containers/mail-receiver.yml

Backups

Backup files are stored here:

/var/discourse/shared/standalone/backups/default

Important pages in the forum admin

Some pages that can be useful :robot:

Themes and components

They include custom CSS and HTML:

https://tonforum.fr/admin/config/customize/themes

Logs

Email

Useful for debugging:

https://tonforum.fr/admin/email-logs

Staff actions

Very useful. It keeps a record of (almost) all site setting changes and other actions performed by moderators and admins.

https://tonforum.fr/admin/logs/staff_action_logs

Error logs

Can provide clues when a problem is not obvious:

https://tonforum.fr/logs/

Backups

To change the backup frequency and maximum number of backups, view them, or download them:

https://tonforum.fr/admin/backups

Resources

https://meta.discourse.org
Official support. Do not hesitate to post there; community members and developers are usually very helpful.


Do you see some things that could be added/removed? I think I can remove the /logs/ part, as it is very, very rarely useful. I’m not even sure I found useful information in it in many years of administering a few instances.

10 Likes

A couple of things I’d want to make clear.

One is, at the point of trying an update by web interface, be aware that the update may fail, and your forum may be down. Be prepared.

Another is, if your host becomes inaccessible or corrupted, you will need the backup files and the yml files. You will need to have them already somewhere safe on a separate system.

To combine the two: always take a backup, and download the backup, before trying an update.

3 Likes

Hi Ed very valid points. A member awhile back did create a script for backing up to another system as I recall. Will need to do a search and check

Here is quite if the Op post. Canapin has a good reply with a link to backing up to Google drive)Dropbox as well

@Canapin with the launcher rebuild app, doesn’t it need to be ran as

./launcher r build app

This is just how U have been used to running it from other doc’s here in the site. As I have learned though there is often many ways to di things. Lol

Nice write up handy

1 Like

But since you would cd /var/discourse before that, ./ would just refer to that directory, so launcher’s path is essentially /var/discourse/launcher, no?

I wasn’t aware if that. I have just been using it as per other tutorials on discourse. But makes sense. Thank you

I wonder if it’s worth adding some escalation tips? If the person reading the document doesn’t know how to ssh into the host, to investigate or fix, who can? Perhaps a tip about asking questions here on meta, perhaps also a tip about using ask.

4 Likes

That’s good to know. I only knew about downloading the backup created by the forum itself.

1 Like

Thank you for your help!

I’ve added this at the beginning of my guide:

Make sure you’re prepared for any situation

It is strongly recommended, in addition to local backups (saved on the same server as the forum), to have a copy of these backups on another server or in the cloud[1].

It is also useful to keep a copy of the file /var/discourse/containers/app.yml in a secure place[2]. This optional file is used in case of a forum reinstallation or a migration to another server.

If there is any serious doubt about anything, contact me (canapin@gmail.com).

Added this in the update section:

:information_source: Before doing an update, it is strongly recommended to download the latest backup of your forum.

Added this:

What to do if the forum no longer works?

Rebuilding the forum fixes many problems and is done with the same command as a command-line update:

/var/discourse/launcher rebuild app

What if the forum still doesn’t work after a rebuild?

Ask me (canapin@gmail.com) or post on the official support forum.

I also mentioned ask.discourse.org at the end of the guide.

Resources

https://meta.discourse.org : official support, don’t hesitate to post there — community members and devs are very helpful
https://ask.discourse.com : a chatbot trained on Discourse support and data, surprisingly effective for answering questions (yes, really)

Full text

Make sure you’re prepared for any situation

It is strongly recommended, in addition to local backups (saved on the same server as the forum), to have a copy of these backups on another server or in the cloud[1:1].

It is also useful to keep a copy of the file /var/discourse/containers/app.yml in a secure place[2:1]. This optional file is used in case of a forum reinstallation or a migration to another server.

If there is any serious doubt about anything, contact me (canapin@gmail.com).

Updates

:information_source: Before doing an update, it is strongly recommended to download the latest backup of your forum.

Via the interface

Do updates when there is an unhappy red smiley in the admin (it means there is an important update to do).
Updates are done via https://yourforum.com/admin/upgrade

They are sometimes done in two steps: you first need to update “Docker_Manager” before being able to upgrade the rest:

Via the command line

Sometimes, an update must be done via the command line (the Discourse admin page will say so if needed).

  1. Connect to the server via SSH
  2. Rebuild the forum (a rebuild always updates Discourse) using the following command:
  3. /var/discourse/launcher rebuild app
    
  4. From time to time, after making sure the forum works correctly, it can be useful to remove unused Docker images (leftovers from previous upgrades) to free disk space:
    /var/discourse/launcher cleanup
    

What to do if the forum no longer works?

Rebuilding the forum fixes many problems and is done with the same command as a command-line update:

/var/discourse/launcher rebuild app

I think it’s quite good now and that I don’t miss anything important :slight_smile:


  1. If I installed your forum, your backups are automatically copied to my Google Drive, but ideally in the future they should be saved on a space you are responsible for. We’ll talk about it one day :smile: ↩︎ ↩︎

  2. It contains the mail server username and password as well as the top-level administrator email (mine, actually). ↩︎ ↩︎

3 Likes

If this works then it would be a better (simpler) recommendation than the usual two-line version (which used to be three, so we can continue the trend).

Both work.

If you are in the directory ./ Is required because launcher location is not in path.

Linux requires that if a command is not in path you give it’s full path so there can be no mistake which file you meant.

3 Likes

Yes but often you might be doing multiple things e.g. a cleanup first. In which case cd-ing first might end up more brief.

3 Likes

I agree and I have bookmarked the topic for future use, thanks

Oh well, here’s the full automatically translated guide then:

Making sure you’re prepared for any eventuality

It is strongly recommended, in addition to local backups (stored on the same server as the forum), to have a copy of those backups on another server or in the cloud[1].

It is also useful to keep a copy of the file /var/discourse/containers/app.yml in a secure location[2]. This optional file is useful in case of a forum reinstallation or migration to another server.

If you have any serious doubts about anything, contact me.

Updates

:information_source: Before doing an update, it is strongly recommended to download the latest backup of your forum.

Via the interface

Do updates when there is an unhappy red smiley in the admin (it means there is an important update to do).
Updates are done via https://tonforum.fr/admin/upgrade

They sometimes happen in two steps: you first need to update “Docker_Manager” before being able to upgrade the rest:

Via the command line

Sometimes an update has to be done via the command line (the Discourse admin page will say so if it’s necessary).

  1. Connect to the server via SSH
  2. Rebuild the forum (a rebuild always updates Discourse) using the following command:
  3. /var/discourse/launcher rebuild app
    
  4. From time to time, after making sure the forum works correctly, it can be useful to remove unused Docker images (leftovers from previous upgrades) to free up disk space:
    /var/discourse/launcher cleanup
    

What to do if the forum no longer works?

Rebuilding the forum fixes many problems and is done with the same command as an update via the command line:

/var/discourse/launcher rebuild app

What if the forum still doesn’t work after a rebuild?

Ask me or post on the official support forum.

Location of important files on the server

app.yml

It contains the server configuration and the list of installed plugins. Very useful if the forum needs to be moved to another server, or for certain configurations (moving uploads and backups to another disk, for example). It is located here:

/var/discourse/containers/app.yml

mail-receiver.yml

It contains the configuration of the software that allows replies by email to be received and published on the forum. It is located here:

/var/discourse/containers/mail-receiver.yml

Backups

Backup files are located here:

/var/discourse/shared/standalone/backups/default

Important pages in the forum admin:

Pages that can be useful :technologist:

Themes and components

They contain, among other things, custom CSS and HTML:

https://tonforum.fr/admin/config/customize/themes

Logs

Email

Useful for debugging:

https://tonforum.fr/admin/email-logs

Staff actions

Very useful. It keeps a record of (almost) all site setting changes and other moderator and admin actions.

https://tonforum.fr/admin/logs/staff_action_logs

Error logs

Can give clues when there is a problem whose cause isn’t obvious.

https://tonforum.fr/logs/

Backups

To change backup frequency and maximum number, view them, or download them:

https://tonforum.fr/admin/backups

Resources

https://meta.discourse.org : official support, don’t hesitate to post there, members and devs are happy to help
https://ask.discourse.com : a chatbot trained on Discourse support and data, surprisingly effective at answering questions (yes, really)


  1. If I installed your forum, your backups are automatically copied to my Google Drive, but ideally in the future they should be saved to a space you are responsible for. We’ll talk about it someday :smile: ↩︎

  2. It contains the identifier and password for the mail server, as well as the administrator email (mine, actually). ↩︎

3 Likes