HansKumar TripathiHansKumar Tripathi
All articles

Setting up Sitecore XM Cloud locally with Docker

A step-by-step local setup for XM Cloud, plus the errors I hit along the way and how I fixed them.

#xmcloud#docker#nextjs

Sample post — replace this with your own article. Keep the front-matter format at the top of the file.

Introduction

Running XM Cloud locally gives you a fast feedback loop for building components before you push to a cloud environment. In this post I’ll walk through the setup I use on Windows.

Prerequisites

  • Windows 10/11 with Docker Desktop (Windows containers)
  • Node.js LTS and .NET SDK
  • A valid Sitecore license file
  • The XM Cloud starter repository cloned locally

1. Initialise the environment

From the repo root, in an elevated PowerShell:

.\init.ps1 -InitEnv -LicenseXmlPath "C:\license\license.xml" -AdminPassword "b"

This generates certificates, writes the .env file and adds host entries.

2. Start the containers

.\up.ps1

The first run pulls several large images, so grab a coffee.

3. Common errors

Error Fix
Port 443 already in use Stop IIS: iisreset /stop
Traefik unhealthy Check the certificate files exist in docker/traefik/certs
Login loop on CM Clear cookies for the *.localhost domains

Conclusion

Once it’s running, you can serialize items with the Sitecore CLI and start building Next.js components against your local CM.

Thanks for reading!

I'm HansKumar Tripathi, a Lead Developer. If this helped, share it or say hello.