Skip to content

docs(config): document missing admin-configurable config keys#59911

Open
miaulalala wants to merge 1 commit intomasterfrom
docs/config-sample-missing-keys
Open

docs(config): document missing admin-configurable config keys#59911
miaulalala wants to merge 1 commit intomasterfrom
docs/config-sample-missing-keys

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

Summary

Add documentation for config keys that are used in the server code but were absent from config.sample.php, making them invisible to admins and excluded from the auto-generated configuration reference.

Keys added:

User/auth settings:

  • allow_user_to_change_email (defaults true, falls back to allow_user_to_change_display_name)
  • auth_can_create_app_token (defaults true)
  • auth_onetime_token_validity (defaults 120s)
  • twofactor_enforced / twofactor_enforced_groups / twofactor_enforced_excluded_groups (managed via occ twofactorauth:enforce, documented here for direct config.php use)

Server/networking:

  • dns_pinning (defaults true, prevents DNS rebinding attacks)
  • pollinterval (defaults 60s, sync client poll frequency)
  • webdav-root (defaults remote.php/webdav)
  • registration_link (defaults nextcloud.com/register, shown on login page)
  • enable_avatars (defaults true)

App management:

  • app_install_overwrite (defaults [], bypass max-version check for listed apps)

Previews:

  • preview_format (defaults jpeg, jpeg/webp/png for Imaginary service)

File locking:

  • filelocking.enabled (defaults true, strongly discouraged to disable)

Config Lexicon:

  • lexicon.default.userconfig (set server-wide defaults for user config keys)
  • lexicon.default.userconfig.enforced (prevent users from overriding specific values)

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Add documentation for config keys that are used in the server code but
were absent from config.sample.php, making them invisible to admins and
excluded from the auto-generated configuration reference.

Keys added:

User/auth settings:
- allow_user_to_change_email (defaults true, falls back to allow_user_to_change_display_name)
- auth_can_create_app_token (defaults true)
- auth_onetime_token_validity (defaults 120s)
- twofactor_enforced / twofactor_enforced_groups / twofactor_enforced_excluded_groups
  (managed via occ twofactorauth:enforce, documented here for direct config.php use)

Server/networking:
- dns_pinning (defaults true, prevents DNS rebinding attacks)
- pollinterval (defaults 60s, sync client poll frequency)
- webdav-root (defaults remote.php/webdav)
- registration_link (defaults nextcloud.com/register, shown on login page)
- enable_avatars (defaults true)

App management:
- app_install_overwrite (defaults [], bypass max-version check for listed apps)

Previews:
- preview_format (defaults jpeg, jpeg/webp/png for Imaginary service)

File locking:
- filelocking.enabled (defaults true, strongly discouraged to disable)

Config Lexicon:
- lexicon.default.userconfig (set server-wide defaults for user config keys)
- lexicon.default.userconfig.enforced (prevent users from overriding specific values)

Signed-off-by: Anna Larch <anna@larch.dev>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala added this to the Nextcloud 34 milestone Apr 25, 2026
@miaulalala miaulalala requested a review from skjnldsv April 25, 2026 15:13
@miaulalala miaulalala self-assigned this Apr 25, 2026
@miaulalala miaulalala requested a review from a team as a code owner April 25, 2026 15:13
@miaulalala miaulalala requested review from ArtificialOwl, artonge and provokateurin and removed request for a team April 25, 2026 15:13
@miaulalala miaulalala added the 3. to review Waiting for reviews label Apr 25, 2026
@miaulalala miaulalala requested a review from come-nc April 25, 2026 15:13
@miaulalala miaulalala added the ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) label Apr 25, 2026
Comment thread config/config.sample.php
*
* Defaults to ``'remote.php/webdav'``
*/
'webdav-root' => 'remote.php/webdav',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only use I can find is in CoreCapabilities, does this actually have any effect?

Comment thread config/config.sample.php
Comment on lines +1483 to +1490
/**
* Allow installing apps that declare a maximum version requirement lower than
* the current Nextcloud version. List the app IDs to override.
*
* Use with care: apps may be incompatible with the current server version.
*
* Defaults to ``[]``
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it should be noted that applications enabled with app:enable --force end up in there?

Comment thread config/config.sample.php
Comment on lines 1534 to 1553
/**
* By default, Nextcloud can generate previews for the following filetypes:
*
* - Image files
* - Text documents
*
* Valid values are ``true``, to enable previews, or
* ``false``, to disable previews
*
* Defaults to ``true``
*/
/**
* ``true`` enables avatar support. Set to ``false`` to disable avatars
* server-wide, which also removes the avatar section from personal settings.
*
* Defaults to ``true``
*/
'enable_avatars' => true,

'enable_previews' => true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a copy paste issue here, documentation for enable_previews is not in the right place anymore.

Comment thread config/config.sample.php
Comment on lines +2714 to 2724
/**
* Enable transactional file locking. This prevents simultaneous processes
* from writing to the same files, which can cause data corruption.
* Disabling this is strongly discouraged unless you are using an external
* file locking provider.
*
* Defaults to ``true``
*/
'filelocking.enabled' => true,

'filelocking.ttl' => 60 * 60,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants