A configurable Docker environment for organizations and teams running their own Nextcloud. Maintained by LibreCode, this repository combines the Nextcloud application, web server, caching, and database integration in a deployment you can adapt to your infrastructure.
- Control upgrades. Choose a specific Nextcloud major and plan upgrades instead of unexpectedly moving to a new major.
- Keep deployment choices open. Use Docker Compose with Nginx, Redis, PostgreSQL, and optional Garage S3 storage.
- Use tested image channels. Published application images follow supported Nextcloud releases; image builds go through vulnerability scanning and runtime checks before publication.
- Separate production from development. Versioned stable images and the
master-fpmdevelopment channel serve different needs.
This project is intended for teams that manage their own infrastructure or deliver Nextcloud as a service. It provides deployment tooling, not a hosted Nextcloud subscription.
You need Docker Engine with Docker Compose, a domain for public access, and a reverse proxy. This example uses the LibreCode Nginx proxy; the PostgreSQL Compose extension is included in this repository.
cp .env.example .env
# Edit .env: domain, credentials, administrator account, and your Nextcloud version.
docker network create reverse-proxy
docker network create postgres
docker compose -f docker-compose.yml -f docker-compose-postgres.yml pull
docker compose -f docker-compose.yml -f docker-compose-postgres.yml up -dThe external reverse-proxy network must have a configured proxy attached. Set up the proxy and DNS before expecting HTTPS to work. For production, review the PostgreSQL version in the Compose example, your backup strategy, and volume migrations.
For environment variables, existing deployments, storage options, and troubleshooting, see the deployment guide.
Set NEXTCLOUD_VERSION in .env to select the published LibreCode application image tag for both app and cron. The web service uses the independent nextcloud-docker-web:main image. The default Compose deployment does not build images locally.
The sample .env.example uses the moving stable-fpm channel. Set NEXTCLOUD_VERSION to a maintained major-specific tag (for example, 35-fpm) before production deployment so a future image pull does not switch Nextcloud majors unexpectedly.
Prebuilt LibreCode application images use versioned tags, such as:
ghcr.io/librecodecoop/nextcloud-docker-app:35-fpm
For production, pin a Nextcloud major or an OCI digest and plan major upgrades deliberately. The moving :latest and :stable-fpm aliases can switch to a newer major; they are not safe defaults for unattended production upgrades.
See image names, tags, and upgrade policy for the complete image options.
| Guide | Purpose |
|---|---|
| Deployment and customization | Installation, configuration, storage, PHP tuning, and logs |
| Container images | Available image tags, compatibility, and safe upgrades |
| Nextcloud Talk | Additional services for Talk |
| Development commands | The bin/ncdd interface for local development |
| Image maintenance | Version discovery, workflows, CI checks, and release publication |