CAPTCHA_SETUP.rst 1.1 KB

123456789101112131415161718192021222324252627282930
  1. Captcha can be enabled for this home server. This file explains how to do that.
  2. The captcha mechanism used is Google's ReCaptcha. This requires API keys from Google.
  3. Getting keys
  4. ------------
  5. Requires a public/private key pair from:
  6. https://developers.google.com/recaptcha/
  7. Must be a reCAPTCHA v2 key using the "I'm not a robot" Checkbox option
  8. Setting ReCaptcha Keys
  9. ----------------------
  10. The keys are a config option on the home server config. If they are not
  11. visible, you can generate them via --generate-config. Set the following value::
  12. recaptcha_public_key: YOUR_PUBLIC_KEY
  13. recaptcha_private_key: YOUR_PRIVATE_KEY
  14. In addition, you MUST enable captchas via::
  15. enable_registration_captcha: true
  16. Configuring IP used for auth
  17. ----------------------------
  18. The ReCaptcha API requires that the IP address of the user who solved the
  19. captcha is sent. If the client is connecting through a proxy or load balancer,
  20. it may be required to use the X-Forwarded-For (XFF) header instead of the origin
  21. IP address. This can be configured using the x_forwarded directive in the
  22. listeners section of the homeserver.yaml configuration file.