docker
docker copied to clipboard
Support setting important system configuration values during Docker initialization
When deploying Nextcloud using the official Docker image, certain important system configuration values are not set by default, resulting in warnings or suboptimal behavior even after a clean installation. Two common examples are:
- maintenance_window_start
Fresh installations display this warning in the system overview: "Server has no maintenance window start time configured."
There is currently no way to set this value during the Docker-based setup. Instead, it must be configured manually via OCC:
./occ config:system:set maintenance_window_start --type=integer --value=1 - default_phone_region
Fresh installations display in the system overview: "Your installation has no default phone region set"
There is currently no way to set this value during the Docker-based setup. Instead, it must be configured manually via OCC:
./occ config:system:set default_phone_region --value="DE"
Expected Behavior
A fresh Nextcloud Docker installation should result in a fully configured, clean state, without requiring manual OCC calls for essential system settings.
Proposed Solution A
Introduce environment variables that allow setting all values at container startup which can result in warnings or messages on the "Security & setup warnings" page.
environment:
- NEXTCLOUD_DEFAULT_PHONE_REGION=DE
- NEXTCLOUD_MAINTENANCE_WINDOW_START=1
Proposed Solution B
Offer a documented and supported way to inject occ commands during first-time initialization.
Impact
- Reduces post-installation steps
- Improves automation and reproducibility
- Avoids confusing warnings for new users
- Aligns with Docker/container best practices
Thanks for your time and for maintaining the Docker image!