Nextcloud

Your Own Private Cloud Storage and Collaboration Platform

What is Nextcloud?

Nextcloud is a self-hosted productivity platform that keeps you in control of your data. It provides file sync and share capabilities similar to Dropbox, Google Drive, or OneDrive, but with complete privacy and ownership of your files.

Beyond simple file storage, Nextcloud offers a complete collaboration suite including calendars, contacts, task management, video calls, document editing, and hundreds of apps to extend functionality.

Whether you’re managing personal files, running a small business, or deploying enterprise-wide collaboration tools, Nextcloud gives you the freedom and security of self-hosting without sacrificing features.

Why Choose Nextcloud?

System Requirements

Minimum Requirements

  • CPU: 1 core (2+ cores recommended)
  • RAM: 512 MB minimum (2GB+ recommended)
  • Storage: 500 MB for Nextcloud + your data
  • Database: MySQL/MariaDB, PostgreSQL, or SQLite
  • Web Server: Apache, Nginx, or Caddy
  • PHP: Version 8.0 or higher

Recommended for Production

  • CPU: 4+ cores for better performance
  • RAM: 4GB+ (8GB for 100+ users)
  • Storage: SSD storage highly recommended
  • Database: MariaDB or PostgreSQL
  • Caching: Redis or Memcached for speed
  • SSL: Valid SSL certificate (Let’s Encrypt)

Installation Guide

Follow this step-by-step guide to install Nextcloud using Docker for easy deployment and maintenance.

1. Create Directory Structure

First, create directories to store Nextcloud data and configuration:

mkdir -p ~/nextcloud/{data,db,config}
cd ~/nextcloud

2. Create Docker Compose File

Create a docker-compose.yml file with the following configuration:

version: '3'

services:
  nextcloud-db:
    image: mariadb:10.11
    container_name: nextcloud-db
    restart: unless-stopped
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=your_root_password
      - MYSQL_PASSWORD=nextcloud_password
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    networks:
      - nextcloud-net

  nextcloud-redis:
    image: redis:alpine
    container_name: nextcloud-redis
    restart: unless-stopped
    networks:
      - nextcloud-net

  nextcloud:
    image: nextcloud:latest
    container_name: nextcloud
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./data:/var/www/html
      - ./config:/var/www/html/config
    environment:
      - MYSQL_HOST=nextcloud-db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud_password
      - REDIS_HOST=nextcloud-redis
    depends_on:
      - nextcloud-db
      - nextcloud-redis
    networks:
      - nextcloud-net

networks:
  nextcloud-net:
    driver: bridge

3. Start Nextcloud

Launch the Nextcloud stack with Docker Compose:

docker-compose up -d

4. Complete Web Setup

Open your browser and navigate to http://your-server-ip:8080. You’ll see the Nextcloud setup page:

  • Create an admin account with username and password
  • Click on “Storage & database” to expand database options
  • Select “MySQL/MariaDB”
  • Enter database details (user: nextcloud, password: nextcloud_password, database: nextcloud, host: nextcloud-db)
  • Click “Install” and wait for setup to complete

5. Configure Trusted Domains

If accessing Nextcloud via a domain name, add it to trusted domains. Edit the config file:

nano ./config/config.php

# Add your domain to the trusted_domains array:
'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'your-server-ip',
    2 => 'your-domain.com',
  ),

6. Enable HTTPS (Recommended)

For production use, set up a reverse proxy with SSL. Using Nginx:

server {
    listen 80;
    server_name your-domain.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name your-domain.com;

    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    client_max_body_size 512M;
    fastcgi_buffers 64 4K;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Quick Tips

Default Port: 8080 (HTTP)

Security: Always use HTTPS in production and change default passwords!

Performance: Enable Redis caching for better performance with multiple users.

Backups: Regularly backup the ./data and ./db directories!

Essential Configuration & Apps

Performance Optimization

Configure caching and background jobs for optimal performance:

# Add to config/config.php
'memcache.local' => 'OCMemcacheAPCu',
'memcache.distributed' => 'OCMemcacheRedis',
'memcache.locking' => 'OCMemcacheRedis',
'redis' => [
  'host' => 'nextcloud-redis',
  'port' => 6379,
],

Set up cron for background tasks:

docker exec -u www-data nextcloud php cron.php

Recommended Apps

Install these apps from the Nextcloud App Store (Settings → Apps):

  • Calendar: Full-featured calendar with CalDAV support
  • Contacts: Contact management with CardDAV
  • Tasks: Task and project management
  • Deck: Kanban-style project boards
  • Talk: Video calls and team chat
  • OnlyOffice/Collabora: Document editing
  • Passwords: Password manager
  • Notes: Markdown note-taking
  • Photos: Modern photo gallery

Client Apps & Sync

Desktop Clients

Download native sync clients for automatic file synchronization:

  • Windows 10/11
  • macOS 10.14+
  • Linux (AppImage, Snap, Flatpak)

Download Desktop Apps →

Mobile Apps

Access your files on the go with mobile apps:

  • iOS (iPhone/iPad)
  • Android
  • Auto-upload photos
  • Offline access

Get Mobile Apps →

WebDAV Access

Connect using WebDAV for universal file access:

https://your-domain.com/
remote.php/dav/files/USERNAME/

Compatible with file managers on all operating systems.

Advanced Features

User Management & Sharing

  • Create multiple users and groups
  • Set storage quotas per user
  • Share files/folders with users or groups
  • Create public share links with passwords
  • Set expiration dates on shares
  • Fine-grained permission controls

External Storage

Connect external storage sources to Nextcloud:

  • FTP/SFTP servers
  • Amazon S3, OpenStack Swift
  • Google Drive, Dropbox, OneDrive
  • SMB/CIFS network shares
  • WebDAV servers

Security Features

  • Two-factor authentication (TOTP, U2F)
  • End-to-end encryption for specific folders
  • Server-side encryption at rest
  • Brute-force protection
  • File access control lists
  • Audit logging and monitoring

Collaboration Tools

Work together seamlessly:

  • Real-time document collaboration
  • Comments on files and folders
  • File versioning and rollback
  • Activity feed and notifications
  • Shared calendars and address books

Maintenance & Troubleshooting

Regular Maintenance

Update Nextcloud to the latest version:

# Backup first!
docker-compose down
docker-compose pull
docker-compose up -d

Run maintenance commands:

# File system scan
docker exec -u www-data nextcloud php occ files:scan --all

# Clear cache
docker exec -u www-data nextcloud php occ maintenance:repair

Common Issues

Upload size limit too small:

Increase PHP upload limits by creating .user.ini in the data directory.

Slow performance:

Enable Redis caching and run background jobs via cron instead of AJAX.

Trusted domain error:

Add your domain/IP to the trusted_domains array in config.php.

Database issues:

Run database optimization: docker exec -u www-data nextcloud php occ db:add-missing-indices

Ready to Take Control of Your Data?

Deploy Nextcloud today and enjoy the freedom of self-hosted cloud storage and collaboration.

View All Self-Hosted Services Official Nextcloud Documentation

Nextcloud is open-source software. Visit nextcloud.com for more information and community support.