Hello,
I have a Raspberry Pi 5, and wanted to try a flarum install (currently 1.8.5). I found a recent installation HOWTO (tutorial) here.
Firstly, I want to express appreciation to the author, Navjot Singh.
After reading it through, I felt that it had too many steps. Why couldn't the Debian-packaged versions of php 8.2 (and various modules), php composer, and nginx suffice? Singh goes out of his way to install the very latest versions of all 3 of these, venturing out of the Debian packaging system. This is not to my taste, as I like to trust the Debian packages if at all possible (trusting Debian releasing security updates on those packages).
So I followed Singh's directions, but just simply installed the Debian 12 packages for all those php packages (php is 8.2.20), nginx (ver 1.22) and composer (ver 2.5.5).
Every time Singh was intent to use a username and group of "nginx", I just went with Debian's defaults of "www-data".
For example, to actually install flarum, here's what I did differently than Singh's directions:
sudo mkdir -p /var/www/flarum
sudo chown -R www-data:www-data /var/www/flarum
sudo su -
cd /var/www/flarum
sudo -u www-data composer create-project flarum/flarum .
exit
sudo chmod 775 -R /var/www/flarum
This simplifying I did, seems to have all worked just fine.