To create a full-fledged alternative to Google Drive and Docs for 20 active users, the optimal solution is a combination of Nextcloud Hub and OnlyOffice deployed on a VPS with 4 vCPUs, 8 GB RAM, and an NVMe drive of 80 GB or more—this configuration (VPS-M plan) ensures comfortable real-time document editing and fast file synchronization at a cost of ownership 4-5 times lower than cloud subscriptions.
Choosing a VPS Configuration for Nextcloud and OnlyOffice
Running nextcloud hosting on your own server requires an understanding of resource distribution. Nextcloud is a PHP application that actively consumes CPU time when generating previews and indexing files, while OnlyOffice Document Server runs on Node.js and requires a significant amount of RAM to cache open editing sessions. Your own Google Drive should operate without delays, so skimping on RAM will lead to "freezes" during collaborative work.
For a team of 20 people, where 5-7 users will be editing documents simultaneously, the resources of the VPS-M plan (4 cores, 8 GB RAM) are sufficient. If you plan to actively use video calls via Nextcloud Talk, the CPU load will increase, and a move to dedicated resources may be required.
| Parameter |
Minimum (1-5 users) |
Recommended (20+ users) |
Enterprise (100+ users) |
| Processor (vCPU) |
2 Cores |
4 Cores (High frequency) |
8+ Cores |
| RAM |
4 GB |
8-16 GB |
32 GB+ |
| Disk Type |
SSD |
NVMe |
NVMe + Object Storage |
| OS |
Ubuntu 22.04 / 24.04 |
Ubuntu 24.04 LTS |
Debian / RHEL |
Why NVMe is Critically Important for Nextcloud
Nextcloud constantly queries the database (PostgreSQL or MariaDB) to check permissions and file metadata. On traditional HDDs or slow SSDs, the interface will feel "sluggish." Using NVMe drives reduces response time (TTFB) and makes folder navigation instantaneous, comparable to a local file explorer. When working with nextcloud onlyoffice vps, disk operation speed directly affects how quickly changes are saved in documents.
Deploying OnlyOffice Docker and Nextcloud via Docker Compose
The most stable way to run onlyoffice docker in conjunction with Nextcloud is by using containerization. This isolates Document Server dependencies (fonts, rendering libraries) from the main system. We recommend using PostgreSQL as the database and Redis for transaction caching and file locking.
Example docker-compose.yml Configuration
Below is a snippet of the structure for a quick start. It is important to use a shared bridge-network for the containers so they can interact via internal hostnames.
services:
db:
image: postgres:15-alpine
volumes:
- ./db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=secure_pass_db
redis:
image: redis:alpine
app:
image: nextcloud:fpm-alpine
volumes:
- ./nextcloud:/var/www/html
depends_on:
- db
- redis
onlyoffice:
image: onlyoffice/documentserver:latest
environment:
- JWT_ENABLED=true
- JWT_SECRET=your_secret_key
volumes:
- ./onlyoffice_data:/var/www/onlyoffice/Data
To ensure onlyoffice docker works correctly, be sure to configure a JWT token. Without it, your editing server could be used by third parties if port 80/443 is open to the outside. After starting the containers, you must install the "ONLYOFFICE" app from the Nextcloud app store and specify the internal container URL (e.g., http://onlyoffice/) in the settings.
If your team is already using self-hosted Mattermost or Rocket.Chat, Nextcloud will be an excellent addition for storing shared files that can be referenced in the corporate messenger.
Looking for a reliable server for your projects?
VPS from $10/mo and dedicated servers from $9/mo with NVMe, DDoS protection, and 24/7 support.
View offers →
Integrating OnlyOffice and Collabora Online: Which to Choose?
When setting up nextcloud hosting, a dilemma often arises: OnlyOffice or collabora online. Both solutions allow you to edit docx, xlsx, and pptx directly in the browser, but they use different rendering approaches.
- OnlyOffice: Uses client-side rendering (Canvas). The main load falls on the user's browser. This ensures high accuracy in displaying complex Microsoft Office layouts and smooth scrolling.
- Collabora Online: Based on LibreOffice. Rendering occurs on the server side, and "tiles" of the image are sent to the user. This provides a 100% guarantee that the document looks the same for everyone but requires more CPU resources and a stable connection.
Comparison of Editing Capabilities
For most business tasks, OnlyOffice is preferable due to its familiar "Ribbon" style interface (like MS Office) and better support for .docx formats. Collabora Online handles rare open formats (.odt) and specific LibreOffice features better. On a VPS-M, OnlyOffice subjectively performs faster when 10+ people are working simultaneously.
Configuring an Object Storage Backend for Unlimited Scaling
When your own Google Drive grows to terabytes of data, the cost of local NVMe drives on a VPS becomes high. The solution is to use Object Storage (S3-compatible storage) such as Backblaze B2, MinIO, or Wasabi as primary or external storage.
To connect S3 as Primary Storage, you need to edit the config/storage.config.php file before starting the Nextcloud installation. This allows all user files to be stored in the "cloud," using the VPS only as a compute node for PHP logic and OnlyOffice.
'objectstore' => [
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => [
'bucket' => 'my-nextcloud-data',
'autocreate' => false,
'key' => 'ACCESS_KEY',
'secret' => 'SECRET_KEY',
'hostname' => 's3.eu-central-003.backblazeb2.com',
'use_ssl' => true,
'region' => 'eu-central-003',
],
],
Using S3 removes the backup problem: most Object Storage providers support object versioning. Even if ransomware affects files via synchronization, you can roll back the bucket state. To automate such processes, you can integrate self-hosted n8n, which will monitor the storage status.
Data Security: Encryption and Access Protection
Security is the main argument in favor of nextcloud hosting. Unlike public clouds, here you control the encryption keys and access logs. Nextcloud offers three levels of data protection:
- In-transit encryption: Mandatory use of TLS 1.3 via Let's Encrypt.
- Server-side encryption: Encrypts files before writing to disk or S3. Useful if you do not trust the storage operator.
- End-to-end encryption (E2EE): Client-side encryption. Even the VPS administrator will not be able to see the content of files in protected folders.
Recommendations for Account Protection
For the corporate sector, it is critical to enable two-factor authentication (2FA) via TOTP or WebAuthn hardware keys. It is also recommended to configure the Brute-force settings module, which blocks IP addresses after several failed login attempts. For managing employee passwords in conjunction with Nextcloud, self-hosted Vaultwarden is ideal, providing secure credential sharing within the team.
To ensure privacy when working from public networks (cafes, airports), employees should use a secure tunnel. Read about how to set it up in our material on comparing VLESS and WireGuard.
Synchronization and Mobile Clients for Your Own Google Drive
The strength of Nextcloud lies in its app ecosystem. Desktop clients for Windows, macOS, and Linux support "virtual files" (VFS). This means files are visible in the system but are only downloaded when accessed, saving space on the laptop disk—exactly how Google Drive File Stream works.
Mobile Capabilities
Nextcloud mobile apps for iOS and Android allow you to automatically upload photos to your personal cloud, view documents via integrated OnlyOffice, and even work with tasks (Deck) and calendars (CalDAV). Thanks to WebDAV support, you can connect the cloud as a network drive in almost any operating system without third-party software.
Nextcloud Hub also includes built-in mail and contacts, allowing you to completely move away from the Google ecosystem while maintaining the usual level of comfort and synchronization across all devices.
Optimizing Nextcloud Performance on VPS-M
To make nextcloud onlyoffice vps run fast for 20 users, a standard "out of the box" installation is not enough. The main bottleneck is database performance and PHP script processing.
Redis and PHP-FPM Configuration
Without Redis, Nextcloud will perform thousands of small database queries for file locking. This slows down performance significantly. The config.php file must include memcache.local and memcache.locking parameters.
'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
'host' => 'redis',
'port' => 6379,
],
Also, increase the memory_limit in PHP settings to 512M or 1G and configure pm.max_children in PHP-FPM based on the amount of RAM. For 8 GB of RAM, you can safely set up to 50-70 workers, which will ensure high interface responsiveness during simultaneous requests from many users.
The Economics of a Self-Hosted Solution for 20 Users
Let's compare costs. A Google Workspace Business Standard subscription costs about $12 per user per month. For a team of 20, that's $240 monthly. Moreover, you are limited by the service's rules and data jurisdiction issues.
| Expense Item |
Google Workspace (Cloud) |
Nextcloud + VPS-M (Self-hosted) |
| Monthly Cost |
$240 |
~$20 (VPS) + $10 (S3 Storage) = $30 |
| Data Control |
Partial (Google has access) |
Full (Only you have access) |
| File Limits |
2 TB per user |
Limited only by S3 volume (petabytes) |
| Additional Features |
Office suite only |
Kanban, chats, passwords, CRM, Mindmaps |
Savings amount to over $200 per month or $2400 per year. These funds can be directed toward improving infrastructure or hiring an outsourced system administrator to maintain the server. Furthermore, nextcloud hosting provides flexibility unavailable in SaaS: you can install any plugins and integrate the system with the company's internal LDAP/Active Directory catalogs.
Conclusions
For organizing collaborative work for a team of 20 people, the combination of Nextcloud and OnlyOffice on a VPS-M plan is the most balanced solution, providing high speed and complete independence from foreign cloud providers. Using Docker for deployment and S3 for data storage allows you to create a scalable and resilient infrastructure with minimal costs.
Ready to choose a server?
VPS and dedicated servers in 72+ countries with instant activation and full root access.
Start Now →