It could be that the issue came from upgrading PHP. Did you have to do so?
In any case you can check this post:
I edtited the nginx config file as follows:
sudo nano /etc/nginx/sites-enabled/nginx-passbolt.conf
and changed that line
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
to ensure that the php version was correct.
The php version is displayed by running
php -v
I run on PHP 8.2.6, so it needed unix:/run/php/php8.2-fpm.sock;
After that, restart nginx
sudo systemctl restart nginx
and the 502 disapeared. Does this fix the issue on your side?
We released v4.0.2, so you may want to set back /etc/apt/sources.list.d/passbolt.sources
to stable.