- Add request_terminate_timeout = PHP_MAX_TIME in start.sh: without this (default 0 = disabled) workers blocked on a slow DB query, stalled Redis connection, or hung syscall are never reaped. Over time they fill pm.max_children and Apache returns 502 Bad Gateway to the reverse proxy. - Set pm.process_idle_timeout = 300s in Dockerfile: the upstream default of 10 s kills all idle workers after a brief quiet period. The next request burst must then wait for fresh PHP-FPM forks; on a loaded host that spawn latency can push Apache past its FastCGI deadline and produce a 502. 300 s keeps a warm pool through normal desktop-sync polling cycles. - Add a dedicated 502 troubleshooting subsection to reverse-proxy.md documenting the six most common causes (proxy timeout, worker exhaustion, stuck workers, Redis session lock contention, container cold start, Caddy cert renewal) with actionable diagnostics. Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/2fd7a6d1-bfdb-4f26-a8d0-cd54a7307999 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Nextcloud All-in-One nextcloud Container
This folder contains the OCI/Docker container definition, along with associated resources and configuration files, for building the nextcloud container as part of the Nextcloud All-in-One project. This container hosts PHP and the Nextcloud Server application.
Overview
The Nextcloud container provides the core Nextcloud application environment, including the necessary dependencies and configuration for seamless integration into the All-in-One stack. The container hosts:
- The PHP SAPI/backend (php-fpm)
- Nextcloud background jobs and scheduled tasks, which are handled via cron
- Miscellaneous minor support services specific to AIO's Nextcloud deployment (health and exec)
Contents
- Dockerfile: Instructions for building the Nextcloud container image.
- Entrypoint script: The
start.shscript is used for container initialization and runtime configuration before starting supervisord. - Nextcloud configuration files: Specific to running in a containerized setting and/or within AIO.
- Supervisor: The
supervisord.conffile defines the long-running services hosted within the container (php-fpm, cron, etc.).
Usage
This container is intended to be used as part of the All-in-One deployment and is not meant to be used on its own. Among other requirements, it needs a web server container (which AIO provides in a dedicated Apache container). It is designed to be orchestrated by the All-in-One mastercontainer or used within an AIO Manual Installation or AIO Helm chart.
Documentation
Contributing
Contributions are welcome! Please follow the Nextcloud project's guidelines and submit pull requests or issues via the main repository.
License
This folder and its contents are licensed under the GNU AGPLv3, in line with the rest of Nextcloud All-in-One.