
You want Dropbox-style file sync, plus your calendar and contacts, on a server you control instead of a provider's. Nextcloud does that: it is open source (AGPL-3.0), runs on a Linux VPS, and has sync apps for desktop and phone. This guide installs it with Apache, MariaDB, PHP and Redis on Ubuntu 24.04 LTS, following the example installation in the Nextcloud manual.
Nextcloud vs Commercial Cloud
Google gives every account up to 15 GB, shared across Gmail, Google Drive and Google Photos, and sells more storage through Google One plans that start at 100 GB. Dropbox Basic is free with 2 GB, and Dropbox Plus gives one person 2 TB. We checked both on their own pages on 31 October 2026 (Google storage help, Google One plans, Dropbox plans); see those pages for current prices.
| Google Drive | Dropbox | Your Nextcloud | |
|---|---|---|---|
| Free storage | Up to 15 GB, shared with Gmail and Google Photos | 2 GB (Basic) | None: you pay for the VPS |
| More storage | Google One plans from 100 GB | Plus: 2 TB for one person | A bigger VPS disk or extra storage |
| Who runs the server | Dropbox | You |
What you get on the Nextcloud side:
- Calendar, contacts, notes, chat and video calls through apps from the Nextcloud app store (see the table at the end).
- Document editing through one of the office integrations the manual lists: Nextcloud Office or Collabora Online.
- End-to-end encryption for the folders you choose. The End-to-End Encryption app encrypts files on your device before they reach the server. Server-side encryption is something else: the manual says it is mainly for files on external storage and does not protect data from a compromised Nextcloud server or a malicious administrator.
Installation
These steps follow the manual's example for Ubuntu 24.04 LTS, which is also the recommended image in the operating system step of Space-Node's VPS order form. Ubuntu 24.04 ships PHP 8.3 and MariaDB 10.11, both on the supported lists of Nextcloud 35, the current major version (35.0.2, released 15 October 2026). PHP 8.3 is the oldest PHP version Nextcloud 35 supports.
Prerequisites
sudo apt update && sudo apt upgrade
sudo apt install apache2 mariadb-server libapache2-mod-php php-gd php-mysql \
php-curl php-mbstring php-intl php-gmp php-xml php-imagick php-zip \
php-apcu php-redis redis-server bzip2
Up to php-zip this is the manual's package list. php-apcu, php-redis and redis-server are for the caching step below, and bzip2 unpacks the download.
Database Setup
sudo mysql
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'your-strong-password';
CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
quit;
Nextcloud uses the READ COMMITTED transaction isolation level, and the manual's database page sets it in the MariaDB server configuration, /etc/mysql/my.cnf. Add these lines there:
[mysqld]
transaction_isolation = READ-COMMITTED
binlog_format = ROW
Then restart MariaDB:
sudo systemctl restart mariadb
Download and Install
cd /var/www/
sudo wget https://download.nextcloud.com/server/releases/latest.tar.bz2
sudo wget https://download.nextcloud.com/server/releases/latest.tar.bz2.sha256
sha256sum -c --ignore-missing latest.tar.bz2.sha256
sudo tar -xjf latest.tar.bz2
sudo chown -R www-data:www-data /var/www/nextcloud
The checksum command must print latest.tar.bz2: OK. The --ignore-missing flag is there because the checksum file also lists a metadata file that you did not download; without the flag, sha256sum reports that file as unreadable and exits with an error.
Apache Configuration
Start with the manual's virtual host for plain HTTP on port 80. Certbot adds the HTTPS part in the next step, once the certificate exists. Create /etc/apache2/sites-available/nextcloud.conf:
<VirtualHost *:80>
DocumentRoot /var/www/nextcloud/
ServerName cloud.yourdomain.com
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost>
Enable the site and the modules the manual lists for Apache with mod_php, then restart Apache:
sudo a2ensite nextcloud.conf
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime
sudo systemctl restart apache2
SSL with Let's Encrypt
Point your domain's DNS record at the VPS first. Let's Encrypt checks a file on your domain over port 80 (its HTTP-01 challenge only works on that port), so port 80 must be reachable.
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d cloud.yourdomain.com
Certbot's Apache plugin obtains the certificate and installs it in Apache. Check that renewal works with sudo certbot renew --dry-run.
Visit https://cloud.yourdomain.com and complete the web installer: create the admin account, then open Storage & database and enter the database user, password and name from above, with localhost as the host. The same section sets the data folder. The manual advises choosing it at installation, because it is difficult to move afterwards, and a custom folder must already exist and be owned by www-data. Read our Nextcloud storage planning guide before you choose.
Performance Optimization
Redis Caching
Add these lines inside the $CONFIG array. This is the manual's setup for a single server: APCu for the local cache, Redis for the distributed cache and for file locking.
// /var/www/nextcloud/config/config.php
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
'host' => 'localhost',
'port' => 6379,
],
The manual warns that the Redis server may not start on its own. systemctl status redis-server shows whether it runs, and sudo systemctl enable --now redis-server starts it and keeps it on after a reboot.
PHP Optimization
Apache's PHP reads its own php.ini: on Ubuntu 24.04 that is /etc/php/8.3/apache2/php.ini. Command-line PHP, which cron uses, reads /etc/php/8.3/cli/php.ini.
; /etc/php/8.3/apache2/php.ini
memory_limit = 512M
upload_max_filesize = 16G
post_max_size = 16G
max_input_time = 3600
max_execution_time = 3600
apc.shm_size = 128M
Restart Apache afterwards with sudo systemctl restart apache2. The manual says memory_limit should be at least 512 MB. The upload and time values are the examples from its page on big files, and the desktop sync client is not affected by these limits because it uploads in smaller chunks. apc.shm_size raises the APCu memory from its 32M default, which the manual calls usually too low for Nextcloud.
You do not need OPcache lines here: opcache.enable = 1 and opcache.memory_consumption = 128 are PHP's defaults already, and on Ubuntu 24.04 the OPcache module is installed as a dependency of Apache's PHP module. The manual's server tuning page lists the OPcache settings worth changing.
Background Jobs
By default Nextcloud runs background jobs with AJAX, one job each time a user loads a page. The manual recommends cron instead, every 5 minutes as the web server user:
sudo crontab -u www-data -e
*/5 * * * * php -f /var/www/nextcloud/cron.php
Once cron has run cron.php, Nextcloud switches the background jobs setting to Cron by itself.
Sync Clients
| Platform | App | Automatic sync |
|---|---|---|
| Windows | Nextcloud desktop client | Keeps your folders in sync |
| macOS | Nextcloud desktop client | Keeps your folders in sync |
| Linux | Nextcloud desktop client (AppImage) | Keeps your folders in sync |
| iOS | Nextcloud Files | Automatic upload of photos and videos |
| Android | Nextcloud Files | Automatic upload of photos and videos |
Turn on automatic upload in the mobile app and new photos and videos go straight to your own server.
Storage Requirements
How much disk you need depends on more than your files. The Nextcloud manual says deleted files in the trash bin and older file versions are managed outside the normal user quota, and that thumbnails, temporary files and caches use disk space without counting against it. Our Nextcloud storage planning guide shows how to measure what you use, cap versions and the trash, size the disk, and move the data directory later.
Space-Node VPS plans use NVMe SSD storage in an EU data center, and the order form offers extra NVMe storage as an add-on if your files outgrow the plan's disk. Backups are not included in the plan price, so run your own or ask support about the backup option through a ticket.
Useful Nextcloud Apps
| App | Purpose |
|---|---|
| Calendar | Calendar that syncs events with your devices |
| Contacts | Contacts over CardDAV, synced with your devices |
| Notes | Notes with Markdown formatting, saved as files |
| Talk | Chat plus video and audio calls |
| Nextcloud Office (Collabora) | Document editing through a Collabora Online server |
| Deck | Kanban boards |
| Bookmarks | Bookmarks synced across your browsers and devices |
| End-to-End Encryption | Encrypts the folders you choose on your device before upload |
With these apps one Nextcloud server covers files, calendar, contacts, notes and video calls on your own VPS. Check an app's page in the app store for the Nextcloud versions it supports before you install it; on 31 October 2026 each app above listed Nextcloud 35.
Sources
All opened on 31 October 2026:
- Nextcloud Administration Manual (35): example installation on Ubuntu 24.04, installation on Linux (Apache), installation wizard, system requirements, PHP configuration, database configuration, memory caching, server tuning, uploading big files, background jobs, server-side encryption, office
- Nextcloud User Manual (35): storage quota
- Nextcloud: install page and clients, server releases, server repository and licence, checksum file for latest.tar.bz2
- Nextcloud app store: Calendar, Contacts, Notes, Talk, Nextcloud Office (Collabora), Deck, Bookmarks, End-to-End Encryption
- Ubuntu 24.04 packages: php, libapache2-mod-php8.3, mariadb-server, redis-server, python3-certbot-apache
- PHP OPcache configuration, sha256sum(1), a2enmod(8), systemctl
- Certbot: user guide; Let's Encrypt: challenge types
- Google: How your Google storage works, Google One plans; Dropbox: plans