We do a lot of NextCloud installs, and use PHP-FPM + chroot for maximum security. This gets tricky though, and one of the more obscure gotchyas we’ve run across is trying to create a new user or set a user’s email address and getting back “invalid email address” despite the address being, well, valid.

Another issue which we later discovered was related was that the user list doesn’t update automatically like it should when adding a new user. The new user doesn’t appear unless you manually refresh the admin page.

After a lot of debugging and careful logging we saw this error mixed in with a lot of other things: