# Nextcloud AIO

> All-in-one Nextcloud deployment with backup.

- Category: Storage & Backup
- Difficulty: intermediate
- Components: nextcloud-aio
- Tags: nextcloud, storage, sync, backup
- Source: https://docker.recipes/storage/nextcloud-aio

## Overview

Nextcloud All-in-One (AIO) is a comprehensive deployment solution that packages Nextcloud's self-hosted productivity platform with essential companion services into a single, automated Docker container setup. Unlike traditional Nextcloud installations that require manual configuration of databases, web servers, and optional services, Nextcloud AIO automatically deploys and manages a complete stack including PostgreSQL, Redis, Apache, Collabora Office, Nextcloud Talk, ClamAV antivirus, and automated backup systems through a unified management interface.

This AIO approach eliminates the complexity of coordinating multiple containers while providing enterprise-grade features out of the box. The master container acts as an orchestrator, dynamically spawning and managing additional containers based on your configuration choices through a web-based interface. Built-in backup functionality, automatic SSL certificate management via Let's Encrypt, and integrated security scanning create a production-ready environment that would typically require extensive manual setup and ongoing maintenance.

Nextcloud AIO targets organizations and individuals seeking a complete Google Workspace alternative without the operational overhead of managing separate database servers, caching layers, and application dependencies. Home users gain access to enterprise-level file sync and collaboration tools, while small businesses and teams get a scalable platform that grows from basic file storage to full productivity suite with video conferencing, document editing, and workflow automation through Nextcloud's extensive app ecosystem.

## Features

- Automated deployment of complete Nextcloud stack including PostgreSQL database, Redis caching, and Apache web server
- Built-in Collabora Office integration for real-time collaborative document editing directly in the browser
- Nextcloud Talk video conferencing and chat system with screen sharing and mobile apps
- ClamAV antivirus scanning for uploaded files with configurable scan policies and quarantine management
- Daily automated backups with configurable retention policies and one-click restore functionality
- Web-based AIO management interface for enabling/disabling services and monitoring system health
- Automatic SSL certificate generation and renewal through Let's Encrypt integration
- Built-in reverse proxy support with configurable domain validation and port mapping

## Use cases

- Small business file server replacement for teams migrating from Google Drive or Dropbox
- Remote team collaboration hub combining file sharing, video calls, and document co-editing
- Home lab enthusiasts wanting a complete productivity suite with minimal configuration complexity
- Educational institutions providing students and faculty with privacy-focused cloud storage and collaboration tools
- Healthcare or legal practices requiring HIPAA/GDPR compliant file storage with audit trails
- Development teams needing secure project file sharing with version control and client access portals
- Non-profit organizations seeking cost-effective alternatives to commercial cloud productivity suites

## Prerequisites

- Docker Engine 20.10+ with access to Docker socket for container orchestration
- Minimum 4GB RAM recommended for full AIO stack with Office and Talk services enabled
- Available ports 80, 8080, and 8443 for web interface, AIO management, and SSL respectively
- 50GB+ available disk space for Nextcloud data and backup storage requirements
- Domain name with DNS control for Let's Encrypt SSL certificate generation (production use)
- Basic understanding of Docker volume management for backup and data migration procedures

## docker-compose.yml

```yaml
services:
  nextcloud-aio:
    image: nextcloud/all-in-one:latest
    container_name: nextcloud-aio
    restart: unless-stopped
    volumes:
      - nextcloud_aio:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - "80:80"
      - "8080:8080"
      - "8443:8443"

volumes:
  nextcloud_aio:
```

## .env

```bash
# AIO manages everything automatically
```

## Usage notes

- Docs: https://github.com/nextcloud/all-in-one#readme
- AIO interface at https://localhost:8080 - get initial password from logs
- Docker socket access required for spawning additional containers
- Includes backup, Office, Talk, ClamAV - toggle in AIO interface
- For reverse proxy: set APACHE_PORT and SKIP_DOMAIN_VALIDATION
- Daily automatic backups to /mnt/docker-aio-config/backups

## Troubleshooting

- AIO interface shows 'Cannot connect to Docker daemon': Ensure Docker socket is properly mounted and Docker service is running
- Initial setup fails with domain validation errors: Set SKIP_DOMAIN_VALIDATION environment variable for local testing or ensure DNS points to server
- Collabora Office documents won't open: Check that sufficient memory is allocated and WOPI connections aren't blocked by firewall
- Backup restoration fails with permission errors: Verify backup files are owned by correct user ID and backup volume is properly mounted
- Nextcloud Talk calls fail to connect: Ensure required TURN server ports are open and properly configured in AIO interface
- High memory usage with multiple services: Disable unused components like ClamAV or Talk in AIO interface if not needed

