A VPS for Nextcloud: memory per user, where to keep files and what to configure right away
Nextcloud is a PHP application with a database, a cache and background jobs, not just a folder of files in a browser. So a server for it is chosen along two separate axes: CPU and memory decide how quickly folders open and clients sync, while the disk decides how many files will fit. The table above lists plans with 2 GB of memory and 200 GB of disk or more: the lower bound for a personal cloud or a small team.
Memory and CPU: work it out from the number of users
The official documentation doesn't give a "this many users, this many GB" table, but it does name a baseline: at least 128 MB of memory per PHP process, with 512 MB recommended. Every concurrent request (opening a folder in the browser, a desktop client sync, a photo upload from a phone) takes its own PHP-FPM process. That gives these practical guidelines:
- 1–5 people, files and calendar: 2 cores and 2–4 GB of memory;
- 10–30 people with a desktop client on every computer: 4 cores and 8 GB;
- office apps, full-text search, face recognition in photos: add another 2–4 GB and a couple of cores for each such module.
The CPU is loaded less by the files themselves than by preview generation, server-side encryption and simultaneous syncing. If the team uploads lots of photos, the interface will lag noticeably without spare cores. On plans with 2 GB of memory it's better not to install the office suite at all.
Disk: where the application lives and where the files live
The Nextcloud database and code should sit on SSD or NVMe: every folder opening means dozens of database queries. The files themselves tolerate a slow disk, so at large volumes a two-machine setup pays off: the application on a fast VPS, and the data directory on a server with a large HDD connected over a private network, or on external S3-compatible storage. How to choose such a server is covered on the storage VPS page.
Plan capacity with headroom: file versions and the trash bin keep old copies and deleted files by default, so real usage is noticeably higher than the total size of the documents. Turn on user quotas from day one, as cutting them later is harder. If the server will hold photos and videos from phones, make sure preview generation is limited to sensible sizes, otherwise the preview folder will grow to tens of gigabytes.
What to configure right after installation
- PHP. Use a version from the supported list for your Nextcloud release (for current releases that's PHP 8.3–8.5), set
memory_limitto at least 512M, and enable OPcache. - Cache. For a single organisation server the documentation recommends APCu for the local cache and Redis (or Valkey) for the distributed cache and file locking. Without Redis, locking falls back to the database, and when several people work at once you get "file is locked" errors.
- Background jobs. Switch them from AJAX to system cron:
cron.phpas the web server user every 5 minutes. The browser-based mode runs one job at a time and only suits very small installations. - Database. PostgreSQL or MariaDB; SQLite is only good for testing.
- Access. HTTPS with a valid certificate and two-factor authentication for all accounts; the built-in brute-force protection is on by default, so don't turn it off.
If you'd rather not assemble everything by hand, there's the official All-in-One Docker image: a single master container deploys Nextcloud, the database, Redis, the office suite and backups. It needs KVM virtualisation.
Office apps
Collaborative document editing in the browser comes from Nextcloud Office, based on Collabora Online, or from the ONLYOFFICE integration. Both are separate server components that use memory for every open document. For a small team they are installed on the same VPS, but if a dozen people regularly co-edit, it's better to move the office server to a neighbouring machine with 4 GB of memory or more.
Company data and 152-FZ
A company cloud quickly fills up with contracts, forms, passport scans and HR documents, and all of that is personal data. Under Russia's 152-FZ, the initial recording and storage of such data about Russian citizens must take place in databases located in Russia, so put a company's working Nextcloud on a server in a Russian location and keep a foreign machine for a personal cloud. Outside Russia, check your own local data protection rules in the same way. The requirements for such a server and its paperwork are covered on the VPS for 152-FZ page. Send backups of the data directory and the database dump to a separate server, also in Russia; suitable plans are in the VPS for backups selection.