Tailwind Logo

Easily launch Headless SXA in Sitecore 10.3

Experience Manager (XM)DockerNext.jsHeadless SXA

Published: 2023-01-19

We've previously detailed how to run Sitecore 10.3 container environments and add SXA locally. To simplify this repetitive process, we've created a repository for easy startup. This guide will introduce how to use the repository to launch the environment.

Related article about Docker

Create a new repository using a template

For the Sitecore projects we have created so far, we have opened the following customized repositories for easy launch.

This repository has been available since version 10.2 of Sitecore, and has been updated to 10.3 for today's blog, where the new Headless SXA feature is available.

To create a new repository using this repository, click on "Use this template" displayed on the screen.

103docker01.png

Click `Create a new repository` to create a new repository. This time, name the repository sitecore103sxa.

103docker02.png

This completes the creation of the new repository.

Deploy locally

Create a local clone of the newly created repository. In our case, we used Docker Desktop to create the clone as follows

103docker03.png

Copy the file env.example and create a .env file for your own use.

103docker04.png

Then open a terminal with administrative privileges and navigate to the target folder. Perform initialization of the project using init.ps1.

PowerShell
cd C:\projects\sitecore103sxa
.\init.ps1 -InitEnv -LicenseXmlPath "C:\projects\license\license.xml" -AdminPassword "DesiredAdminPassword"
103docker05.png

Execution will proceed to create the file that will be used as the certificate and set the initial values. The following screen indicates completion.

103docker06.png

You are now ready to go. Run `up.ps1`, which can handle image building and other tasks in one go.

103docker07.png

Once the container is up and running, a Sitecore CLI restore will be performed and the login screen will appear.

103docker08.png

We will proceed as permission to log in and write.

103docker09.png

After a few moments a window will open to log in to Sitecore. Once logged in, you will see the 10.3 administration window.

103docker10.png

Confirmation of environment

After logging in, open the content editor and you will see that the sample site has been imported.

103docker11.png

Select the Home item on your site to open the Experience Editor. The following screen appears, with the SXA components on the right side.

103docker12.png

Headless SXA is now ready to be used as a development environment.

Summary

Sitecore 10.3 can now be easily launched and used with Sitecore Headless SXA. There are currently three types of SXA available, and the number of components available for Headless varies. See below for more details.

Tags