> For the complete documentation index, see [llms.txt](https://ciusji.gitbook.io/luden/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ciusji.gitbook.io/luden/configuration/configuration.md).

# Configuration

If **Luden Server** is deployed in a standalone mode, it could be configured via single YAML file (read more about deployment options [here](/luden/quickstart/building-from-source.md)). The most popular options can be defined as [environment variables](/luden/quickstart/deploying-with-docker.md) too. We're aiming to make Luden 100% configurable with env variables, but we're not there yet. Besides, you can host Jitsu config file on external storage - S3, MinIO, HTTP, etc.

We follow convention over configuration so the majority of parameters are optional. To get a base file, clone it from [GitHub](https://github.com/GuinsooLab/luden).

## Redis <a href="#redis" id="redis"></a>

**Luden Server** requires [Redis](https://redis.io/). Luden can run without it, however it will work in single-node mode without synchronization, queue persistence, and other high-availability features. It's good enough for development, but not recommended for production.

Redis version 5 and higher are supported. Here's a full list of features that **will not** work if Redis is not available

* Last events caching (see [Events Cache](/luden/features/event-cache.md))
* Sources synchronization (see [Sources Configuration](/luden/configuration/sources-conf.md))
* Retroactive Users Recognition
* [Coordination](/luden/quickstart/scaling-luden-server.md).

Redis credentials should be put into to `meta.storage.redis` section (see below)

## Configuration file structure <a href="#configuration-file-structure" id="configuration-file-structure"></a>

Luden config file consists of the following sections:

* `server` — General configuration parameters such as port, application logs configuration, singer bridge configuration, etc.
* `geo` — Geo-resolution data (extracting city/state information from the IP address). We currently only support [MaxMind](https://www.maxmind.com/en/home) as a data provider. see [Geo Data resolution](/luden/features/geo-data-resolution.md)
* `log` — Jitsu writes all events locally and sends them to their destinations (in batch mode). This is where you configure your local temporary path and push frequency.
* `sql_debug_log` — All SQL statements such as DDL and DML expressions can be stored in separate log files or in stdout.
* `api_keys` — A set of API Keys objects that identify incoming events JSONs and mapping between destinations is done based on them. see [Authorization](/luden/configuration/authorization.md) page
* `destinations` — A set of targets where the final version of events will be stored. see [Destinations Configuration](/luden/configuration/destinations-conf.md)
* `sources` — A set of data sources to synchronize from. see [Sources Configuration](/luden/configuration/sources-conf.md)
* `users_recognition` — Luden can update past events with user identifiers on user's identification event!&#x20;
* `coordination` — coordination service configuration. It is used in cluster Jitsu deployments. see [Scaling Luden](/luden/quickstart/scaling-luden-server.md)
* `notifications` — notifier configuration. Server starts, system errors, synchronization statuses, and panic information will be sent to it. Currently, only Slack notifications are supported.
* `meta.storage` - meta storage is the main application storage and it is required for some features. At present, Luden supports only Redis version 5 and higher.
* `ui.base_url` – base Configurator UI URL for generating links in notifications
* `node` – node.js process pool size and max heap space in megabytes per process (`node` is used to execute JavaScript transformations and plugins).

**Example**:

```yaml
server:
  name: instance1.domain.com
  port: 8081
  public_url: https://instances.domain.com
  log:
    path: /home/eventnative/data/logs/
  metrics.prometheus.enabled: true

geo.maxmind_path: /home/eventnative/data/config

log:
  path: /home/eventnative/data/logs/events
  rotation_min: 5

sql_debug_log:
  ddl:
  queries:

api_keys:
  - id: my_website_key
    client_secret: '193b6281-f211-47a9-b384-102cf4cd2d55'
    server_secret: 'a6880b16-73d0-476e-840a-804b74f7684d'

destinations:
  redshift:
  bigquery:

sources:
  facebook:
  google_analytics:

users_recognition:
  enabled: true

coordination:
  type: redis

notifications:
  slack:
    url: https://slack_web_hook_url

ui:
  base_url: https://your_configurator_ui_host:5555

meta:
  storage:
    redis:
      host: redis_host
      port: 6379
      password: secret_password
      database: 0

node:
  pool_size: 1 # default
  max_space: 100 # default
```

{% hint style="info" %}
You can set ${env.OS\_ENV\_VAR\_NAME} to any configuration parameter in YAML file. Jitsu will get the value from OS ENV (with name OS\_ENV\_VAR\_NAME from the example).
{% endhint %}

## Server <a href="#server" id="server"></a>

All fields from the **server** section are optional:

<table><thead><tr><th width="182">Field</th><th width="123">Type</th><th width="278">Description</th><th>Default value</th></tr></thead><tbody><tr><td><strong>name</strong></td><td>string</td><td>Unique instance name. It is used in cluster deployments.</td><td><strong>unnamed-server</strong></td></tr><tr><td><strong>port</strong></td><td>int</td><td>TCP port for the server to listen on.</td><td><code>8001</code></td></tr><tr><td><strong>public_url</strong></td><td>string</td><td>Service public URL. It is used on the welcome HTML page.</td><td>Will be got from <code>Host</code> request header</td></tr><tr><td><strong>log.path</strong></td><td>string</td><td>Path to application logs. If not set, app logs will be in stdout.</td><td>-</td></tr><tr><td><strong>log.rotation_min</strong></td><td>int</td><td>Log files rotation minutes. If <strong>log.path</strong> is configured.</td><td>-</td></tr><tr><td><strong>api_keys_reload_sec</strong></td><td>int</td><td>If an URL is set in <strong>api_keys</strong> section, authorization will be reloaded every <strong>api_keys_reload_sec</strong> seconds. see <a href="/pages/JSSs2hrKv6ummaWdM46k">Authorization</a> page.</td><td><code>1</code></td></tr><tr><td><strong>destinations_reload_sec</strong></td><td>int</td><td>If an URL is set in <strong>destinations</strong> section, destinations will be reloaded every <strong>destinations_reload_sec</strong> seconds. see <a href="/pages/INCCzV7oVzWXkHEV1aT2">Destinations</a>.</td><td><code>1</code></td></tr><tr><td><strong>sources_reload_sec</strong></td><td>int</td><td>If an URL is set in <strong>sources</strong> section, sources will be reloaded every <strong>sources_reload_sec</strong> seconds. </td><td><code>1</code></td></tr><tr><td><strong>admin_token</strong></td><td>string</td><td>see <a href="/pages/b8giCSoZnocjwBW6Svwr">Admin Endpoints</a> page.</td><td>-</td></tr><tr><td><strong>metrics.prometheus.enabled</strong></td><td>boolean</td><td>see <a href="/pages/FY1R8sSivx3ISkLCWiHj">Application Metrics</a> page.</td><td><code>false</code></td></tr><tr><td><strong>telemetry.disabled.usage</strong></td><td>boolean</td><td>Flag for disabling telemetry. <strong>Luden</strong> collects usage metrics about how you use it and how it is working. <strong>We don't collect any customer data</strong>.</td><td><code>false</code></td></tr><tr><td><strong>metrics.relay.disabled</strong></td><td>boolean</td><td>Disables extended telemetry metrics collection.</td><td><code>false</code></td></tr><tr><td><strong>metrics.relay.deployment_id</strong></td><td>string</td><td>Allows to provide deployment ID for extended telemetry collection.</td><td>Cluster ID</td></tr><tr><td><strong>disable_version_reminder</strong></td><td>boolean</td><td>Flag for disabling log reminder banner about new <strong>Luden</strong> versions availability.</td><td><code>false</code></td></tr><tr><td><strong>sync_tasks.store_logs.last_runs</strong></td><td>int</td><td>Logs for how many task runs must be kept in meta storage. Controlled on Source's collection level. When number of task runs for Source collection exceed provided value – old records get removed from meta storage.</td><td><code>-1</code> unlimited number of logs</td></tr><tr><td><strong>event_enrichment.http_context</strong></td><td>boolean</td><td>Whether the server should enrich incoming HTTP events with HTTP context (headers, etc.). Please note that when upgrading from Luden 1.41.6 you can switch this setting to <code>true</code> only separately from the upgrade itself, otherwise event data may get corrupted.</td><td><code>false</code></td></tr></tbody></table>

## Log <a href="#log" id="log"></a>

**Luden Server** supports destinations in streaming and batch modes. In the case of batch mode, all events are stored in JSON log files locally to **path** directory, and every **rotation\_min** minutes they are processed and pushed to destinations. All fields from **log** section are optional:

<table><thead><tr><th width="190">Field</th><th width="110">Type</th><th width="269">Description</th><th>Default value</th></tr></thead><tbody><tr><td><strong>path</strong></td><td>string</td><td>Events log files path.</td><td><code>/home/eventnative/data/logs/events</code></td></tr><tr><td><strong>rotation_min</strong></td><td>int</td><td>Log files rotation minutes.</td><td><code>5</code></td></tr><tr><td><strong>show_in_server</strong></td><td>boolean</td><td>Flag for debugging. If true - all events JSON data is written in app logs.</td><td><code>false</code></td></tr></tbody></table>
