Why Is Nextcloud Slow and How to Speed It Up

Jay

Desktop Interface
7 min read|11.03.2026

Slow file uploads, laggy web interface, and unreliable sync are not random issues. They are symptoms of an underlying configuration problem, and they tend to worsen as your data and user counts grow. Most Nextcloud installations run slowly not because of the software itself, but because the server environment was never properly tuned for it.

This article breaks down the actual causes of poor Nextcloud performance and walks through proven fixes, from database optimization and caching to PHP configuration and background job handling.

Key Takeaway

Nextcloud performance issues are almost always configuration problems rather than hardware limitations. The most impactful fixes are tuning the InnoDB buffer pool, configuring OPcache and APCu, switching background jobs to the system cron, and enabling the High-Performance Back-end for Files. Addressing these across the full stack produces stable, consistent performance without requiring infrastructure upgrades.

How Nextcloud Performance Works

Nextcloud is a self-hosted collaboration platform built on PHP, offering file sync, sharing, and productivity features such as calendars, contacts, and document editing. Unlike managed Nextcloud cloud services, every aspect of performance depends on how well your own server stack is configured.

When a user makes a request, it passes through several interdependent layers: the web server, the PHP processor, the database, the cache, and the storage backend. A problem in any one of them affects the entire chain. Slow database queries, missing cache configuration, underpowered PHP settings, or high disk latency can all degrade performance independently, and in many cases, multiple issues coexist.

This is why Nextcloud slowdowns rarely have a single cause and why fixing them requires looking at the full stack rather than a single component in isolation.

Try managed Nextcloud now

Why Nextcloud Is Slow

Most Nextcloud speed issues stem from infrastructure limitations, misconfigured server components, or both.

Insufficient Server Resources

Limited CPU cores and low RAM restrict how many requests the server can handle at once. When memory runs out, the system falls back to swap, causing significant response delays. Shared hosting and low-tier VPS plans worsen the issue by throttling CPU usage, directly affecting file operations and background processing.

Database Misconfiguration

Poorly tuned MariaDB or MySQL settings, missing indexes, and unoptimized queries slow down file listings and metadata updates. Without Redis handling file locking, concurrent access from multiple users creates queuing delays that compound under load.

Missing or Incomplete Caching

Without OPcache, PHP recompiles scripts on every request. Without APCu, repeated internal lookups hit the database instead of memory. Without Redis configured for memory caching, the database absorbs query load it should never see. Each missing layer adds latency independently.

PHP and Web Server Tuning

Incorrect PHP-FPM worker counts cause requests to queue rather than process in parallel. Short execution timeouts cause failures during large-file operations, and reverse-proxy misconfigurations can trigger unnecessary SSL renegotiation or strip performance headers entirely.

Storage Bottlenecks

HDD storage and slow network-attached storage struggle with large uploads and thumbnail generation. Directories holding tens of thousands of files without proper indexing make file scans increasingly resource-intensive as the library grows.

Background Job Handling

Running background tasks in AJAX mode forces maintenance jobs to execute during active user requests, adding load at the worst possible time. Too many installed apps, particularly poorly optimized ones, add database queries and memory overhead that accumulates quietly over time.

Database Optimization for Better Nextcloud Performance

The database is responsible for every file metadata lookup, sharing rule, and session check. Optimizing it is one of the most direct ways to improve file browsing speed and reduce response times across the board.

  • Increase InnoDB Buffer Pool Size: Set this to 50-70% of available RAM so MariaDB or MySQL keeps frequently accessed data in memory rather than reading from disk on every query. This single change has the most immediate impact on database-heavy workloads.
  • Add Missing Indexes: Run occ db:add-missing-indices to detect and apply any indexes Nextcloud recommends for your current version. This significantly speeds up file listings on larger instances and should also be run after major Nextcloud updates.
  • Enable Redis for File Locking: Replacing database-level file locking with Redis eliminates contention when multiple users access files simultaneously. Configure Redis as memcache.locking in your config.php to offload this from the database entirely.
  • Run Routine Cleanup: Orphaned shares, expired sessions, and deleted file records accumulate over time and bloat the database. Use Nextcloud's built-in occ commands to clean these up regularly, ideally scheduled as a weekly cron job, to prevent gradual query slowdown.

