Nextcloud
A self-hosted collaboration server for files, sharing, calendars, contacts, communication, and installable applications.
Why consider Nextcloud?
Nextcloud Server is an open-source, self-hosted platform for storing, syncing, and sharing data like files, calendars, and contacts.
Learn Nextcloud by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide4 sections
Nextcloud Server provides a self-hosted platform that addresses the problem of data privacy and control. By deploying this open-source software, you can store your files, contacts, calendars, and more on a server of your choosing (Nextcloud README). It is designed for individuals and organizations who want to maintain absolute ownership over their information rather than relying on third-party cloud services. With Nextcloud, users can keep their files, contacts, calendars, and more synchronized amongst their devices (Nextcloud README), providing an experience similar to commercial cloud storage but fully under the administrator's control.
Deploying the Apache Image
The Nextcloud project provides official Docker images to simplify the deployment process. The apache image contains a full Nextcloud installation including an apache web server. It is designed to be easy to use and gets you running pretty fast (Docker Library Docs). This is often the quickest way to evaluate the software or set up a small instance.
To start the Nextcloud container using the Apache web server and map it to port 8080 on your host, use the following exact command:
$ docker run -d -p 8080:80 nextcloudAfter executing this command, the observable outcome is that you can access Nextcloud at http://localhost:8080/ from your host system. From there, you will be greeted by the initial setup wizard to create an administrator account and finalize the configuration.
Managing Storage and Databases
A key project-specific concept in Nextcloud is how it handles data persistence and database connections. By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database (Docker Library Docs). While SQLite requires no configuration, a dedicated database server like MariaDB or PostgreSQL is recommended for improved performance in multi-user environments.
Because Docker containers are ephemeral, you must configure volumes to retain your files across container restarts. To persist the main application folder, you can mount a named volume. The official documentation demonstrates this approach:
$ docker run -d \-v nextcloud:/var/www/html \nextcloudUsing this command ensures that your uploads, apps, and local configurations remain intact.
Using the Command-Line Interface
Administrators frequently need to perform maintenance tasks, such as managing users, repairing databases, or updating applications. Nextcloud provides a command-line tool named occ for these purposes. When running Nextcloud inside Docker, you must execute the command within the running container and as the correct web server user to avoid permission issues.
To use the Nextcloud command-line interface (aka. occ command), run the following:
$ docker exec --user www-data CONTAINER_ID php occBy passing --user www-data, you ensure that any files modified or created by the occ command inherit the correct ownership for the Apache web server to read and write them (Docker Library Docs).
Expanding the Platform
Nextcloud's architecture allows for significant expansion beyond basic file synchronization. The core server can be extended with hundreds of apps, integrating features like calendar management, contact synchronization, mail clients, and video chat directly into the self-hosted environment. This flexibility allows administrators to build a comprehensive collaboration suite tailored to their specific operational needs.
Related tools
More options with a similar category or technology profile.
MISP
Open source threat intelligence and cyber security information sharing platform.
Zulip Mobile
Official React Native mobile application for Zulip organized team chat.
Wire Server
End-to-end encrypted enterprise team communication, conferencing, and file sharing platform.
Signal Server
Enterprise-grade end-to-end encrypted messaging server infrastructure powering Signal.