Skip to content
Sitecore

XP to XM Cloud Phase 2: Environment Setup

This phase typically takes 1-2 weeks and establishes your XM Cloud environment, tooling, and deployment pipeline.

  1. Log in to Sitecore Cloud Portal
  2. Create new project
  3. Select region (US, EU, APAC)
  4. Choose environment tier (Standard, Premium)

Install Sitecore CLI (local project tool — recommended over global):

Terminal window
cd <project-folder>
dotnet new tool-manifest
dotnet tool install Sitecore.CLI

Other developers restore with dotnet tool restore.

Initialize project:

Terminal window
dotnet sitecore init

This creates sitecore.json configuration file:

{
"$schema": "https://sitecore.io/schemas/sitecore.json",
"modules": [
"src/*/*.module.json"
],
"plugins": [
"Sitecore.DevEx.Extensibility.Serialization"
]
}

Create MyProject.module.json for your project (convention: <name>.module.json):

{
"$schema": "https://sitecore.io/schemas/module.json",
"namespace": "MyProject",
"items": {
"includes": [
{
"name": "content",
"path": "/sitecore/content/MyProject",
"allowedPushOperations": "createUpdateAndDelete"
},
{
"name": "templates",
"path": "/sitecore/templates/MyProject"
},
{
"name": "renderings",
"path": "/sitecore/layout/Renderings/MyProject"
}
]
}
}

Recommended: Vercel (fastest, best DX)

Alternative: Azure Static Web Apps

Vercel Setup:

  1. Create Vercel account
  2. Connect GitHub repository (Next.js app)
  3. Configure environment variables:
    SITECORE_API_KEY=your-edge-api-key
    SITECORE_API_HOST=https://xmc-your-tenant.sitecorecloud.io
    GRAPH_QL_ENDPOINT=https://edge.sitecorecloud.io/api/graphql/v1
  4. Deploy

GitHub Actions Example:

name: Deploy to XM Cloud
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x'
- name: Restore Sitecore CLI
run: dotnet tool restore
- name: Deploy to XM Cloud
run: dotnet sitecore cloud deployment create --environment-id ${{ secrets.ENVIRONMENT_ID }} --upload
env:
SITECORE_API_KEY: ${{ secrets.SITECORE_API_KEY }}