docker, networking, nextcloud, raspberrypi

Why NextCloudPi uses Apache and not Nginx

Many people seem surprised that NextCloudPi uses Apache and not Nginx. I will briefly explain my rationale here so I can just refer those people to this post.

Said people insist that Nginx is much more performant, specially on a limited SBC such as the Raspberry Pi.

First, let’s read a comparison. There is many other similar posts out there

From benchmarks like this one, we can observe that

  • It is true that Nginx is faster at delivering static pages
  • It is also true that it better handles high concurrent loads. Actually, this is where it shines.
  • They are equivalent when it comes to delivering dynamic pages.

When you are self hosting Nextcloud on your Raspberry Pi for personal use, you are in none of the first two cases.

There will be a single user, or maybe just a bunch of users. This means that there will be low concurrency. Also, note that NextCloud is a completely dynamic web service based on PHP.

This means that for a personal hosting only accessed by you you won’t feel a difference.

From the maintainer perspective though, Apache is easier:

It has many modules, and they can be loaded dynamically, meaning that is easy to install them from apt.

Nginx is only starting to do this and is still not easy to accomplish. In general, you have to compile your modules. It also has less options to choose from, even though the important ones are there for both.

If you read this post about NextCloud security and this other post about Apache modsecurity, you will hopefully understand why I really value the added security of modsecurity for Apache. You personal cloud holds your most private data and I feel that there is not enough security that you can put in place. It is not your personal blog, its your personal cloud where you sync pictures, personal documents and the like.

Modsecurity started off as an Apache module, even though it has now been ported to Nginx, it requires to be compiled and is not as readily available as the Apache Module.

Hopefully you can now see why I see little added benefit in going through the extra effort of using Nginx and making it work with Modsecurity. My time is limited and I think is better utilized in providing more features, stability and fixing bugs.

Of course people are welcome to setup their cloud their way for their own reasons.

All of NextCloudPi source code is open, and contributions are welcome. If anybody is up for the task and still feel strongly about using Nginx, or a different DDNS provider or anything else, just talk to me, send me a pull request and contribute to NextCloudPi.

The more people working on this the better!

Author: nachoparker

Humbly sharing things that I find useful [ github dockerhub ]

Leave a Reply

Your email address will not be published. Required fields are marked *