Special Offers: Up to 75% OFF on Hostinger & High-RAM Contabo Cloud VPS available this month.Compare Plans

How to Build a Private Cloud with Nextcloud on Contabo VPS (Complete Guide)

Marcus Sterling
Marcus SterlingCloud Infrastructure Specialist
October 08, 2026
•
16 min read
•
4.9 / 5.0
Transparency Notice: This article contains affiliate links to hosting providers like Hostinger and Contabo. If you purchase through our links, we may earn a commission at zero extra cost to you. We only recommend products we personally benchmark and test. Read full disclosure.
How to Build a Private Cloud with Nextcloud on Contabo VPS (Complete Guide)
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Contabo High-Performance Cloud VPS

Massive 4 vCPU cores, 8GB RAM, and 32TB monthly traffic. Ideal for Linux developers.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe

The Case for Self-Hosted Cloud Storage in 2026

Commercial cloud storage subscriptions like Google One and Dropbox Pro charge upwards of $10 to $20/month for 2TB of storage while scanning user documents and subjecting accounts to automated suspension. By pairing Nextcloud Hub with a Contabo Storage VPS, you can deploy your own private cloud featuring 1.6TB to 3.2TB of storage starting at just $5.50/month with zero per-user licensing fees.

Prerequisites

  • A Contabo Cloud or Storage VPS running Ubuntu 24.04 LTS.
  • A domain or subdomain pointed to your VPS IP (e.g. cloud.yourdomain.com).
  • Docker and Docker Compose installed.

Step 1: Setting Up the Docker Environment

Create a dedicated directory structure for your Nextcloud data, database, and Redis cache:

mkdir -p ~/nextcloud/{data,config,db,redis}
cd ~/nextcloud
nano docker-compose.yml

Step 2: Composing the Nextcloud Production Stack

To ensure high throughput and seamless file preview rendering, we will link Nextcloud with PostgreSQL 16, Redis (for memory caching and transactional file locking), and Nginx:

services:
  db:
    image: postgres:16-alpine
    restart: unless-stopped
    volumes:
      - ./db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud_user
      - POSTGRES_PASSWORD=YOUR_SUPER_SECURE_DB_PASSWORD

  redis:
    image: redis:alpine
    restart: unless-stopped
    command: redis-server --requirepass YOUR_REDIS_PASSWORD

  app:
    image: nextcloud:fpm-alpine
    restart: unless-stopped
    volumes:
      - ./data:/var/www/html/data
      - ./config:/var/www/html/config
    environment:
      - POSTGRES_HOST=db
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud_user
      - POSTGRES_PASSWORD=YOUR_SUPER_SECURE_DB_PASSWORD
      - REDIS_HOST=redis
      - REDIS_HOST_PASSWORD=YOUR_REDIS_PASSWORD
    depends_on:
      - db
      - redis

  web:
    image: nginx:alpine
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./data:/var/www/html/data:ro
      - /etc/letsencrypt:/etc/letsencrypt:ro
    depends_on:
      - app

Step 3: Launching Nextcloud & Background Cron Setup

Start the container stack in detached mode:

docker compose up -d
docker compose ps

Nextcloud performs background tasks (such as index refreshing, email notifications, and trash cleanup). Switch the background jobs from AJAX to system cron inside the container:

docker exec -u www-data -it nextcloud-app-1 php occ background:cron

Step 4: Memory Tuning & Chunking Uploads

Configure Nextcloud to handle massive multi-gigabyte video uploads by increasing the PHP memory limit and upload chunk size:

docker exec -u www-data -it nextcloud-app-1 php occ config:system:set default_phone_region --value="US"
docker exec -u www-data -it nextcloud-app-1 php occ config:system:set memcache.local --value="\OC\Memcache\APCu"
docker exec -u www-data -it nextcloud-app-1 php occ config:system:set memcache.distributed --value="\OC\Memcache\Redis"
docker exec -u www-data -it nextcloud-app-1 php occ config:system:set memcache.locking --value="\OC\Memcache\Redis"

Step 5: Enabling Server-Side File Encryption & Antivirus

Enhance file security by enabling Nextcloud's native server-side encryption module: docker exec -u www-data -it nextcloud-app-1 php occ app:enable encryption && docker exec -u www-data -it nextcloud-app-1 php occ encryption:enable. Additionally, install the ClamAV antivirus plugin to scan incoming uploads in real time.

Frequently Asked Questions (FAQ)

Can I sync Nextcloud with iPhone, Android, and macOS?

Yes. The official Nextcloud client is available free on iOS App Store, Google Play, and for Windows/macOS/Linux desktops with automatic camera roll backup.

How do I increase max upload file size in Nextcloud?

Edit your .user.ini inside the Nextcloud config volume and set upload_max_filesize=16G and post_max_size=16G.

Editorial Verdict: Pros & Cons

What We Love (Pros)

  • 100% data sovereignty and total ownership of your files, contacts, and calendars
  • Contabo Storage VPS provides up to 3.2TB of space for a fraction of Google Drive pricing
  • End-to-end encryption and multi-device desktop and mobile sync apps

Drawbacks (Cons)

  • Requires routine maintenance and offsite backup management
Best Hardware Value for TechsNo Contract Surcharges + High RAM

Deploy Your Contabo Cloud Server

Includes 4 vCPU Cores, 8GB RAM, 50GB NVMe SSD, and 32TB Outbound Traffic.

German Engineering & Data Centers
8 Strategic Global Locations
Fast NVMe Storage Array
Full Root & SSH Console Access
Starts From
$5.50 / mo
Special Affiliate Pricing
Claim Discount Now
Official Partner Link • Verified Safe
#Nextcloud#Contabo Storage VPS#Self-Hosted#Cloud Storage#Docker
Marcus Sterling

Written by Marcus Sterling

Cloud Infrastructure Specialist

Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.

Recommended Next Reads