February 2, 2026Guides
How to Build a Private Cloud Storage with Nextcloud on VPS
Complete guide to setting up your own private cloud storage using Nextcloud on a VPS server. Learn how to create a secure, self-hosted alternative to Dropbox and Google Drive.

Nextcloud is a powerful, open-source platform that lets you build your own private cloud storage solution. Unlike public cloud services, Nextcloud gives you complete control over your data, ensuring privacy and security. This guide will walk you through setting up Nextcloud on your Hiddence VPS.
Why Choose Nextcloud?
- Complete data ownership: Your files stay on your server, not in third-party clouds
- Privacy protection: No data mining or tracking by cloud providers
- Cost-effective: One-time server cost vs. recurring subscription fees
- Full customization: Install apps and plugins to extend functionality
- Compliance: Meet GDPR and other data protection requirements
- Unlimited storage: Only limited by your server's disk space
Prerequisites
- A VPS server with at least 2GB RAM (4GB+ recommended)
- Ubuntu 20.04 or Debian 11+ installed
- Root or sudo access
- Domain name pointing to your server IP
- SSL certificate (Let's Encrypt recommended)
Installing Nextcloud
First, update your system and install required dependencies:
bash
apt update && apt upgrade -y
apt install -y apache2 mariadb-server libapache2-mod-php7.4 php7.4-gd php7.4-mysql php7.4-curl php7.4-mbstring php7.4-xml php7.4-zip php7.4-intl php7.4-bcmathSetting Up MySQL Database
bash
mysql -u root -p
CREATE DATABASE nextcloud;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
FLUSH PRIVILEGES;
EXIT;Downloading and Configuring Nextcloud
bash
cd /var/www/html
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip
chown -R www-data:www-data nextcloud
chmod -R 755 nextcloudConfiguring Apache Virtual Host
bash
nano /etc/apache2/sites-available/nextcloud.conf
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/nextcloud
<Directory /var/www/html/nextcloud>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
a2ensite nextcloud.conf
a2enmod rewrite headers env dir mime
systemctl restart apache2Key Features After Setup
- File synchronization across devices
- Collaborative document editing
- Calendar and contacts management
- Video conferencing with Talk
- Password manager integration
- Email client functionality
- App store with hundreds of extensions
Security Best Practices
- Enable two-factor authentication for all users
- Use strong passwords and enforce password policies
- Set up regular automated backups
- Keep Nextcloud and system packages updated
- Configure firewall to restrict access
- Use SSL/TLS encryption for all connections
- Enable file encryption at rest