Improving Nextcloud speed


I like how Nethserver gives you the options to easily set up a Nextcloud instance.
I would recommend to switch from Apache webserver to Nginx for Nextcloud.
Jus by switching to Nginx made a very big difference on my custom Nextcloud 12 VM (Ubuntu 16.04.3 LTS)
I am using HTTPS only. The speed improvement might come from using HTTP/2.0 also.
After this i added the PHP OPcache, APCu memcache + disabled bruteforce check (yes i know that it weakens security) made my Nextcloud run a lot faster and be really usable.

This might not look like an easy task but it is worth it.
With this message i just wanted to let you know of my experience with Nextcloud.


Glad you like it. If you have any tip for nextcloud don’t hesitate to share it. :slight_smile:

@Imre_Bertalan also shared his interest to replace apache with nginx for performance reasons.

Nice to hear others also think the same.
I will have to remake my Nextcloud documenting every step :slight_smile:
For now it’s just a testcloud for myself , i like it alot.
Mapping it in windows is not as fast as samba but working on a setup to get both at the same time.
So basically i want to have [My Samba Shares] <=> [My Cloud] , but i didn’t start yet :smiley:

Nextcloud’s external storage app supports samba/cifs shares and many others, it’s a matter of trying what works best for you.

I replied in another thread to this, but you should consider having the nextcloud on another server. Depending on your server performance, and what you are doing on it, it would be faster to just host it on another machine. I would recommend freenas, BSD jails are great for this stuff and you wouldn’t tie down your internet/firewall performance when stressing your gateway. If you can budget it build a freenas machine and all these issues are solved. It wouldnt be to likely nethserver will see nginx for a very long time, as it would require almost a complete rebase on many core components.

Edit: Im an idiot, I meant BSD not BAD…I was tired when I wrote!

1 Like

I understand you like BSD a lot , but i will try to stick to linux :slight_smile:
I tried it on many occasions and used it also.
It is not something that i am against.
It is just i manage linux more easily.

I didn’t say anything about switching NS webserver to nginx.
All i said is Nextcloud runs so much faster with Nginx :smiley:

Other than running nginx to host Nextcloud, there are a few other things that could be done to improve performance–some might even be rolled into the nextserver-nextcloud package:

  • Configure a memory cache–redis seems to be preferred
  • Configure the PHP opcache according to Nextcloud’s recommendation
  • Use PHP 7.1 rather than 5.6 for Nextcloud (using Software Collections)

The first two look like they should be simple to implement as part of nethserver-nextcloud. The third would involve a lot of additional packages. But none of them should interfere with anything else on the server.

Yes that is all nice and good
But the most improvement for me came in the form of HTTP/2 :slight_smile:

All good and well, but Nethserver being based on CentOS “bleeding edge” techniques will be a wee bit down the road I fear.

None of the suggestions I made are at all contrary to CentOS’ conservative release philosophy, or are in any way “bleeding edge.” The first two are simply matters of configuration, and can (and should, IMO) be handled by the nethserver-nextcloud package. The third requires a good bit of additional software, but is still all CentOS-compatible.

1 Like

…is available through the Stephdl repo. But yeah, php 7 has matured and should be default.

1 Like

I’d like for that to be the case, but that would be a bit of a break from upstream.

My pov is not Nethserver specific. I’m just the nagging customer atm :smile:

Just a heads up, nextcloud 13 (in beta now) will improve speeds by a large amount. No need to use nginx or anything else. If you need nginx, look into BSD, it offers a great jail system, or iocage whatever you prefer, look into setting up a jail in a VM and running nextcloud there if you need nginx. I am installing nextcloud 13 hopefully tonight after I “upgrade” my nas server (get rid of freenas, its turning into trash).

1 Like

You’re saying that you’d get better performance by setting up a FreeBSD VM on Neth, a jail in that VM, and Nextcloud in that jail? Compared to just running Nextcloud on Neth itself? That can’t be right.

1 Like

No, that was in reference to nginx. It wouldnt be slower, nextcloud doesn’t require much, most of the performance is in the way it is coded anyways, thats why they are able to speed up performance by a large amount with the release 13.

9 posts were split to a new topic: Recommend a NAS

I am telling you that most of the speed improvement i got where from HTTP2 :slight_smile:
Just try nginx with https and compare to apache.
I like apache a lot ! I have no problem with apache.
I just wanted to let you know of my findings.

1 Like