---
title: "Set up an environment-based configuration"
slug: "set-up-an-environment-based-configuration"
abstract: "How to set up a folder with environment-specific configuration files on an XP installation."
---
# Set up an environment-based configuration

To set up an [environment-based configuration](https://doc.sitecore.com/xp/en/developers/102/platform-administration-and-architecture/xp-services-configuration-overview.html "XP services configuration overview"):

1. Create a folder for each of your environments under the `<your-xp-role>/App_Data/config` folder. The following example includes the two environment specific folders `production` and `development`:

    ![environment-config1.png](https://doc.sitecore.com/api/markdown-image/xp/en/developers/102/platform-administration-and-architecture/images/environment-config1.png)

2. Add environment-specific configuration files to your folders. Configuration files must start with `sc.` and end with `.xml`.

    > [!note]
    > You do not need to use the same subfolder structure as the `<your-xp-role>/App_Data/Config/Sitecore` folder.

3. To activate the configuration files for a specific environment, set the `configurationEnvironment` variable in the `<your-xp-role>/App_Data/AppSettings.config` file. For example, this code enables the files in the `development` folder:

    ```xml
    <?xml version="1.0" encoding="utf-8"?>
         <appSettings>
             <add key="configurationDirectoryRoot" value="App_Data" />
             <add key="configurationEnvironment" value="development" />
        </appSettings>
    ```