> For the complete documentation index, see [llms.txt](https://docs.fylr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fylr.io/for-administrators/readme/services.md).

# Services

In this section you can enable/disable various background services, like workflow emails, automatically recurring exports or the janitor who cleans up old data.

## E-Mail Notifications

This service sends emails such as welcome emails, collection share emails or emails triggered by workflows (if configured under "Tags & Workflows"). If not enabled, no emails will be send.

{% hint style="info" %}
Please make sure that you set up [emailing](/for-administrators/readme/email.md).
{% endhint %}

## Exporter

This service executes automated exports (if a schedule is defined for an export). If not enabled, scheduled exports will not be executed automatically.

## Custom-Data-Type Updater

This services automatically updates data stored in custom data type fields. For example: [GND](https://github.com/programmfabrik/easydb-custom-data-type-gnd), [Geonames](https://github.com/programmfabrik/easydb-custom-data-type-geonames) or [Getty](https://github.com/programmfabrik/easydb-custom-data-type-getty). If not enabled, the data that was copied into FYLR when linking to an external thesaurus will not be updated.

{% hint style="info" %}
For more configuration of each plugin, please see "Plugins".
{% endhint %}

## WebDAV

### Activate Hotfolder

Enable the checkbox to activate the [Hotfolder](/tutorials/how-to-set-up-the-hotfolder-and-file-system-connect.md) in collections.

### Waiting time in seconds before a new file is imported

To avoid importing files that have not yet been completely copied, the system checks after the specified waiting time whether the size of the file has changed. If not, the file is imported. The default is 15 seconds.

### Activate File System Connect

Enable the checkbox to activate the [File System Connect](/tutorials/how-to-set-up-the-hotfolder-and-file-system-connect.md) in collections.

## Janitor

This service regularly cleans up data.

### Active

Enable/Disable the Janitor.

Deletes all tokens (Access, Refresh, ...) for which:

* No `expired_at` is set (e.g. authorization codes)
* `expired_at` is in the past

`expired_at` is saved when the token is saved for the first time and is calculated based on the lifetime of the tokens; this is defined in the base configuration under "User Management" -> "OAuth Service" -> "Expiration Times" for the various token types.

And enables all the following:

### Settings for Files

Specify after how many days unused files should be deleted from the storage. Unused files include uploads never linked to a record and files whose record, historic-version, and export references have all been removed. Enter "0" to remove unused files with every janitor run (every 10 minutes).

{% hint style="danger" %}
Please note, this also applies to files which where uploaded but not yet been saved. We recommend to use at least an interval of 1 day.
{% endhint %}

### Settings for Exports and Downloads

Since fylr 6.35, these options are grouped under **Settings for Exports and Downloads** in the Janitor configuration. **Delete downloads after n days without a run** controls download retention for all users while the Janitor is active. It defaults to `1` day; clearing the field restores this default. Set it to `0` to make idle downloads eligible on the next Janitor pass. **Delete exports after n days without a run** sets a separate retention period for unscheduled exports, for all users. Leave it empty (the default) to keep exports indefinitely, or set it to `0` to make idle exports eligible on the next Janitor pass.

The period starts when the most recent run started, including failed runs and runs with no new output. For exports never run, it starts at creation. Rerunning an export resets the period; viewing it or downloading existing output does not. Scheduled exports and exports that are pending or processing are kept.

Cleanup removes the expired export or download, including its output references and transport links. File storage is reclaimed only when no other references remain and the separate file expiration setting allows deletion. Each file cleanup pass removes eligible historic file links, purges eligible deleted records, removes expired exports and downloads, and finally deletes unused files. Read-only storage stays protected.

### Settings for Objects

Control how the Janitor cleans up **deleted records** and the **files linked from historic versions** of records.

#### Final deletion after n days

Records that have been deleted are first only marked as deleted and can still be restored. Specify after how many days such a deleted record is **permanently** removed from the database and can no longer be restored. Enter "0" to purge deleted records with every janitor run (every 10 minutes).

#### Removing file links from historic versions

Over time, older versions in a record's change history keep their linked files. These settings free up storage by removing files from old versions:

* **Remove from historic versions after n days** — files are removed from a historic version once it is older than this many days.
* **Number of most recent historic versions to keep** — files in this many of the most recent versions are always kept, even if they are older than the age above.

### Allow overwriting in pools and object types

When this checkbox is enabled, the Janitor can be configured directly at the pool or object type. This is dependent on the pool management setting at the object type in the data model configuration.

{% hint style="info" %}
**Enabling the Overwrite option requires further activation and configuration** in Rights Management for the janitor to run.<br>
{% endhint %}

### Settings For Users

#### Archive Inactive Users After n Days

Specify after how many days user accounts that have not logged in should be archived. Enter "0" to archive inactive users with every janitor run (every 10 minutes).

{% hint style="info" %}
Attention: archived users will not be able to log in. Archived users can be re-activated but their collections will be deleted when archiving the user account.
{% endhint %}

#### Types of Users To Be Archived

Specify the types of users that should be automatically archived after the above specified number or days.

#### Delete Archived Users After n Days

Specify after how many days archived user accounts should be deleted. Enter "0" to delete archived users with every janitor run (every 10 minutes).

{% hint style="info" %}
Attention: deleted users will be removed from the system and can't be re-activated. This also includes the users collections. See also "[User Management](/for-administrators/readme/user-management.md)".
{% endhint %}

### Settings For Events

Specify after how many days the individual events should be deleted. Enter "0" to delete the events with every janitor run (every 10 minutes).

#### Delete IP Address From Events After n Days

Specify after how many days the IP addresses of users should be deleted from the events. Enter "0" to delete the IP address with every janitor run (every 10 minutes).

### Orphaned terms and custom data

{% hint style="info" %}
From fylr **6.35.0**.
{% endhint %}

Two janitor tasks remove what a purge or a re-saved record leaves behind:

* **terms\_delete** removes terms that no record links to any more and takes them out of the suggest index, so word suggestions stop offering values that no record carries.
* **custom\_data\_delete** removes custom data entries that no field value refers to any more, so the [custom-data-type updater](#custom-data-type-updater) stops refreshing entries nobody uses.

Both only take rows older than **one hour**: a term or custom data entry is created before the record that references it is committed, and the age gate keeps a sweep from removing a row a save is about to reference. Existing rows count as old after the upgrade, so the first runs clear the backlog in batches.

The next batch of both is listed on `/inspect/system/janitor/`, where they can be run by hand. A manual run may carry a `run_time` (RFC 3339): every age gate of that run then treats the given instant as "now", which is how a test drives the sweeps past the hour.

## OpenAPI

fylr describes its API as a machine-readable [OpenAPI](https://www.openapis.org/) specification, served at `/api/v1/system/openapi/spec.json`. It is used to render the API documentation and to feed API tooling and client generators.

Enable this service to make the specification endpoint reachable **without authentication**, so it can be fetched anonymously. If not enabled, the endpoint requires a logged-in user.
