Setting up Nextcloud
The official image plus a database container, then the setup wizard does the rest in the browser.
- 1
Run the containers
Nextcloud needs a real database for anything beyond casual use; MariaDB is the most common pairing.
services: nextcloud: image: nextcloud:latest container_name: nextcloud restart: unless-stopped ports: - "8081:80" volumes: - ./data:/var/www/html depends_on: - db db: image: mariadb:11 container_name: nextcloud-db restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD=change-this - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_PASSWORD=change-this-too volumes: - ./db:/var/lib/mysql - 2
Run the setup wizard
The first visit to port 8081 asks for an admin account and the database connection details, matching the environment variables set above.
- 3
Install the sync clients
Desktop apps for Windows, macOS, and Linux, plus mobile apps for iOS and Android, all point at this server's address and sync a chosen folder automatically, the same experience as Dropbox.
- 4
Add more apps as needed
The built-in App Store (gear icon → Apps) has official add-ons for Calendar, Contacts, and browser-based document editing (Nextcloud Office), each one turning this from file sync into a fuller productivity suite.
Further reading
- Nextcloud administration docs
Full setup and configuration reference, including performance tuning for larger installs.
- Nextcloud on Docker Hub
Official image documentation, including the available tags and reverse-proxy notes.