---
title: "Add an editing host"
slug: "add-an-editing-host"
abstract: "Describes how to add an editing host in the Deploy app."
---
# Add an editing host

The Deploy app includes a beta feature that lets you separately deploy your authoring environments and editing hosts.

With the beta feature, you can:

- Create and manage editing hosts from the Deploy app.
- Build and deploy the authoring environment and editing host separately.
- Choose different repositories for each authoring environment and editing host.
- Add custom environment variables when creating a project or environment.

To enable this feature, turn on the **Now you can use different repositories for your Authoring environments and Editing hosts** beta feature in the Deploy app's **Settings** page. This will cause the following changes:

- Creating a project using a starter kit will automatically add an editing host based on the code in the starter kit repository.
- When creating a project using your own code, you will have the option to add an editing host and [specify the repository](https://doc.sitecore.com/sai/en/developers/sitecoreai/deploying-sitecoreai/deploy-app/manage-connections-for-source-control-and-hosting-providers.html "Manage connections for source control and hosting providers") that contains the editing host's code.
- You can add more editing hosts to a project created while the beta feature is enabled. For each new editing host, you select the repository containing the required code.

> [!note]
> You can [convert existing projects to use decoupled deployment architecture](https://doc.sitecore.com/sai/en/developers/sitecoreai/deploying-sitecoreai/deploy-app/manage-a-project.html "Manage a project").

![The Editing host tab in a project in the Deploy app, when the beta feature is enabled.](https://doc.sitecore.com/api/markdown-image/sai/en/developers/sitecoreai/images/editing-hosts-tab.png)

To add an editing host:

> [!note]
> You can only add more editing hosts to projects created while the beta feature is enabled.

1. On the navigation pane of the Deploy app, click **Projects**.
2. On the **Projects** page, click the project where you want to add an editing host.
3. On the **Editing hosts** tab, click **Add editing host**.
4. To select the editing host source code, in the **Editing host name** field, enter the name of the rendering host defined in the `xmcloud.build.json` file of the editing host code repository.

    > [!note]
    > **XM Cloud is now SitecoreAI**
    > Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

    For example, in the following `xmcloud.build.json` file code snippet, `nextjsstarter` is a rendering host name.

    ```json
    {
      "renderingHosts": {
        "nextjsstarter": { // Rendering host name
          "path": "./examples/kit-nextjs-skate-park",
          ...
    ```
    > [!note]
    > The name of each editing host in your project must be unique.

5. In the **Link to authoring environment** drop-down list, click the authoring environment that you want to link to the editing host.
6. Use the following fields to specify the location of your editing host code:
    - **Source control provider**
    - **Azure DevOps account / GitHub account**
    - **Repository**
    - **Branch**
7. If you want to trigger an automatic deployment each time you push to the linked repository branch, select the **Auto deploy on push to repository** check box.
8. If you want to add custom environment variables to your editing host:
    1. Click **Add variable**.
    2. In the **Add environment variable** dialog, enter a **Name** and **Value**.
    3. If you want to encrypt the variable and hide its value, turn on the **Secret** toggle.
    4. Click **Save**.
    5. Repeat this process until you've added all the variables you need.
9. Click **Save**.

    When you add an editing host, it is automatically deployed.