Why pay for cloud storage that scans your files when you can run your own? Nextcloud gives you Dropbox-like functionality on hardware you control.
Nextcloud vs Commercial Cloud
| Feature | Google Drive | Dropbox | Your Nextcloud | |---------|------------|---------|---------------| | Storage | 15GB free | 2GB free | Your VPS storage | | Privacy | Google reads files | Dropbox reads files | Nobody reads files | | Monthly cost (100GB) | $2 | $12 | VPS cost | | Custom apps | No | No | Full app store | | File sharing | Yes | Yes | Yes | | Calendar/Contacts | Separate | No | Built-in | | Collaborative editing | Google Docs | Paper | Collabora/OnlyOffice | | End-to-end encryption | No | Vault only | Entire storage |
Installation
Prerequisites
sudo apt install apache2 mariadb-server php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-apcu php-redis redis-server
Database Setup
sudo mysql -u root
CREATE DATABASE nextcloud;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'your-strong-password';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Download and Install
cd /var/www/
sudo wget https://download.nextcloud.com/server/releases/latest.tar.bz2
sudo tar -xjf latest.tar.bz2
sudo chown -R www-data:www-data /var/www/nextcloud
Apache Configuration
<VirtualHost *:443>
ServerName cloud.yourdomain.com
DocumentRoot /var/www/nextcloud
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/cloud.yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.yourdomain.com/privkey.pem
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
SSL with Let's Encrypt
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d cloud.yourdomain.com
Visit https://cloud.yourdomain.com and complete the web installer.
Performance Optimization
Redis Caching
// /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,
],
PHP Optimization
; /etc/php/8.1/apache2/php.ini
memory_limit = 512M
upload_max_filesize = 16G
post_max_size = 16G
max_execution_time = 3600
opcache.enable = 1
opcache.memory_consumption = 128
Sync Clients
| Platform | App | Auto-Sync | |----------|-----|----------| | Windows | Nextcloud Desktop | Yes | | macOS | Nextcloud Desktop | Yes | | Linux | Nextcloud Desktop | Yes | | iOS | Nextcloud iOS | Yes (including photos) | | Android | Nextcloud Android | Yes (including photos) |
Mobile clients automatically upload photos to your server, replacing Google Photos.
Storage Requirements
| Use Case | Recommended VPS Storage | |----------|------------------------| | Documents only | 25-50GB | | Documents + some photos | 50-100GB | | Full photo library | 200-500GB | | Family cloud (2-4 users) | 200-500GB | | Small team (5-10 users) | 500GB-1TB |
NVMe SSD storage from Space-Node's VPS hosting makes Nextcloud feel responsive. File browsing, thumbnail generation, and search all benefit from fast storage.
Useful Nextcloud Apps
| App | Purpose | |-----|---------| | Calendar | CalDAV calendar sync | | Contacts | CardDAV contact sync | | Notes | Markdown note-taking | | Talk | Video conferencing | | Collabora Online | Document editing (like Google Docs) | | Deck | Kanban boards | | Bookmarks | Bookmark sync across devices |
Nextcloud replaces Google Drive, Google Calendar, Google Contacts, Google Keep, and Google Meet - all self-hosted on your own VPS.
