How to fix Homeassistant "403: forbidden" on login

When Homeassistant shows you 403: forbidden instead of the login prompt, the most likely cause is that your user got banned due to too many failed login attempts.

Edit configuration.yaml and set

login_attempts_threshold: 100

from the default 5, which should unban you. You might also need to configure the trusted_proxies to contain the IP of a reverse proxy server (typically running on 127.0.0.1). If that does not help, disable the IP ban entirely. This is a complete configuration.yml http section that works:

http:
  use_x_forwarded_for: true
  trusted_proxies:
  - 127.0.0.1
  ip_ban_enabled: false
  login_attempts_threshold: 500