[SOLVED] Cannot login after moving my instance to a new server

I have a private, one-user instance. It used to run on a Raspberry Pi but it ran out of storage (obviously) so i moved it to a bigger server. The operating system is the same (Fedora 30), but the architecture is different (was aarch64, now x86_64).

I moved all the files from /opt/nextcloud to the new server, to the same path. I made sure the ownership and the SELinux contexts of the files was OK. The database is on a different host, so i didn’t have to touch that. I have also copied over the php-fpm and nginx config files.

The login screen appears fine, but whatever i type in the username/password boxes, i get a HTTP 303 See Other response, and get redirected back to the login page. However, my mobile app continues to work without problems.

The worst thing is, i don’t see any logs. If i set my log level to 0 i do see a NotLoggedInException, but that’s all. I configured php-fpm to write access logs, so i’m pretty sure the requests get there (also, the debug log appears, so that part seems OK). The error logs of nginx and php-fpm are empty.

I’m out of ideas. Where else should i look for signs?

Apparently i did miss something.

Fedora’s php package sets the ownership of /var/lib/php/opcache to the group apache (as Apache HTTPd is a hard dependency of PHP; why? Beats me…). Fixing it by changing the group to nginx fixed my problem.