# Central Configuration

### **Central Configuration**

The **central configuration** allows to set a shared scanner configuration for the organization. The central configuration, when available, will be automatically downloaded by the scanner at the beginning of the scan.

Such shared central configuration allows customization of the scanner for the organization, as scanners could be running in multiple different points, often in CI/CD pipelines running on ephemeral containers.

NOTE: An alternative to central configuration is to pass specific configuration options using the `-cop | --config-option "key:value"`.

The commands provided for handling central configuration are:

* `config-upload`, that collects configuration from the local scanner and uploads it to the Xygeni service. The username / apikey should have permissions for configuration upload.
* `conf-update`, that downloads the configuration and overwrites local scanner configuration, keeping local properties related to api and proxy authentication.
* `conf-download`, for downloading the central configuration without overwriting the local scanner configuration, typically for

{% hint style="info" %}
The scanner needs an access token with the `Upload configuration` permission, or be logged as a user with the ROOT or MANAGER\_POLICY roles.
{% endhint %}

The steps for creating / updating the central configuration are:

1. Configure the desired settings in local configuration files (`xygeni*.yml` files, detectors, etc.)
2. Upload the configuration using the `util conf-upload` command.

   ```bash
   xygeni util conf-upload
   ```
3. (Optional) Check that the configuration was successfully uploaded with `util conf-download` command.

   ```bash
   xygeni util conf-download
   ```
4. After later changes in the configuration, you may force update from the central configuration using the `util config-update` command:

   ```bash
   xygeni util conf-update
   ```

In case you don't want to apply central configuration you can use **`--no-conf-download`** when invoking Xygeni scanner commands.

```bash
xygeni scan --no-conf-download [rest of flags ...]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/cli-utils/central-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
