diff --git a/.codespellignore b/.codespellignore index ab827362e..e2bbe946a 100644 --- a/.codespellignore +++ b/.codespellignore @@ -1,4 +1,5 @@ -SME -te +hasTable jus nin +SME +te diff --git a/admin_manual/ai/app_context_chat.rst b/admin_manual/ai/app_context_chat.rst index d62f3ecde..98af980c4 100644 --- a/admin_manual/ai/app_context_chat.rst +++ b/admin_manual/ai/app_context_chat.rst @@ -50,7 +50,7 @@ Installation ------------ 1. Make sure the :ref:`Nextcloud Assistant app` is installed -2. Setup a :ref:`Deploy Demon ` in AppAPI Admin settings +2. Setup a :ref:`Deploy Daemon ` in AppAPI Admin settings. HaRP is not supported yet, please use Docker Socket Proxy (DSP). 3. Install the *context_chat_backend* ExApp via the "Apps" page in Nextcloud, or by executing (checkout the readme at https://github.com/nextcloud/context_chat_backend for manual install steps) .. code-block:: diff --git a/admin_manual/ai/app_live_transcription.rst b/admin_manual/ai/app_live_transcription.rst index 919f443c8..ab2a872a5 100644 --- a/admin_manual/ai/app_live_transcription.rst +++ b/admin_manual/ai/app_live_transcription.rst @@ -13,8 +13,8 @@ Installation ------------ 1. Make sure the `Nextcloud Talk app `_ is installed. -2. Make sure the High-Performance Backend is installed and configured in Nextcloud Talk settings. See the `Nextcloud Talk install manual `_ for more information. -3. Setup a :ref:`Deploy Demon ` in AppAPI Admin settings. +2. Make sure the High-Performance Backend (latest or released after September 2025) is installed and configured in Nextcloud Talk settings. See the `Nextcloud Talk install manual `_ for more information. +3. Setup a :ref:`Deploy Daemon ` in AppAPI Admin settings. 4. Install the **live_transcription** app via the "Apps" page in Nextcloud, or by executing .. code-block:: diff --git a/admin_manual/configuration_files/file_versioning.rst b/admin_manual/configuration_files/file_versioning.rst index 273075a2a..7bd02fd5b 100644 --- a/admin_manual/configuration_files/file_versioning.rst +++ b/admin_manual/configuration_files/file_versioning.rst @@ -21,6 +21,20 @@ The Versions app never uses more than 50% of the user's currently available free space. If the stored versions exceed this limit, Nextcloud deletes the oldest file versions until it meets the disk space limit again. +Nextcloud manages file versions using a combination of on-save pruning and scheduled cleanup. This ensures that versions are retained while respecting storage quotas. + +During Version Creation +----------------------- + +Nextcloud automatically creates new file versions whenever a file is modified, allowing users to restore previous states when needed. After each new version is stored, the system automatically checks storage limits and retention rules. Versions are filtered according to the above pattern to keep representative versions and remove redundant ones. If the user’s quota is exceeded, auto-expiry is triggered. +When storage space runs low, Nextcloud sorts all versions from oldest to newest and removes the oldest ones first, while always preserving at least the two most recent versions to free up space. + +During the Regular Background Job +--------------------------------- + +Nextcloud runs a background cleanup task that automatically removes old file versions for each user. During this process, the system checks the user's version storage folder and identifies versions that are older than the configured maximum retention period or whose original files no longer exist. +When an outdated or orphaned version is found, it is safely deleted from both the filesystem and the version database to reclaim storage space and maintain consistency. + .. note:: Versions named by a user will never be deleted. You may alter the default pattern in ``config.php``. The default setting is @@ -30,12 +44,12 @@ You may alter the default pattern in ``config.php``. The default setting is Additional options are: -* ``D, auto`` - Keep versions at least for D days, apply expiration rules to all versions +* ``D, auto`` + Keep versions at least for D days, apply expiration rules to all versions that are older than D days -* ``auto, D`` - Delete all versions that are older than D days automatically, delete other +* ``auto, D`` + Delete all versions that are older than D days automatically, delete other versions according to expiration rules * ``D1, D2`` diff --git a/admin_manual/configuration_server/config_sample_php_parameters.rst b/admin_manual/configuration_server/config_sample_php_parameters.rst index b85915ded..27ecd6876 100644 --- a/admin_manual/configuration_server/config_sample_php_parameters.rst +++ b/admin_manual/configuration_server/config_sample_php_parameters.rst @@ -228,6 +228,26 @@ automatically by the installer. This example is for documentation only, and you should never use it because it will not work. A valid ``instanceid`` is created when you install Nextcloud. +serverid +^^^^^^^^ + + +:: + + 'serverid' => -1, + +This is a unique identifier for your server. + +It is useful when your Nextcloud instance is using different PHP servers. +Once it's set it shouldn't be changed. + +Value must be an integer, comprised between 0 and 1023. + +When config.php is shared between different servers, this value should be overriden with "NC_serverid=" on each server. +Note that it must be overriden for CLI and for your webserver. + +Example for CLI: NC_serverid=42 occ config:list system + passwordsalt ^^^^^^^^^^^^ @@ -884,6 +904,35 @@ Whether the rate limit protection shipped with Nextcloud should be enabled or no Defaults to ``true`` +ratelimit_overwrite +^^^^^^^^^^^^^^^^^^^ + + +:: + + 'ratelimit_overwrite' => [ + 'profile.profilepage.index' => [ + 'user' => ['limit' => 300, 'period' => 3600], + 'anon' => ['limit' => 1, 'period' => 300], + ] + ], + +Overwrite the individual rate limit for a specific route + +From time to time it can be necessary to extend the rate limit of a specific route, +depending on your usage pattern or when you script some actions. +Instead of completely disabling the rate limit or excluding an IP address from the +rate limit, the following config allows to overwrite the rate limit duration and period. + +The first level key is the name of the route. You can find the route name from a URL +using the ``occ router:list`` command of your server. + +You can also specify different limits for logged-in users with the ``user`` key +and not-logged-in users with the ``anon`` key. However, if there is no specific ``user`` limit, +the ``anon`` limit is also applied for logged-in users. + +Defaults to empty array ``[]`` + security.ipv6_normalized_subnet_size ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -2405,15 +2454,16 @@ enabledPreviewProviders :: 'enabledPreviewProviders' => [ - 'OC\Preview\BMP', - 'OC\Preview\GIF', - 'OC\Preview\JPEG', - 'OC\Preview\Krita', - 'OC\Preview\MarkDown', - 'OC\Preview\OpenDocument', 'OC\Preview\PNG', - 'OC\Preview\TXT', + 'OC\Preview\JPEG', + 'OC\Preview\GIF', + 'OC\Preview\BMP', 'OC\Preview\XBitmap', + 'OC\Preview\Krita', + 'OC\Preview\WebP', + 'OC\Preview\MarkDown', + 'OC\Preview\TXT', + 'OC\Preview\OpenDocument', ], Only register providers that have been explicitly enabled @@ -2425,29 +2475,36 @@ concerns: - ``OC\Preview\Font`` - ``OC\Preview\HEIC`` - ``OC\Preview\Illustrator`` + - ``OC\Preview\Movie`` - ``OC\Preview\MP3`` - ``OC\Preview\MSOffice2003`` - ``OC\Preview\MSOffice2007`` - ``OC\Preview\MSOfficeDoc`` - - ``OC\Preview\Movie`` - ``OC\Preview\PDF`` - ``OC\Preview\Photoshop`` - ``OC\Preview\Postscript`` - - ``OC\Preview\SVG`` + - ``OC\Preview\SGI`` - ``OC\Preview\StarOffice`` + - ``OC\Preview\SVG`` + - ``OC\Preview\TGA`` - ``OC\Preview\TIFF`` +The following providers are disabled by default, because they provide an alternative to the built-in providers: + - ``OC\Preview\Imaginary`` + - ``OC\Preview\ImaginaryPDF`` + Defaults to the following providers: - - ``OC\Preview\BMP`` - - ``OC\Preview\GIF`` - - ``OC\Preview\JPEG`` - - ``OC\Preview\Krita`` - - ``OC\Preview\MarkDown`` - - ``OC\Preview\OpenDocument`` - ``OC\Preview\PNG`` - - ``OC\Preview\TXT`` + - ``OC\Preview\JPEG`` + - ``OC\Preview\GIF`` + - ``OC\Preview\BMP`` - ``OC\Preview\XBitmap`` + - ``OC\Preview\Krita`` + - ``OC\Preview\WebP`` + - ``OC\Preview\MarkDown`` + - ``OC\Preview\TXT`` + - ``OC\Preview\OpenDocument`` metadata_max_filesize ^^^^^^^^^^^^^^^^^^^^^ diff --git a/admin_manual/groupware/calendar.rst b/admin_manual/groupware/calendar.rst index 69b4a95ae..a47230f4c 100644 --- a/admin_manual/groupware/calendar.rst +++ b/admin_manual/groupware/calendar.rst @@ -149,7 +149,7 @@ Run the following command to disable creating new federated calendar shares for sudo -E -u www-data php occ config:app:set dav enableCalendarFederation --type=bool --value=false -Note that existing shares will not be deleted when the feature is disabled. +Note that existing shares will be deleted when the feature is disabled as they will fail to sync. Trash bin --------- diff --git a/admin_manual/installation/system_requirements.rst b/admin_manual/installation/system_requirements.rst index 32d5d60f0..3f63c980e 100644 --- a/admin_manual/installation/system_requirements.rst +++ b/admin_manual/installation/system_requirements.rst @@ -40,6 +40,8 @@ For best performance, stability and functionality we have documented some recomm See :doc:`source_installation` for minimum PHP-modules and additional software for installing Nextcloud. +To ensure the full functionality of your Nextcloud, please make sure that the server can reach the :ref:`required remote systems`. + CPU Architecture and OS ^^^^^^^^^^^^^^^^^^^^^^^ A 64-bit CPU, OS and PHP is required for Nextcloud to run well. diff --git a/admin_manual/occ_command.rst b/admin_manual/occ_command.rst index a5e8fee3c..61be8b490 100644 --- a/admin_manual/occ_command.rst +++ b/admin_manual/occ_command.rst @@ -46,6 +46,7 @@ occ command Directory * :ref:`system_tags_commands_label` * :ref:`antivirus_commands_label` * :ref:`setupchecks_commands_label` +* :ref:`snowflakes_commands_label` * :ref:`share_operations_label` * `Debugging`_ @@ -2273,6 +2274,28 @@ Example output:: ✓ Internet connectivity ... +.. _snowflakes_commands_label: + +Snowflake IDs +------------- + +You can decode Snowflake IDs with occ:: + + sudo -E -u www-data php occ decode-snowflake + +Example output:: + + +--------------------+-------------------------+ + | Snowflake ID | 6768789079123765868 | + | Seconds | 1575981518 | + | Milliseconds | 50 | + | Created from CLI | no | + | Server ID | 441 | + | Sequence ID | 2668 | + | Creation timestamp | 3335258318.050 | + | Creation date | 2075-09-09 12:38:38.050 | + +--------------------+-------------------------+ + .. _share_operations_label: Share operations diff --git a/admin_manual/release_notes/upgrade_to_33.rst b/admin_manual/release_notes/upgrade_to_33.rst index 758417323..f5eeca928 100644 --- a/admin_manual/release_notes/upgrade_to_33.rst +++ b/admin_manual/release_notes/upgrade_to_33.rst @@ -15,3 +15,15 @@ Previews The preview provider for MP3 files, which reads cover images embedded in the files, is disabled by default for performance and stability reasons. See :doc:`../configuration_files/previews_configuration` for details on how to enable or disable the preview provider. + +Snowflake IDs +------------- + +This version of Nextcloud ships with `Snowflake IDs `_. Those IDs include the creation time of object, a sequence ID and a server ID. +The server ID should now be configured in your config.php file or using environment variables. See :doc:`../configuration_server/config_sample_php_parameters` for more information. + + +Default user agent for outgoing requests changed +------------------------------------------------ + +Starting with this release, the default user agent for requests done by the instance was changed from ``Nextcloud Server Crawler`` to ``Nextcloud-Server-Crawler/X.Y.Z``, where ``X.Y.Z`` is the current server version. diff --git a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_33.rst b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_33.rst index 54f397edd..4814f69fc 100644 --- a/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_33.rst +++ b/developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_33.rst @@ -25,9 +25,25 @@ Removed APIs - The global ``md5`` implementation is removed. It was deprecated since Nextcloud 20 and not used by Nextcloud anymore. If you still need a ``md5`` implementation you can just use some external package like `crypto-browserify `_. +- ``OC.AppConfig`` was deprecated since Nextcloud 16 and was now removed. Instead use ``OCP.AppConfig``. - The ``OC.SystemTags`` api was removed. If you need to get the list of system tags, check `this merge request `_ for how to fetch the tags directly. -- The `OCA.Sharing.ExternalLinkActions` API was deprecated in Nextcloud 23 and is now removed. - It was replaced with `OCA.Sharing.ExternalShareAction` which now have a proper API by using `registerSidebarAction` from `@nextcloud/sharing` instead. +- ``OC.set`` and ``OC.get`` were removed. Both are deprecated since Nextcloud 19. + For ``get``, if really needed, use `lodash get `_. + And for ``set``, use `lodash set `_. +- ``OC.redirect`` and ``OC.reload`` were removed. Both were deprecated since Nextcloud 17. + To replace ``OC.redirect`` directly use ``window.location``. + To replace ``OC.reload`` directly use ``window.location.reload``. +- ``OC.fileIsBlacklisted`` was removed. It was deprecated since Nextcloud 18. + The replacement is to use ``validateFilename`` from the `@nextcloud/files `_ package. +- The deprecated host methods from `OC` were deprecated since Nextcloud 17 and are now removed + + - To replace ``OC.getHost`` use ``window.location.host``. + - To replace ``OC.getHostName`` use ``window.location.hostname``. + - To replace ``OC.getPort`` use ``window.location.port``. + - To replace ``OC.getProtocol`` use ``window.location.protocol``. + +- The ``OCA.Sharing.ExternalLinkActions`` API was deprecated in Nextcloud 23 and is now removed. + It was replaced with ``OCA.Sharing.ExternalShareAction`` which now have a proper API by using ``registerSidebarAction`` from `@nextcloud/sharing `_ instead. Back-end changes ---------------- @@ -59,6 +75,11 @@ In this release support for PHP 8.1 was removed. Follow the steps below to make 3. If you have :ref:`continuous integration ` set up, remove PHP 8.1 from the matrices of tests and linters. +Default user agent for outgoing requests changed +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Starting with this release, the default user agent for requests done by the instance was changed from ``Nextcloud Server Crawler`` to ``Nextcloud-Server-Crawler/X.Y.Z``, where ``X.Y.Z`` is the current server version. + Added Events ^^^^^^^^^^^^ diff --git a/developer_manual/digging_deeper/index.rst b/developer_manual/digging_deeper/index.rst index 8d449e751..0f152d420 100644 --- a/developer_manual/digging_deeper/index.rst +++ b/developer_manual/digging_deeper/index.rst @@ -38,6 +38,7 @@ Digging deeper security settings setup_checks + snowflake_ids speech-to-text talk task_processing diff --git a/developer_manual/digging_deeper/snowflake_ids.rst b/developer_manual/digging_deeper/snowflake_ids.rst new file mode 100644 index 000000000..87725cb8f --- /dev/null +++ b/developer_manual/digging_deeper/snowflake_ids.rst @@ -0,0 +1,103 @@ +.. _snowflake_ids: + +============= +Snowflake IDs +============= + +.. versionadded:: 33 + +Nextcloud integrates a customized version of Snowflake IDs (https://en.wikipedia.org/wiki/Snowflake_ID). + +It allows to generates unique IDs in advance and also contains information about creation: + - creation time at millisecond precision + - identifier of server which created the ID. It's usually a hash of server hostname or random if not hostname found. + - whether the ID was created from CLI or not + +Store a Snowflake ID in database +-------------------------------- + +Snowflake IDs are designed to be used as primary key in database. +They should be stored as ``UNSIGNED BIGINT`` (64 bits integer, always positive) + +In Nextcloud migrations it looks like: + +.. code-block:: php + + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if (!$schema->hasTable('my_table')) { + $table = $schema->createTable('my_table'); + $table->addColumn( + 'id', + Types::BIGINT, + ['notnull' => true, 'unsigned' => true] + ); + $table->setPrimaryKey(['id']); + + // TODO Add other fields + } + + +Generate a Snowflake ID +----------------------- + +To generate a new ID, call ``nextId`` function on the generator: + +.. code-block:: php + + generator->nextId(); + + // TODO Create other properties and insert into database + } + } + + +Decode a Snowflake ID +--------------------- + +IDs can be decoded with ``occ snowflake:decode `` command. + +It’s also possible to decode IDs in your code, for example to get creation time of your object: + + +.. code-block:: php + + decoder->decode($this->id)['createdAt']; + } + } diff --git a/developer_manual/digging_deeper/task_processing.rst b/developer_manual/digging_deeper/task_processing.rst index b6bb33b02..23718cd94 100644 --- a/developer_manual/digging_deeper/task_processing.rst +++ b/developer_manual/digging_deeper/task_processing.rst @@ -14,7 +14,7 @@ Consuming the Task Processing API To consume the Task Processing API, you will need to :ref:`inject` ``\OCP\TaskProcessing\IManager``. This manager offers the following methods: * ``hasProviders()`` This method returns a boolean which indicates if any providers have been registered. If this is false you cannot use the TextProcessing feature. - * ``getAvailableTaskTypes(bool $showDisabled = false)`` This method returns an array of enabled task types indexed by their ID with their names and additional metadata. If you set ``$showdisabled`` to ``true`` (available since NC31), it will include disabled task types. + * ``getAvailableTaskTypes(bool $showDisabled = false)`` This method returns an array of enabled task types indexed by their ID with their names and additional metadata. If you set ``$showdisabled`` to ``true`` (available since NC31), it will include disabled task types. Since NC33 this will also include the ``isInternal`` field that signifies whether the task type is user-facing or intended for internal use only. * ``getAvailableTaskTypeIds()`` This method (available since NC32) returns a list of available task type IDs. It uses the same logic as ``getAvailableTaskTypes()`` but is faster because it does not compute the task types metadata (which can be slow when getting default field values or multiselect value lists). If you just want to check if a feature is available, prefer using this method rather than ``getAvailableTaskTypes()``. * ``scheduleTask(Task $task)`` This method provides the actual scheduling functionality. The task is defined using the Task class. This method runs the task asynchronously in a background job. * ``getTask(int $id)`` This method fetches a task specified by its id. @@ -530,6 +530,28 @@ If you would like to implement providers that handle additional task types, you } } +Internal task types +################### + +.. versionadded:: 33.0.0 + +Other apps and clients will assume that task types are user-facing and will display them on the frontend. If your custom +task types are not intended to be shown to users, you should implement the ``IInternalTaskType`` interface instead. This will +make sure that other apps and clients know not to show your custom task type to end users. + + +Triggerable providers +^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 33.0.0 + +Synchronous providers are executed automatically by a background job that will usually be targeted by a worker to make sure +that it runs almost instantly. ExApps on the other hand used to have to poll the server for new tasks. Since the introduction of triggerable +providers ExApps are now notified immediately of new tasks when they are scheduled. This is implemented via the ``ITriggerableProvider`` interface, +which adds an additional ``trigger(): void`` method to the provider interface which is called when a new task is scheduled for this provider and +there are no running tasks for it at the moment. Usually if you implement a provider in PHP you will not have to deal with this interface but it is documented +here for completeness. + Provider and task type registration ----------------------------------- diff --git a/index.html b/index.html index d6e21a28c..f32920818 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ - + @@ -167,7 +167,7 @@
  • Demo
  • Download
  • Buy
  • -
  • FAQ
  • +
  • FAQ
  • @@ -483,69 +483,75 @@