Skip to main content
Back to blog

Running Nextcloud as a Google Drive replacement

·3 min readSelf-Hosting

Google Drive is convenient. It syncs files, lets you share links, and works on every device. But your files live on Google's servers, scanned by Google's systems, subject to Google's terms of service. Nextcloud gives you the same functionality on your own hardware.

What Nextcloud does

Nextcloud is a self-hosted file sync and sharing platform. It handles file storage, sync clients for desktop and mobile, link sharing, collaborative document editing, calendar, contacts, and a growing list of apps through its plugin system.

The core experience is close to Google Drive: a web interface for browsing files, desktop clients that sync folders in the background, and mobile apps for access on the go.

Setting it up with Docker

services:
  nextcloud:
    image: nextcloud:stable
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - nextcloud_data:/var/www/html
    environment:
      - POSTGRES_HOST=db
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud
      - POSTGRES_PASSWORD=your-secure-password
    depends_on:
      - db
 
  db:
    image: postgres:16
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud
      - POSTGRES_PASSWORD=your-secure-password
 
volumes:
  nextcloud_data:
  db_data:

Run docker compose up -d, access it at http://your-server:8080, create an admin account, and you have a working Nextcloud instance.

Put a reverse proxy in front of it for HTTPS. With Caddy, that is two lines:

nextcloud.example.com {
    reverse_proxy localhost:8080
}

The sync clients

Install the Nextcloud desktop client on your computers. It works like Dropbox or Google Drive: pick a local folder, it stays in sync with the server. Changes on one machine appear on the other within seconds.

The mobile apps (iOS and Android) handle automatic photo upload, file browsing, and offline access to selected files. The photo upload replaced Google Photos backup for me, though I later moved to Immich for a better photo management experience.

Performance tuning

Out of the box, Nextcloud can feel slow. A few things that make a big difference:

Enable Redis for caching. Add a Redis container and configure Nextcloud to use it for file locking and memory caching. This dramatically improves the web interface responsiveness.

Use S3-compatible storage for the backend. I wrote a separate post about configuring Nextcloud with S3 primary storage. This offloads file storage to a scalable backend.

Enable server-side encryption only if you need it. Encryption adds CPU overhead to every file operation. If your storage is already on hardware you control, the encryption may not be necessary.

What it replaces and what it does not

Replaces well: File storage and sync, link sharing, contacts and calendar sync (via CalDAV/CardDAV), simple document editing with Collabora or OnlyOffice.

Does not replace well: Real-time collaborative editing (Google Docs is still better here), search (Nextcloud's search is basic compared to Google's), and the seamless integration between Google services.

The honest experience

Nextcloud is not as polished as Google Drive. The web interface is functional but not as fast. The mobile apps work but are not as refined. Occasionally something needs a restart or a config tweak.

What you get in return is complete control over your data, unlimited storage (limited only by your drives), and no monthly fee. For personal file storage and sync, the tradeoffs are worth it. For team collaboration, Google Workspace or similar is still a better experience.

Sources

Enjoying the blog? Subscribe via RSS to get new posts in your reader.

Subscribe via RSS