From 5a17a8167a861bfe1d26eb761da56c5fd82a63fb Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Mar 2026 10:46:08 -0500 Subject: [PATCH 1/3] docs(config): improve the `datadirectory` parameters sample entry More context and clarity: contents, with object stores, multiple app nodes, moving/changing Signed-off-by: Josh --- config/config.sample.php | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index f85a1da6a5be5..4e7eb4d647bbf 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -105,12 +105,37 @@ 'cookie_domain' => '', /** - * Where user files are stored. The SQLite database is also stored here, when - * you use SQLite. + * The Nextcloud data directory stores user data, app-managed data, and other + * instance-scoped data. + * + * In standard local-storage deployments, user and team files are stored here. * - * Default to ``data/`` in the Nextcloud directory. + * When using object store primary storage, file payloads are stored in object + * storage, while the data directory is still used for instance-scoped data. + * + * Examples of instance-scoped data: + * + * - ``appdata_*`` managed by Nextcloud and apps (e.g., previews, generated assets, file-based app data) + * - Logs by default (e.g., ``nextcloud.log``), unless overridden per log type + * - Updater files when using the built-in Updater to deploy code updates + * - If using SQLite, the SQLite database file + * + * Nextcloud expects a ``.ncdata`` marker file here and writes access-protection + * rules to ``.htaccess`` file (Apache-based setups). Do not remove them. + * + * In clustered deployments, every node in the same instance must use the same + * ``datadirectory`` (shared storage mounted at the same path). + * + * WARNING: Changing this path after deployment requires a controlled migration to avoid + * breakage. If you must change it, see: + * https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#moving-the-data-directory-changing-the-datadirectory-path + * + * Must be an absolute filesystem path. + * For added security, place it outside the web server document root. + * + * Defaults to ``data/`` inside the Nextcloud installation root. */ - 'datadirectory' => '/var/www/nextcloud/data', + 'datadirectory' => '/var/www/html/data', /** * The current version number of your Nextcloud installation. This is set up From 6a67ef651ceb4a4b8eba3cd5b47dfe062a41c6db Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Mar 2026 11:05:32 -0500 Subject: [PATCH 2/3] chore(config): make cs happy Signed-off-by: Josh --- config/config.sample.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.sample.php b/config/config.sample.php index 4e7eb4d647bbf..b8d1506366f8a 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -107,7 +107,7 @@ /** * The Nextcloud data directory stores user data, app-managed data, and other * instance-scoped data. - * + * * In standard local-storage deployments, user and team files are stored here. * * When using object store primary storage, file payloads are stored in object From 5babaf9f79026705136d054ef39c82153a5ec6e4 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 16 Mar 2026 11:11:30 -0400 Subject: [PATCH 3/3] docs(config): improve entry for datadirectory Signed-off-by: Josh --- config/config.sample.php | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/config/config.sample.php b/config/config.sample.php index b8d1506366f8a..f91382bbc549f 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -105,33 +105,36 @@ 'cookie_domain' => '', /** - * The Nextcloud data directory stores user data, app-managed data, and other - * instance-scoped data. + * The Nextcloud data directory is the default storage point for all user files, + * app-managed file-based data, and other instance-scoped data. * - * In standard local-storage deployments, user and team files are stored here. + * In local-storage deployments, user files and app-managed data are stored here. * - * When using object store primary storage, file payloads are stored in object - * storage, while the data directory is still used for instance-scoped data. + * In object store (primary storage) deployments, user files and app-managed data + * are stored only in the object store. However, the data directory is still + * required for instance validation and backwards compatibility, even if it is + * rarely written to. * * Examples of instance-scoped data: * - * - ``appdata_*`` managed by Nextcloud and apps (e.g., previews, generated assets, file-based app data) - * - Logs by default (e.g., ``nextcloud.log``), unless overridden per log type - * - Updater files when using the built-in Updater to deploy code updates - * - If using SQLite, the SQLite database file + * - ``.ncdata``: Marker file for instance validation (created by Nextcloud). + * - ``.htaccess`` and ``index.html``: Access protection (created by Nextcloud). + * - Logs: Default location unless overridden via ``logfile`` (and similar settings). + * - Updater: Files used by the built-in Updater, unless overridden via ``updatedirectory``. + * - Database: If using SQLite. * - * Nextcloud expects a ``.ncdata`` marker file here and writes access-protection - * rules to ``.htaccess`` file (Apache-based setups). Do not remove them. + * Nextcloud validates the contents of this directory during server checks: Do + * not remove ``.ncdata`` or ``.htaccess``, regardless of your storage backend. * - * In clustered deployments, every node in the same instance must use the same - * ``datadirectory`` (shared storage mounted at the same path). + * In clustered deployments not utilizing object storage, every node must mount + * the same shared storage at this exact path. * - * WARNING: Changing this path after deployment requires a controlled migration to avoid - * breakage. If you must change it, see: + * WARNING: Changing this path after installation requires a controlled migration to avoid + * breakage. See: * https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#moving-the-data-directory-changing-the-datadirectory-path * - * Must be an absolute filesystem path. - * For added security, place it outside the web server document root. + * Must be an absolute filesystem path. For added security, place it outside + * the web server document root. * * Defaults to ``data/`` inside the Nextcloud installation root. */