Caching and Memory Configuration

Without proper caching, Nextcloud reprocesses the same data on every request. Configuring each caching layer correctly removes unnecessary load from both PHP and the database, and is one of the highest-impact changes you can make without touching your hardware.

Enable OPcache 

OPcache compiles PHP scripts once and stores them in memory, eliminating the overhead of recompiling on every request. Beyond just enabling it, the memory allocated to it needs to be sized correctly for your Nextcloud installation, too low a cap and it stops being effective under sustained load.

Configure APCu for Local Caching

APCu handles local memory caching for repeated internal application data. Set it as memcache.local in your config.php to reduce repetitive lookups that would otherwise hit the database.

Use Redis for File Locking and Distributed Caching

On a single server, Redis should handle file locking while APCu covers local memory caching. Using Redis for both roles on a single node is less efficient than splitting the responsibility. On multi-node or clustered deployments, however, Redis should handle both distributed caching and file locking since APCu is not shared across servers.

Raise PHP Memory Limits

The default PHP memory limit is too low for real-world Nextcloud usage. Large file uploads, preview generation, and background tasks all need adequate memory headroom to complete without failure. Setting memory_limit to at least 512MB prevents timeouts and mid-operation crashes on resource-intensive tasks.

Web Server and PHP Configuration Tuning

Default PHP and web server settings are conservative and will create bottlenecks before your hardware does. On the PHP side, increasing PHP-FPM worker count, raising memory limits, and adjusting execution and upload timeouts are the three changes that have the most direct impact on stability and throughput under real usage.

On the web server side, enabling HTTP/2 and Gzip compression improves connection efficiency and reduces payload size. If Nextcloud runs behind a reverse proxy, make sure forwarding headers are correctly configured to avoid redirect loops and broken HTTPS detection. Keeping TLS current at 1.2 or 1.3 also removes unnecessary overhead from every connection.

Storage and File System Performance

Storage is where slow Nextcloud installations feel it most directly. Migrating from HDD to SSD or NVMe is the single biggest hardware improvement you can make, significantly reducing file read and write latency. Keeping the database on a separate, faster storage volume prevents database reads and writes from competing with active file transfers on the same disk.

On the configuration side, limiting preview generation to essential file types and capping maximum resolution reduces one of the heaviest ongoing disk operations in Nextcloud. Keeping directory structures reasonably shallow, rather than dumping thousands of files into a single folder, improves file-scan speed and metadata lookup times as your library grows.

High Performance Back-end for Files

The High Performance Back-end (HPB) for Files directly improves sync responsiveness by replacing the default client polling behavior with server-pushed notifications. Without it, desktop and mobile clients check for changes every 30 seconds, meaning sync can lag by up to half a minute after a file is modified. Enabling HPB eliminates that delay entirely; the server notifies connected clients the moment a change occurs, and sync starts immediately.

To set it up, HPB runs as a separate service alongside your Nextcloud instance. Nextcloud's official documentation covers the deployment process, and most installations can get it running with minimal configuration. For any setup where multiple users are actively collaborating or where sync responsiveness is a priority, enabling HPB is the most direct fix available without changes to your core server stack.

Background Jobs, Apps, and Cron Optimization

Background jobs handle maintenance tasks like file indexing, share expiration, and activity feed updates. Running these in AJAX mode means they execute during active user requests, directly competing with real traffic for server resources. Switching to system cron moves this work to a fixed independent schedule, keeping maintenance load completely separate from active user sessions. This is the recommended configuration for any production Nextcloud instance.

