Run a private Nextcloud file server in Docker without manually installing PHP, Apache, or their dependencies.
Wire up Nextcloud with a MariaDB container and a reverse proxy using Docker Compose for a production-ready self-hosted setup.
Deploy Nextcloud on a Raspberry Pi or other ARM device using one of the multi-architecture image variants.
Requires Docker and Docker Compose, a separate database container and named volumes are needed for a reliable production setup.
This repository provides the official Docker container image for Nextcloud, a self-hosted file storage and sharing platform. Nextcloud lets you store files, calendars, contacts, and email on your own server rather than a third-party cloud service, and access them from any device. The Docker image here packages Nextcloud so you can run it in a container environment without manually installing all its dependencies. There are two main variants of the image. The apache variant bundles a web server and is ready to use with a single command, exposing the application on port 80. The fpm variant is a slimmer option that runs only the PHP process and requires you to pair it with a separate web server container to handle incoming requests. Most people starting out will use the apache variant. By default, the container uses SQLite for its database, which works for small personal setups. For anything more serious, the README covers how to connect it to MySQL, MariaDB, or PostgreSQL, either by linking a database container or providing connection details through environment variables. Auto-configuration via environment variables also lets you skip the web-based setup wizard entirely on first run, supplying the admin username, password, and database settings upfront. Persistent data, meaning your uploaded files and configuration, lives in a Docker volume at /var/www/html. The README explains how to mount named volumes or host directories for each major folder, including the data directory, configuration, custom apps, and themes. This matters for upgrades and backups: if you do not mount a volume, your data is still preserved between container restarts, but managing upgrades becomes harder. The image supports multiple processor architectures, including standard 64-bit, several ARM variants for devices like Raspberry Pi, and others. A Docker Compose section in the README shows how to wire up Nextcloud together with a database container and optionally a reverse proxy, which is the recommended approach for anything beyond quick local testing.
← nextcloud on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.