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.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5b1DzZUVawAzBILrYFnC9Z%2Fe2c75d0fe498027033bf4b1372fc6e48%2F103docker12.png&w=3840&q=75)
Easily launch Headless SXA in Sitecore 10.3
Experience Manager (XM)DockerNext.jsHeadless SXAPublished: 2023-01-19
Related article about Docker
- Create a new project
- Prepare a project for XM1
- Adding SXA Modules
- Add Japanese language resources
- Add a headless site
- Add a Next.js project
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](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FXiq1O0BAth79wT9Bg35NW%2F6c0976fe3b5fc53fab43255859873675%2F103docker01.png&w=3840&q=75)
Click `Create a new repository` to create a new repository. This time, name the repository sitecore103sxa.
![103docker02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F3HAF8Om6HN2PcL7bZ6V3UT%2Fff2618130e1ca11b1e567d3d73b3d777%2F103docker02.png&w=3840&q=75)
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](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6raiog6lRHnCBjnldX4oOb%2Ff174b419e12b97e4e9359b3368deb1ca%2F103docker03.png&w=3840&q=75)
Copy the file env.example and create a .env file for your own use.
![103docker04.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1FCTQSzlPNgXw7mof47iGU%2F7716937895c3006ac2f2ebdb6839d384%2F103docker04.png&w=1920&q=75)
Then open a terminal with administrative privileges and navigate to the target folder. Perform initialization of the project using init.ps1.
cd C:\projects\sitecore103sxa
.\init.ps1 -InitEnv -LicenseXmlPath "C:\projects\license\license.xml" -AdminPassword "DesiredAdminPassword"
![103docker05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5Epvhsg9r1jqXIxUp9g2KR%2F6a762cc33bededf49bc91d209b85a4dd%2F103docker05.png&w=3840&q=75)
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](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F45E8XqC8dYVyxitItbBpPY%2Fca4516baa251e6782801db9ce00cbee2%2F103docker06.png&w=3840&q=75)
You are now ready to go. Run `up.ps1`, which can handle image building and other tasks in one go.
![103docker07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FDZ85jkNj9T1J8xpBqMGaM%2Fbbadd6d0a16963df2c2cae082fd3660d%2F103docker07.png&w=3840&q=75)
Once the container is up and running, a Sitecore CLI restore will be performed and the login screen will appear.
![103docker08.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2FnG5NkNztR1xqZcPJDfsDT%2F3b454f6de133c7f98b8df952761c053f%2F103docker08.png&w=3840&q=75)
We will proceed as permission to log in and write.
![103docker09.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1qCIguRFTYhnxKNU3lvAHR%2Fdd6661b44067bb1e451be2b112d83e79%2F103docker09.png&w=3840&q=75)
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](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1wdxwsjj50wPs7qh6hDMO1%2F23ff4edffb8e1cead363e68a2731f5f3%2F103docker10.png&w=3840&q=75)
Confirmation of environment
After logging in, open the content editor and you will see that the sample site has been imported.
![103docker11.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F2SpO7G9wwu4oYIk0GtgOwm%2Fad47a527e3dc3438e75cc6c5308f0cc6%2F103docker11.png&w=3840&q=75)
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](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5b1DzZUVawAzBILrYFnC9Z%2Fe2c75d0fe498027033bf4b1372fc6e48%2F103docker12.png&w=3840&q=75)
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.