Install Headless Services using the package .zip file
The procedure for installing the Headless Services module using a package .zip file depends on your Sitecore environment:
-
On a standalone Sitecore instance or, in a scaled environment, on the CM instance, you must install Sitecore Headless Services.
-
For scaled Sitecore installations (production environments with separate CM and CD servers), you must configure the CD instance in a scaled Sitecore environment.
Install Sitecore Headless Services
On a Standalone Sitecore instance or, in a scaled environment, on the CM instance, you must install Sitecore Headless Services only once in a Sitecore headless environment.
To install Sitecore Headless Services:
-
Download the Sitecore Headless Services package compatible with your Sitecore version. See the Sitecore modules compatibility table for Sitecore XP versions 7.5-9.3, or for versions 10.0 and later, as needed.
-
Log in to your Sitecore instance.
-
Open the Desktop. On the Sitecore menu (lower left), click Development Tools, then Installation Wizard.
-
Follow the wizard to install the Sitecore Headless Services zip package.
-
For Sitecore 9.0.x only (not 9.1), in your
/Web.configfile, alter the binding redirect forNewtonsoft.Json: -
To verify your server components installation worked, visit
http://your-sitecore-instance/sitecore/api/layout/render/jss?item=/&sc_apikey=TEST. You receive the messageHTTP Error 400.0 - API key is not validif it is working correctly.TipBrowsers might obscure the message behind a custom error page for HTTP 400. You might need tools like Postman or browser-specific developer tools to see this message.
Configure the CD instance in a scaled Sitecore environment
If you are installing Sitecore Headless Services to a scaled Sitecore environment (production environments with separate CM and CD servers), you must configure the CD instance.
To configure the CD instance to install the Headless Services module:
-
Extract the server components Sitecore package.
-
Extract the inner
package.zipfile. Ignore any unzip warnings aboutsc_*.txtfiles. -
Deploy the following
package/filesfiles in thefilesfolder to your CD server's webroot:App_Config,bin,sitecore,Views,sitecore modules\items\webandsitecore modules\items\core. -
On a CD server, in
/Web.config, in the<handlers>section, add the following key: