SpearhubSpearhub
Nextcloud Intermediate 30 minutesAugust 9, 2026

Host Your Own File Storage (Google Drive Alternative)

Set up Nextcloud on a VPS with Docker in 30 minutes. Get unlimited file storage, sharing, and sync without Google Drive subscription fees. No coding required.

Host Your Own File Storage (Google Drive Alternative)
Cost: $5/mo VPS
Time: 30 minutes
Level: Intermediate

Host Your Own File Storage (Google Drive Alternative)

Nextcloud is an open-source file storage and collaboration platform (GitHub | Official Website). Think of it as Google Drive, Dropbox, and Google Calendar combined into one system that you control completely. Your files live on your own server, not on someone else's cloud.

With 36,000+ GitHub stars and 15+ years of active development (forked from ownCloud in 2016), Nextcloud is the most mature self-hosted file platform available. Companies, universities, and governments use it to keep data under their own control.

The Problem: Cloud Storage Gets Expensive Fast

Google Drive charges $9.99/month for 2 TB. Dropbox Business costs $15/user/month. For a 10-person team needing 1 TB each, that's $1,200–$1,800/year — every single year. And you're trusting a third party with your business documents, client contracts, and financial records.

If Google changes their terms of service, raises prices, or suspends your account, your data is at their mercy. You also have no control over where your data physically lives, who accesses it internally, or whether it's used to train AI models.

Nextcloud flips this model: you buy a $5/month VPS, install Nextcloud once, and get unlimited storage limited only by your server's disk size. No per-user fees. No per-GB fees. No vendor lock-in.

What You Need

  • A VPS with at least 2 GB RAM, 50 GB disk, and Ubuntu 22.04/24.04 — we recommend Hetzner CX22 ($5.50/mo) or DigitalOcean Droplet ($6/mo)
  • A domain name (or subdomain) pointing to your VPS IP — e.g., files.yourbusiness.com
  • Docker and Docker Compose installed on the VPS
  • 30 minutes of your time
  • No coding skills required — just copy-paste commands

Step-by-Step Setup

Step 1: Prepare Your VPS

SSH into your server and update the system:

ssh root@your-server-ip
apt update && apt upgrade -y
apt install -y docker.io docker-compose-v2 curl git

Start and enable Docker:

systemctl enable docker
systemctl start docker

Step 2: Point Your Domain to the Server

Create an A record in your DNS provider (Cloudflare, Namecheap, GoDaddy, etc.):

Type:  A
Name:  files
Value: your-server-ip
TTL:   Auto

Wait 2–5 minutes for DNS propagation. Verify with:

dig files.yourbusiness.com +short

It should return your server's IP address.

Step 3: Create the Docker Compose File

Create a directory for your Nextcloud installation:

mkdir -p /opt/nextcloud
cd /opt/nextcloud

Create the docker-compose.yml file:

cat > docker-compose.yml << 'EOF'
services:
  db:
    image: mariadb:lts
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog
    volumes:
      - db_data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=change_this_root_password
      - MYSQL_PASSWORD=change_this_nc_password
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud
    restart: always
    ports:
      - 8080:80
    depends_on:
      - db
      - redis
    volumes:
      - nextcloud_data:/var/www/html
    environment:
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=change_this_nc_password
      - NEXTCLOUD_ADMIN_USER=admin
      - NEXTCLOUD_ADMIN_PASSWORD=change_this_admin_password
      - REDIS_HOST=redis
      - NEXTCLOUD_TRUSTED_DOMAINS=files.yourbusiness.com localhost

volumes:
  db_data:
  nextcloud_data:
EOF

Important: Change all three passwords before proceeding. Use strong, unique passwords.

Step 4: Start Nextcloud

cd /opt/nextcloud
docker compose up -d

This downloads the images and starts all containers. It takes 2–3 minutes on first run. Check the status:

docker compose ps

You should see three containers running: nextcloud-app-1, nextcloud-db-1, and nextcloud-redis-1.

Step 5: Set Up HTTPS with Caddy (Free SSL)

For HTTPS with automatic Let's Encrypt certificates, add a Caddy reverse proxy. Create a second compose file:

cat > /opt/nextcloud/Caddyfile << 'EOF'
files.yourbusiness.com {
    reverse_proxy localhost:8080
}
EOF

Run Caddy in a container alongside Nextcloud:

docker run -d \
  --name caddy \
  --restart always \
  --network host \
  -v /opt/nextcloud/Caddyfile:/etc/caddy/Caddyfile \
  -v caddy_data:/data \
  -v caddy_config:/config \
  caddy:latest

Caddy automatically provisions and renews SSL certificates via Let's Encrypt. Your Nextcloud instance is now accessible at https://files.yourbusiness.com.

Step 6: Complete the Web Setup

Open your browser and go to https://files.yourbusiness.com. Since we pre-configured the database and admin user in the compose file, you'll be taken directly to the login screen.

Log in with the admin credentials you set in the compose file. You'll see the Nextcloud dashboard — your private cloud storage is now live.

Step 7: Install Desktop and Mobile Apps

Nextcloud provides free sync clients for all platforms:

  • Desktop: Download from nextcloud.com/install for Windows, macOS, and Linux
  • Mobile: Search "Nextcloud" on the App Store or Google Play
  • Web: Access files in any browser at your domain

The desktop client works exactly like Google Drive's desktop app — files sync automatically in the background. The mobile app lets you upload photos, view documents, and share files on the go.

What This Gives You

  • Unlimited file storage — limited only by your server's disk size, not an arbitrary plan cap
  • File sharing — share files and folders with public links, password protection, and expiry dates
  • Calendar and contacts — sync across all your devices, replacing Google Calendar and Contacts
  • Document editing — collaborate on documents in real time with Nextcloud Office (integrated Collabora/LibreOffice)
  • Photo gallery — automatic face recognition, album creation, and timeline view
  • Two-factor authentication — built-in TOTP support, no extra plugins needed
  • End-to-end encryption — for sensitive folders you want encrypted on the client side
  • Federated sharing — share files with users on other Nextcloud instances (like email but for file sharing)
  • 200+ apps — add Mail, Tasks, Notes, Bookmarks, Passwords, and more from the built-in App Store
  • No per-user fees — add 5 users or 500 users, the cost stays the same

Cost Comparison: Nextcloud vs Cloud Storage

FeatureGoogle DriveDropbox BusinessNextcloud (Self-Hosted)
2 TB storage$9.99/mo$15/user/mo (unlimited)$5/mo VPS (disk-limited)
10 TB storage$49.99/mo$150/mo (10 users)$10/mo VPS (larger disk)
Per-user pricing$9.99/user (Workspace)$15/user$0 — unlimited users
Annual cost (5 users, 2TB)$599/year$900/year$60–120/year
Data location controlGoogle's serversDropbox's serversYour own server
End-to-end encryptionLimited (not default)NoYes, built-in
Calendar + ContactsSeparate appNot includedBuilt-in
Self-hosted / no lock-inNoNoYes
Open source / auditableNoNoYes (AGPLv3)

3-year savings for a 5-person team: Google Drive costs $1,800. Nextcloud on a $5/mo VPS costs $180. That's $1,620 in savings — and you own the infrastructure.

FAQ

Is Nextcloud really free?

Yes. Nextcloud is licensed under AGPLv3 — it's 100% free and open source. The only cost is your VPS hosting ($5–15/month depending on storage needs). There are no licensing fees, per-user costs, or feature paywalls. The community edition includes all core features. Nextcloud GmbH offers optional enterprise support subscriptions, but these are not required.

How much storage can I get?

As much as your server's disk allows. A $5/month VPS typically includes 40–80 GB. You can attach additional storage volumes (Hetzner volumes at $0.05/GB/month, DigitalOcean volumes at $0.10/GB/month). A 1 TB volume on Hetzner costs about $50/month — still cheaper than Google Drive's 2 TB plan and you can serve unlimited users from it.

Is it secure?

Nextcloud supports HTTPS (via Let's Encrypt), two-factor authentication, end-to-end encryption for sensitive folders, SAML/SSO integration, password-protected share links, and brute-force protection. It has a public bug bounty program on HackerOne. The AGPLv3 license means the code is publicly auditable. You control who has access — no third party can scan your files.

What happens if my server crashes?

Your data persists in Docker volumes, which survive container restarts and removals. For safety, set up automated backups using Nextcloud's built-in backup tools or BorgBackup (included in Nextcloud AIO). You can also use standard tools like rsync or rclone to back up the /var/www/html/data directory to another server or cloud storage provider.

Can I access Nextcloud from my phone?

Yes. Nextcloud has official mobile apps for iOS and Android — free, no ads. They support automatic photo upload, file browsing, offline access, document editing, and sharing. The apps connect to your server over HTTPS. You can also access Nextcloud through any mobile browser.

How many users can I add?

Unlimited. There are no per-user licensing fees. Performance depends on your server's RAM and CPU. A 2 GB VPS comfortably handles 10–20 active users with normal file usage. For 50+ users, upgrade to 4 GB RAM and consider adding Redis caching (already included in our compose file) and enabling APCu.

Can I migrate my existing Google Drive files?

Yes. Nextcloud has a Google Drive migration app available in the App Store (inside Nextcloud admin). It connects to your Google account via OAuth and imports your files while preserving folder structure. Alternatively, download your Google Drive files locally and use the desktop sync client to upload them to your Nextcloud instance.

What's the difference between Nextcloud and Nextcloud AIO?

Nextcloud AIO (All-in-One) is the official Docker-based installation method maintained by Nextcloud GmbH. It includes everything in one container: Nextcloud, PostgreSQL, Redis, Caddy (for HTTPS), and optional add-ons like Collabora Office, ClamAV antivirus, and full-text search. The manual Docker Compose approach we use above gives you more control and is lighter. AIO is best if you want maximum features with minimal configuration — it requires a single docker run command and includes a web-based setup wizard.

Too Complex? We Can Set This Up for You

If you'd rather not deal with Docker, DNS records, and SSL certificates, we'll handle the entire setup for you. You get a fully configured Nextcloud instance on your own VPS, with HTTPS, backups, and your team's accounts created.

One-time setup — $299–$499 (depending on your storage and migration needs). We install Nextcloud, configure HTTPS, set up user accounts, and migrate your existing files from Google Drive or Dropbox.

Monthly managed — $99–$199/month. We handle updates, backups, monitoring, and security patches. Your team just uses it — no server maintenance required.

6-month bundle — $1,499 (save ~$400). Full setup plus 6 months of managed hosting and support.

Get a quote →

We'll set this up for you

Our Implementation Support

Modular pricing — pick what you need. No long-term contracts.

One-Time Setup

$299–$499

We install and configure everything

Monthly Managed

$99–$199/mo

Updates, backups, monitoring

6-Month Bundle

$1,499

3 tools + training + support

Ready to Transform Your Business with AI?

Let's identify where AI can create the greatest impact across your business.