Sitecore Host

Abstract

Sitecore Host is a common platform for all Sitecore services, introduced in Sitecore 9.1.

Sitecore Host is a common platform for all Sitecore services, introduced in Sitecore 9.1.

Note

A Sitecore service is a piece of functionality or a feature that runs separately, outside of the main Sitecore CM or CD role.

Sitecore Host acts as a base for a service and it addresses a number of common concerns. It also allows dynamic extensibility of services through the use of Sitecore Host plugins.

Sitecore Host has the following features:

  • Unified service registration (DI)

  • Unified configuration

  • Unified file system access

  • Command-line actions

  • Global route registration

  • Dynamic plugin loading

  • Sitecore consumption-licensing ready

  • Cross-platform ready (Sitecore Host is based on the latest Microsoft .NET Core libraries)

The advantages of running any feature or service built on Sitecore Host are:

  • All Sitecore Host applications have a consistent experience. For example: logging works the same way across any Sitecore Host application, configuration is merged and patched in the same way, command-line options all work in the same way, and so on.

  • The installation experience is consistent.

  • You can configure applications on the command line, without need for a UI.

  • You have powerful extensibility options through host plugins, so you can extend a feature with additional functionality.

  • The host behaves the same way whether you run it in the cloud or on premise, on Windows or on Linux, on dedicated hardware or inside a container.

A Sitecore Host plugin is a extensibility unit that you can load into a Sitecore Host application dynamically, without having to change or recompile any part of the base code.

Sitecore Host always loads plugins in dependency order . It applies code loading, configuration overrides, and so on, in that same dependency order.

A plugin can contain the following elements:

  • Code - register services (dependency injection), register routes, and run your C# code.

  • Configuration - include, override, or provide new configuration.

  • Commands - add new commands, arguments, and subcommands.

  • Content - include any file system files (JavaScript, images, and so on).