lukasjelinek reports that several users on a self-hosted Discourse instance (v2026.12.0-latest +140) are unable to log in, receiving the error message: “You can’t log in as … from that IP address.” The affected users are not blocked, suspended, or listed in “screened addresses.” olivia suggests this error indicates the login request’s IP is blocked, which may happen if Discourse sees the reverse proxy’s IP instead of the user’s real IP. She recommends checking if templates/cloudflare.template.yml is included in app.yml, especially for Cloudflare setups, and links to a similar issue.
lukasjelinek clarifies they use a custom nginx reverse proxy and lists the configured headers: Host, X-Forwarded-For, X-Real-IP, and X-Forwarded-Proto (noting a typo in the original post). satonotdead confirms that enabling the Cloudflare template in app.yml resolved the same issue for their own Nginx setup. Following this advice, lukasjelinek enabled the template, confirmed that login functionality returned to normal, and plans to have users retry logging in.
Are you using Cloudflare or another reverse proxy?
This error indicates that the IP address of the login request is blocked. The users’ IPs may fall within a blocked IP range, or Discourse may be seeing the proxy’s IP rather than their actual IPs.
If you’re using Cloudflare’s proxy with a standard Docker installation, check whether templates/cloudflare.template.yml is included in your app.yml.