From 1ceb2a009fc62d6241883f0119515f4dbb1c5ef7 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sun, 19 May 2024 14:37:29 -0700 Subject: [PATCH] Update nextcloud docs to better address config manipulation --- fighter/config/nextcloud/README.md | 56 ++++++++++++++++++++++++++- fighter/config/nextcloud/default.conf | 2 +- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/fighter/config/nextcloud/README.md b/fighter/config/nextcloud/README.md index b8c6892..06be4c4 100644 --- a/fighter/config/nextcloud/README.md +++ b/fighter/config/nextcloud/README.md @@ -1,4 +1,32 @@ -# Config Snippets for `config.php` +# Config Snippets for `default.conf` Nginx config +The Nginx server inside the container manages many aspects of connectivity for the Nextcloud server. +The `default.conf` here is for reference only. +The effective `default.conf` file is located at: `/config/nginx/site-confs/default.conf`. + + +## Increase Upload Limits +In the `server {` block: +```conf +client_max_body_size 50G; +client_body_timeout 600s; +``` + +# Config Snippets for `php-local.ini` PHP config override +It seems the preferred mode for modifying Nextcloud's PHP config is via `php.ini`, located at `/config/php/php-local.ini`. + +## Increase Upload Limits +```ini +upload_max_filesize = 8192M +post_max_size = 8192M +max_execution_time = 600 +``` + +## Increase PHP Memory Limit +```ini +memory_limit = 4G +``` + +# Config Snippets for `config.php` PHP config The Nextcloud server is configured via `config.php` at `$DOCKER_DATA/config/www/nextcloud/config/`. We make changes to this file manually, and then restart or recreate the container to apply the changes. All configuration parameters are contained in the ` 0.0, 'password' => '', // Optional, if not defined no password will be used. ), +``` + +## HEIC Image Previews +```php + 'enable_previews' => true, + 'enabledPreviewProviders' => + array ( + 'OC\Preview\PNG', + 'OC\Preview\JPEG', + 'OC\Preview\GIF', + 'OC\Preview\BMP', + 'OC\Preview\XBitmap', + 'OC\Preview\MP3', + 'OC\Preview\TXT', + 'OC\Preview\MarkDown', + 'OC\Preview\OpenDocument', + 'OC\Preview\Krita', + 'OC\Preview\HEIC', + ), +``` + +## Increase Upload Limits +```php + upload_max_filesize = 2048M + post_max_size = 2048M + max_execution_time = 200 ``` \ No newline at end of file diff --git a/fighter/config/nextcloud/default.conf b/fighter/config/nextcloud/default.conf index bc7fe2d..fa1f018 100644 --- a/fighter/config/nextcloud/default.conf +++ b/fighter/config/nextcloud/default.conf @@ -22,7 +22,7 @@ server { # set max upload size and increase upload timeout: client_max_body_size 512M; - client_body_timeout 300s; + client_body_timeout 300s; fastcgi_buffers 64 4K; # Enable gzip but do not remove ETag headers