How to Make Next Cloud faster with CDN?

Is there any way to Load All the Nextcloud Assets from a CDN. All the HTML, CSS get loaded from a Self-hosted CDN??

PLEASE ASSIST!

I do not think CDN can help you get some noticable speed-up, as there are not many static html/css files. The whole nextcloud installation (without data-dir) has just about ~450MB, I guess most of that is php-code.

And self-hosting CDN is imho waste of time. You can never get so good results as big players. And why doing it, if there are some free CDNs (cloudflare, bootstrap, etc)?

It depends a bit on the apps you are using.

Normally that isn’t a huge issue since static stuff should be cached by the browser. So it only speeds up the first load but that is not so important for services like Nextcloud (in contrast to a news websites or others where you usually load only one page).

I would focus on other stuff to speed up my setup.

Look at PageSpeed or similar tools. There are a few static resources. Add them with long expiry http headers.

https://developers.google.com/speed/pagespeed/insights/

Ok I can Deliver that 450 MB of PHP, CSS, HTML code using Best CDN service (not self-hosted) with No Cost. Is their any way?

Ok Sir :grin: thanks for Assistance

You can not deliver php from CDN, because php-code is handled by your web-server (forwarded to php-handler).

What you could deliver by CDN are html/css-files, and images. There are not many of them, so I think it is not worth the effort.

With Nextcloud’s strict security rules (hint: CSP and nonces) it will be super hard to split the pages generated by Nextcloud and the static assets. If, then this has most likely to be done by Nextcloud code.

1 Like

Thanks all of you at Nextcloud Community.

@Rhinox I know CDN don’t Deliver PHP files.
@ChristophWurst For your Final Words.