Enable Badge SQL for Discourse

Discourse’s badge SQL feature can be used to automatically award badges, but this feature is disabled by default. To enable it, run the following commands:

./launcher enter app
rails c
SiteSetting.enable_badge_sql = true

After completing these steps, enter exit twice to exit, then return to the admin badge settings page and you will see the SQL input box.

Hello, I’m a beginner. Could you tell me where I should run this command?

ssh

Thank you for your reply. I purchased the Business plan, so is my server hosted by Discourse? Will I need to go through them in order to execute this command?

What I want to do is create several custom badges, and set individual unlock conditions for each badge. After checking the official documentation, I understand this needs to be done via SQL. Is that correct?

Yes, we should ask them to help open it.

Yes, this can be implemented with custom query conditions.

Setting up groups enables automatic distribution.