Beyond cron, regularly auditing and disabling unused apps reduces the baseline database queries and memory overhead that every installed app adds, regardless of whether it is actively used. Keeping log levels appropriately set and staying current with Nextcloud updates also prevents gradual resource creep, since updates regularly include query optimizations and performance fixes that add up over time.

Monitoring and Ongoing Performance Maintenance

Performance tuning is not a one-time task. As your instance grows, new bottlenecks emerge, and previously stable configurations can degrade. Key metrics to keep an eye on:

  • CPU and Memory Usage: Watch for sustained high CPU during peak hours and swap activity, both of which are early indicators that your server is being pushed beyond its comfortable operating range.
  • Disk I/O Wait Times: Elevated I/O wait times are a direct signal that storage is becoming the active bottleneck, particularly as file libraries grow.
  • Database Query Performance: Slow-query logs expose inefficient queries before they visibly affect users. Nextcloud's built-in logging surfaces these alongside reports of failed background jobs.
  • App and Update Hygiene: Keeping Nextcloud and its stack up to date matters beyond security. Recent releases regularly include query optimizations and caching refinements. Pairing updates with periodic database cleanup and an app audit prevents gradual performance creep.

Conclusion

Nextcloud performance rarely comes down to a single misconfiguration. In most cases, it is the accumulation of an untuned database, missing cache layers, conservative PHP settings, and neglected background job handling that together push a server past its comfortable operating range. Fixing one layer helps, but the most stable and lasting improvements come from addressing the full stack.

For teams relying on active collaboration, enabling the High Performance Back-end for Files on top of a well-tuned server closes the last gap left by polling-based sync. With the right configuration in place, Nextcloud scales reliably without the sluggishness that plagues most default installations.

The Cloud Assistant That's Always One Step Ahead.

Our Blog

Cloud Insights: Trends, Tips & Technologies

Secure File Sharing for Business: How Companies Use Nextcloud for Collaboration
8 min read|27.03.2026

Secure File Sharing for Business: How Companies Use Nextcloud for Collaboration

Businesses share sensitive files such as contracts, financial records, customer data, and internal documents every day across teams, devices, and external partners. At the same time, the risks are also increasing. The average cost of a data breach in 2023 reached $4.45 million, and many incidents are linked to unsecured cloud-based file transfers. Even a simple mistake, like sending a file to the wrong recipient, can trigger a GDPR violation. Remote work and constant collaboration with client

What Is Nextcloud Used For?
6 min read|26.03.2026

What Is Nextcloud Used For?

Managing files, communicating with teams, and staying organized no longer requires juggling multiple platforms. Modern cloud solutions are built to handle it all in one place, and Nextcloud is one of the most capable examples of that shift. With over 400,000 deployments globally, it has grown into one of the most trusted private cloud solutions available today. This article will discuss what Nextcloud is, walk through its core use cases, and explain who it is built for, giving you a clear pictu

Can Nextcloud Logs Be Cleared?
6 min read|25.03.2026

Can Nextcloud Logs Be Cleared?

Managing a self-hosted cloud environment comes with its share of maintenance tasks, and keeping log files under control is one of them. Over time, Nextcloud logs can grow significantly, consuming disk space, slowing the admin interface, and making it harder to spot relevant errors.  This article will discuss what Nextcloud logs are and whether they can be cleared, where log files are located across different server setups, the distinct types of log files administrators should know, how to

Get in Touch with Our Cloud Experts

Chat with us
Chat

Chat with us

Our friendly team is here to help

Cbb logo
Secure real-time Cloud collaboration from Europe
CloudBased Backup empowers you with Managed Nextcloud, a secure, on-premise collaboration platform offering real-time document editing, seamless video chat, and groupware across mobile, desktop, and web.
Visit us on social media.
Subscribe to our newsletter.
Get exclusive offers and always stay up-to-date.

Reach out directly at

PEWEO SARL

5, Montée des Aulnes

L-6611 Wasserbillig

LU33030425

© 2026 CloudBased Backup. All rights reserved.