Skip to main content

SitecoreAI · Tutorial

Connecting a Local App to a Remote Sitecore Cloud Environment

Point your local app at a deployed XMC environment to debug issues that only show up against real content.

gavAusWeb1 min read

Goal: point your local app at a real deployed Sitecore XMC environment instead of your local Docker instance — useful for debugging content issues that only show up once something's actually deployed.

Connect your appLink to this section

  1. Step 1: Open the environment in Cloud Deploy

    Start at the Sitecore Cloud Portal (portal.sitecorecloud.io), then jump into Sitecore Cloud Deploy. Go to Projects, pick your project, and choose the environment you want to connect to (e.g. dev).

  2. Step 2: Copy the developer settings

    Inside that environment, open Developer Settings. Pick the right tenant/site if more than one is listed, and you'll see the connection details to drop into your app's .env.local:

    .env.localtext
    SITECORE_EDGE_CONTEXT_ID=your_edge_context_id
    SITECORE_API_HOST=your_api_host
    PUBLIC_GRAPH_QL_ENDPOINT=your_graphql_endpoint
    SITECORE_SITE_NAME=your_site_name
  3. Step 3: Restart the dev server

    These values are read at build/start time, not hot-reloaded, so restart your local dev server. Your local app now renders against real remote content instead of your local containers — exactly what you want when a bug only reproduces against deployed data.