> For the complete documentation index, see [llms.txt](https://help.santesuite.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.santesuite.org/operations/server-administration/host-configuration-file.md).

# Server Configuration File

SanteDB dCDR and iCDR use a file-based configuration system to control the behaviors of the host process, synchronization, etc. Variables within the host configuration file are required to start up the core services of the SanteDB server.

The configuration options in the configuration file differ from those which control business behavior in that they are system settings. As such:

* Changes to the configuration file require a restart of the host process,
* Because changes require a restart - NO REST API may modify settings within the configuration file, since a REST API would be (in effect) controlling service uptime
  * The dCDR interfaces do allow minor modifications of configuration via web-interfaces.

## Structure

The overall configuration file structure is illustrated in the code block below:

```markup
<SanteDBConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       version="2.0.60.0" 
       xmlns:santempi="http://santedb.org/configuration/santempi" 
       xmlns:santeguard="http://santedb.org/configuration/santeguard" 
       xmlns="http://santedb.org/configuration">
       <sections>
              <!-- Section Registration -->
       </sections>
       <section xsi:type="SectionType">
       </section>
</SanteDBConfiguration>
```

{% hint style="info" %}
The SanteDB configuration files are identical in structure on the iCDR, dCDR (on Windows, Linux, Android, etc.). This commonality between platforms and frameworks is why SanteDB does not leverage the default .NET app.config or config.json structures.
{% endhint %}

The namespace definitions used in the configuration file allow plugins to isolate their configuration types. The default SanteDB configuration namespaces are:

| Solution     | Namespace                                     |
| ------------ | --------------------------------------------- |
| SanteDB Core | <http://santedb.org/configuration>            |
| SanteMPI     | <http://santedb.org/configuration/santempi>   |
| SanteGuard   | <http://santedb.org/configuration/santeguard> |

The configuration must contain two sections:

* Header - Which contains the \<sections> element and identifies to the configuration engine which IConfigurationSection instances are being used (see [Configuration Wiki Page](/developers/server-plugins/implementing-.net-features/configuration.md))
* Configuration Sections - Which contain the \<section> element and configure the actual plugins in SanteDB.

## Sections Element

The \<sections> element identifies the types of IConfigurationSection you're deployment uses. The section element contains one or more \<add> elements with a type reference:

```markup
  <sections>
    <add type="SanteDB.Core.Configuration.DiagnosticsConfigurationSection, SanteDB.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.AppletConfigurationSection, SanteDB.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.ApplicationServiceContextConfigurationSection, SanteDB.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.Data.DataConfigurationSection, SanteDB.Core.Api, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Caching.Memory.Configuration.MemoryCacheConfigurationSection, SanteDB.Caching.Memory, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.RestConfigurationSection, SanteDB.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.ClaimsAuthorizationConfigurationSection, SanteDB.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.SecurityConfigurationSection, SanteDB.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Messaging.HDSI.Configuration.HdsiConfigurationSection, SanteDB.Messaging.HDSI, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Persistence.Data.ADO.Configuration.AdoPersistenceConfigurationSection, SanteDB.Persistence.Data.ADO, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.OrmLite.Configuration.OrmConfigurationSection, SanteDB.OrmLite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <add type="SanteDB.Core.Configuration.AuditAccountabilityConfigurationSection, SanteDB.Core.Api, Version=1.10.0.0"/>
```

At minimum, your configuration file should contain/use the following configuration sections documented on this section.

## Configuration Sections

* [DiagnosticsConfigurationSection](/operations/server-administration/host-configuration-file/diagnostics-configuration.md)
* [AppletConfigurationSection](/operations/server-administration/host-configuration-file/applet-configuration.md)
* [ApplicationServiceContextConfigurationSection](/operations/server-administration/host-configuration-file/application-service-context-configuration.md)
* [DataConfigurationSection](/operations/server-administration/host-configuration-file/data-configuration.md)
* MemoryCacheConfigurationSection
* RestConfigurationSection
* ClaimsAuthorizationConfigurationSection
* SecurityConfigurationSection
* HdsiConfigurationSection
* AdoPersistenceConfigurationSection
* OrmConfigurationSection
* AuditAccountabilityConfigurationSection


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.santesuite.org/operations/server-administration/host-configuration-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
