Skip to main content

Connect Sitecore Pages to your local XM Cloud instance

Abstract

Enable Sitecore Pages to use your locally running rendering host and XM Cloud instance

After setting up your local XM Cloud development environment, Sitecore Pages is not connected to your locally running XM Cloud instance.

You can connect your local XM Cloud application to Sitecore Pages by setting a local storage key in your browser.

Note

You must start your XM Cloud container. The rendering application must be run in connected mode.

To connect Sitecore Pages:

  1. In your browser, navigate to the Sitecore Pages application.

  2. Open the developer tools console of your browser and find the local storage section. The location differs between browsers:

    • For Chrome and Edge, open the Application panel. In the Storage section, expand the Local Storage section.

    • For Firefox, open the Storage panel, and expand the Local Storage section.

  3. In the Local Storage panel, click the entry for Sitecore Pages https://pages.sitecorecloud.io to reveal the local storage entries.

  4. Create a new entry by adding a new row with the following values:

    • Key: Sitecore.Pages.LocalXmCloudUrl.

    • Value: the URL of your local XM Cloud instance. For example, https://xmcloudcm.localhost/.

  5. Verify that your local XM Cloud instance is configured to connect with Sitecore Pages. If correctly configured, your XM Cloud instance has the following environment variables:

    SITECORE_Pages_Client_Host=https://pages.sitecorecloud.io
    SITECORE_Pages_CORS_Allowed_Origins=pages.sitecorecloud.io
  6. Refresh the https://pages.sitecorecloud.io page to see your local front-end application.