# Database Configuration

## Introduction

The database can be configured in three different ways: with the [staradmin CLI](/2.3.2/guides/working-with-starcounter/staradmin-cli.md), in the [Administrator](/2.3.2/guides/working-with-starcounter/administrator-web-ui.md), or directly in the configuration file.

## Configuration File

By default, the database configuration file is located inside the server directory `Databases\[DatabaseName]\[DatabaseName].db.config`. Further instructions on finding the database configuration file can be found on the [Configuration Structure](/2.3.2/guides/working-with-starcounter/configuration-structure.md) page.

The options in this file can be configured either directly in the file or when creating the database with the [Staradmin CLI](/2.3.2/guides/working-with-starcounter/staradmin-cli.md). Alternatively, a limited subset of the options can be configured from the [Administrator](/2.3.2/guides/working-with-starcounter/administrator-web-ui.md).

For configurations regarding the network gateway, check the [Network Gateway](/2.3.2/guides/network/network-gateway.md) page.

## Configuration Options

Here are the most important database configuration options with their default values:

1. Should edition libraries be loaded in databases:\
   `LoadEditionLibraries: true`
2. Should JSON responses be wrapped in application name:\
   `WrapJsonInNamespaces: true`
3. Should applications be forced to register handlers starting with application name prefix:\
   `EnforceURINamespaces: false`
4. Should JSON responses from multiple applications be merged:\
   `MergeJsonSiblings: true`
5. Should the request filters be enabled (previously middleware filters):\
   `RequestFiltersEnabled: true`
6. Should static files HTTP responses have a special header `X-File-Path` that contains a full path to the actual file on the server (default value is `False`). This HTTP header is often useful for debugging purposes, but should be disabled in production:\
   `XFilePathHeader: true`
7. The HTTP port bound to the database: `DefaultUserHttpPort: 8080`


---

# 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.starcounter.io/2.3.2/guides/database/database-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.
