# Nextcloud on Coolify: production setup for a private cloud

> How to run Nextcloud on Coolify for a team: MariaDB or PostgreSQL instead of SQLite, Redis, system cron, a separate Collabora or ONLYOFFICE service, persistent volumes, and backups you can restore.

For AI agents: curated site map at [https://www.devolute.org/llms.txt](https://www.devolute.org/llms.txt). Canonical HTML (preferred for search engines): [https://www.devolute.org/en/insights/open-source/nextcloud-on-coolify](https://www.devolute.org/en/insights/open-source/nextcloud-on-coolify).

- Language: en
- Published: 2026-11-12
- Markdown URL: https://www.devolute.org/en/insights/open-source/nextcloud-on-coolify.md

## Nextcloud on Coolify

The template gives you a login. The drive stays up when the database, cron, office server, and data volume are production choices.

A team that already ships apps on **[Coolify](/en/agency/coolify-self-hosted-paas-consulting-deployment)** wants the shared drive on the same platform: files, desktop sync, and office editing on a server they control. Coolify’s Nextcloud service reaches a login quickly. The work that decides whether people keep using it is the database, the data volume, background jobs, and the office server behind Traefik.

For identity, OpenProject, and the wider Hub layout, use the **[Nextcloud enterprise integrations guide](/en/insights/open-source/nextcloud-enterprise-integrations-keycloak-openproject-ai)** and **[Nextcloud consulting](/en/agency/nextcloud-enterprise-consulting-integration-hosting)**.

## Which Coolify variant to start from

Coolify documents four Nextcloud configurations:

| Variant | Database | Use it for |
|---|---|---|
| **Default** | Embedded SQLite | A personal trial or a single-user test |
| **PostgreSQL** | PostgreSQL | A team drive when the rest of the Coolify estate is already Postgres |
| **MySQL** | MySQL | A team drive when MySQL is the estate standard |
| **MariaDB** | MariaDB | A team drive in the general case. Coolify recommends this variant for most users |

Concurrent desktop sync will lock an embedded SQLite file. A shared drive starts from the MariaDB or PostgreSQL service, then gains the pieces below. Coolify copies the Compose file into your service at creation time, so later catalog edits do not overwrite a stack you have already changed.

## What to add after the template

| Piece | Role on Coolify |
|---|---|
| **Nextcloud app** | The PHP application, published through Traefik or Caddy on the public hostname |
| **MariaDB or PostgreSQL** | The system database. Keep it on a persistent volume, off the build server |
| **Redis** | Memory cache and transactional file locking, so two clients cannot corrupt the same file |
| **Cron container** | Runs the image cron entrypoint on a schedule. This replaces webcron and AJAX cron |
| **Collabora Online or ONLYOFFICE** | Its own service and hostname. Nextcloud’s richdocuments or ONLYOFFICE app points at that host |
| **Notify Push** | Optional push channel so desktop and mobile clients stop polling for every change |
| **Persistent volumes** | App data, config, and the database. A redeploy that drops these volumes deletes the library |

Put Nextcloud and the office service on a server that is not the Coolify build node. Image builds on the same CPU will stall sync and spreadsheet sessions.

## Proxy headers, or the desktop client will refuse the host

Coolify terminates TLS on Traefik or Caddy. Nextcloud then sees plain HTTP from the proxy and, unless told otherwise, treats the public name as untrusted.

Set these in `config.php` for the hostname Coolify assigned:

- `trusted_domains` includes that public hostname
- `trusted_proxies` includes the proxy network
- `overwriteprotocol` is `https`
- `overwrite.cli.url` is the public `https://` URL, so cron and `occ` generate the same links the browser uses

Missing any one of these shows up as a redirect loop, mixed-content warnings in the office iframe, or a desktop client that rejects the server as an untrusted domain.

## Office editing is a second service

Collabora Online and ONLYOFFICE both need a public hostname, a WOPI allow-list that contains the Nextcloud domain, and enough memory for open documents. The small built-in CODE image that ships inside some Nextcloud trials is a demo. On Coolify, deploy Collabora or ONLYOFFICE as its own service and connect it from the Nextcloud app settings.

Choose Collabora when OpenDocument and server-side rendering matter. Choose ONLYOFFICE when the organisation lives in DOCX, XLSX, and PPTX. The same choice is spelled out on the **[Nextcloud agency page](/en/agency/nextcloud-enterprise-consulting-integration-hosting)**.

## Backups and image upgrades

Coolify can schedule a database dump to S3-compatible storage. That dump is the MariaDB or PostgreSQL half of Nextcloud. The files live on the data volume, or in object storage if you have moved primary storage to MinIO or Hetzner Object Storage. A restore needs both halves from the same moment. A database dump without the files, or a disk snapshot without the database, opens as an empty or inconsistent library.

Updating Coolify does not update containers you already deployed. Pin the Nextcloud image tag and upgrade it in its own window, together with the office server, so app versions stay compatible.

## Identity

Staff and member login can sit on **[Keycloak](/en/agency/keycloak-sso-implementation)** through Nextcloud’s `user_oidc` app (OIDC). Group mappings then drive team folders. Do that before people accumulate local Nextcloud accounts you will have to merge later.

## When Coolify is the right size

Coolify fits when the organisation already operates it, the drive is one instance, and the audience is a team or a few hundred people. TLS, Compose, and database backups stay in a tool the same engineers already use, without a Kubernetes control plane.

Move to a multi-node layout when sync queues, office sessions, or Talk calls fill that server: separate app servers, S3 primary storage, Redis, and a dedicated office cluster. That is the architecture on the **[Nextcloud consulting page](/en/agency/nextcloud-enterprise-consulting-integration-hosting)**.

## How Devolute helps

We place Nextcloud on Coolify in your private cloud, or run that server as a managed private cloud: MariaDB or PostgreSQL, Redis, cron, a separate office service, proxy headers, and a restore you have actually tried.

- Nextcloud Hub, SSO, and office: **[Nextcloud consulting and hosting](/en/agency/nextcloud-enterprise-consulting-integration-hosting)**
- The platform under it: **[Coolify consulting and setup](/en/agency/coolify-self-hosted-paas-consulting-deployment)**

## Related reading

- [Nextcloud enterprise integrations](/en/insights/open-source/nextcloud-enterprise-integrations-keycloak-openproject-ai)
- [Best self-hosted apps to deploy on Coolify](/en/insights/open-source/best-self-hosted-apps-to-deploy-on-coolify)
- [Coolify vs Dokploy vs CapRover vs Vercel](/en/insights/open-source/coolify-vs-dokploy-vs-caprover-vs-vercel)
