Nextcloud Docker: App passwords not working


I’m using nextcloud:fpm behind nginx working as reverse proxy. Users are being authenticated via “Social login” using oAuth2. This setup ist working well.

However, whenever I’m trying to connect apps to my Nextcloud via “App passwords”, that only works for a few minutes and then I get “Login failed”. Log doesn’t say anything more than “Login failed”. To summarize:

  1. I create an “App password”.
  2. I connect an app using the app password.
  3. Works.
  4. After a few minutes: “Login failed”.


  • nextcloud:fpm (latest)
  • nginx as revers proxy
  • ‘’ => false
  • overwritehost set
  • ‘overwriteprotocol’ => ‘https’
  • overwrite.cli.url set
  • trusted_proxies set

Any idea?

Thanks in advance.

After some more investigation I noticed that “password_invalid” in “oc_authtoken” is set to “1” after a while for whatever reason. I just have no clue what triggers this change…