Is nextcloud with FPM worth it?

I’ve heard that using PHP-FPM with a Nextcloud instance can significantly boost performance in many cases. My setup consists of a small number of users but a large amount of data—several terabytes, mainly consisting of large files like RAW images, movie files, and standard office documents.

Originally, I set up this instance quite a while ago with MariaDB, PHP-FPM, Nginx, and Nginx Proxy Manager as a reverse proxy, all running in Docker on a Debian host. Since I had it working once before, I decided to refine the setup a bit.

This time, I stuck with PHP-FPM and Nginx as the web server but made some changes: I switched to PostgreSQL as my database, added Redis, and replaced Nginx Proxy Manager with Caddy as the reverse proxy. However, I ran into numerous issues with the web server configuration along the way.

Right now, most things are up and running, but I’m facing a Content-Security-Policy issue. When trying to install an app, Nextcloud insists on using an HTTP link, which fails completely. I’ve already created a support issue (without any useful responses) and spent hours consulting various AI tools, but nothing has resolved the problem.

So, my question is: Given my instance type, is PHP-FPM actually providing a significant performance benefit, or is it not worth the hassle?

Hi Wolf

If you use mainly large files, you probably won’t need much performance.

I had an instance without FPM and then later on with FPM and did not notice any difference. But to be honest, my user only has 5k files, so I probably also don’t need performance.

I still went with FPM, because why not?

I don’t know much about Docker or Caddy. Just remember that ChatGPT isn’t an Ai that actually intelligently reads your config and corrects you.
It can’t even tell you how many “r” there are in the made up word “starberry”. It will say two. Why?
It is a LLM or blabbermouth model that babbles stuff that seems appropriate in context.

Maybe this Apache FPM setup behind a NGINX reverse proxy tutorial will help you solve your issues. Nextcloud_Ubuntu/nextcloud_behind_NGINX_proxy.md at main · jameskimmel/Nextcloud_Ubuntu · GitHub