--- title: Discourse description: Install the CaptchaLa Discourse plugin to protect signup, login, forgot password, invite acceptance and email-code login. --- # Discourse Official CaptchaLa plugin for Discourse. It adds CAPTCHA verification to the signup, login, forgot password and invite forms, and to email-code login, each with its own switch. Every challenge is backed by a **server-issued, single-use token**, and each request is checked on your server before Discourse handles it. ## What it covers | Form | Action | Setting | | --- | --- | --- | | Signup | `register` | `captchala_protect_signup` | | Login | `login` | `captchala_protect_login` | | Forgot password | `lost_password` | `captchala_protect_password_reset` | | Invite acceptance | `register` | `captchala_protect_invite` | | Email-code login and signup | `login`, or `register` for signup and invites | `captchala_protect_login_code` | All five are on by default. When the visitor submits a protected form, the CaptchaLa challenge opens in a popup; the form is sent once it is solved. A missing, reused or rejected token is refused with a readable message. With email-code login (Discourse's `enable_local_logins_via_code`), the challenge runs each time a code is requested, including resends. Entering the code needs no second challenge. Requests made with an API key, and password resets sent by staff, are not challenged. Email-code protection relies on a hook that Discourse added on 26 November 2026. On older builds, including the 2026.11 stable release, the plugin cannot add the challenge to code requests, so every code request is refused. On those builds, turn `captchala_protect_login_code` off until you update. ## Requirements - A self-hosted Discourse 3.0 or later - A CaptchaLa account — get your **App Key** + **App Secret** at [`dash.captcha.la`](https://dash.captcha.la) ## Install 1. On your Discourse host, add the plugin to the `after_code` hook in `/var/discourse/containers/app.yml`: ```yaml hooks: after_code: - exec: cd: $home/plugins cmd: - git clone https://github.com/Captcha-La/discourse-captchala ``` 2. Rebuild the container: ```bash cd /var/discourse ./launcher rebuild app ``` ## Configure In the admin, open **All site settings** and filter by `captchala` (the settings are in the **Plugins** category): 1. Turn on **captchala enabled**. 2. Paste your **App Key** and **App Secret**. 3. Leave the **protect** settings on for the forms you want to cover. | Setting | Default | Description | | --- | --- | --- | | `captchala_enabled` | off | Turns CaptchaLa protection on for the site. | | `captchala_app_key` | — | Public key from the CaptchaLa dashboard. Required. | | `captchala_app_secret` | — | Server secret, used to issue and validate tokens. Required; never sent to the browser. | | `captchala_lang` | empty | A language tag such as `ja` or `pt-BR`. Leave empty to follow the visitor's browser. | | `captchala_protect_signup` | on | Protect the signup form. | | `captchala_protect_login` | on | Protect the login form. | | `captchala_protect_password_reset` | on | Protect the forgot password form. | | `captchala_protect_invite` | on | Protect invite acceptance. | | `captchala_protect_login_code` | on | Challenge before an email login or signup code is sent. | To check the setup, open your site in a private window, go to `/signup`, fill in the form and press **Sign Up**: the CaptchaLa challenge opens before the account is created. ## Screenshots ![CaptchaLa plugin settings in Discourse's All site settings, filtered by captchala](/images/plugins/discourse/admin-settings.webp) ## Notes - **Content Security Policy.** The plugin adds the CaptchaLa script host to Discourse's CSP itself. - **Privacy.** The App Secret stays on your server, and the visitor's IP address is not sent to CaptchaLa. ## Troubleshooting - **No challenge appears.** Check that `captchala_enabled` is on, both keys are saved, and the form's protect setting is on. Log out or use a private window to test. - **Every submission is refused.** Make sure the App Key and App Secret belong to the same app, and that your forum's domain is allowed for that app in the dashboard. - **Trying it out.** The public [test keys](/testing) let you check the full flow without an account. ## Links - Source and issues: [github.com/Captcha-La/discourse-captchala](https://github.com/Captcha-La/discourse-captchala) - Support: [supply@captcha.la](mailto:supply@captcha.la)