Using the getting started project from Sitecore 10 docs, as per https://doc.sitecore.com/developers/100/developer-tools/en/walkthrough--using-the-getting-started-template.html the Identity server container fails to start and has a Base64 conversion error parsing the license key:

Unhandled Exception: System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at Sitecore.Framework.Runtime.Configuration.License.ReadFromRaw(ISitecoreHostingEnvironment host)
at Sitecore.Framework.Runtime.Licensing.SitecoreHostingEnvironmentExtensions.GetLicense(ISitecoreHostingEnvironment host)
at Sitecore.Framework.Runtime.Commands.SitecoreHostCommand.OnExecuteAsync(CommandLineApplication app)
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments) in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 77
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context) in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 62
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext() in C:\projects\commandlineutils\src\CommandLineUtils\Conventions\ExecuteMethodConvention.cs:line 25
--- End of stack trace from previous location where exception was thrown ---

at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass126_0.<OnExecute>b__0() in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.cs:line 505
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 31
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 145
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](IConsole console, String[] args) in C:\projects\commandlineutils\src\CommandLineUtils\CommandLineApplication.Execute.cs:line 130
at Sitecore.Program.<Main>(String[] args)

The cortexprocessingworker, xdbautomationworker, and xdbsearchworker all fail to start after the ID container fails and the Up.ps1 script finishes with the following errors:

enter image description here

Using Windows 10 Build 1809, Docker Desktop 2.2.04. Partner license, and MVP license both for v9 and unexpired.

# If you intend to push to a private registry, fill that in here.

# Configure host names, which will be used to configure Traefik proxy routing.

# Sitecore Docker registry and platform version.
# The ltsc2019-based images are used by default here. Development-only 1909 images are also available.

# The sitecore\admin and SQL 'sa' account passwords for this environment are configurable here.

# Other supporting images, including Sitecore modules and Docker tools

# MSBuild configuration and the target build stage for the Rendering Host image.

# Mount paths for code deployment, data persistence, and your Sitecore license.

# Because we are using a mounted license file, this value can be empty.
# Included here to suppress 'variable is not set' warning from docker-compose.

# The isolation mode for Sitecore containers.
# Compatibility of isolation mode depends on the Host and Container OS versions.

# Generated keys and certificates for your environment.

enter image description here

  • So you're saying both licenses fail in this way? Can you add the contents of your .env file? SITECORE_LICENSE should be empty, and HOST_LICENSE_FOLDER should be pointed at a folder with your license.xml in it. Commented Aug 4, 2020 at 19:19
  • Thanks Nick, yes both licenses fail. The SITECORE_LICENCE value in .env is empty, however when I inspect ID server in Docker Desktop I can see that the ID server does have a value in the SITECORE_LICENCE and a mount point for the license.xml path that was passed in via Init.ps1 The services that start are CM, XCONNECT, RENDERING, MSSSQL, and SOLR. No other containers are listed apart from the failed ID container.
    – andyp
    Commented Aug 4, 2020 at 22:28

2 Answers 2


Have you previously worked with older versions of Sitecore with Docker? If so, you may still have an environment variable floating around with an invalid license.

The getting started project appears to be using the mounted license file strategy. The SITECORE_LICENSE var shouldn't be set, as it is in your screenshot of the id container env vars. Having this env variable set may take precedence and cause unexpected consequences.

You can check for an existing SITECORE_LICENSE environment variable in powershell:


If that exists, remove it, then go through the setup steps again with the mounted license file.

  • Yep thanks George that was the issue - there was an existing machine level SITECORE_LICENSE environment variable that was being picked up and overriding the details passed to the .\Init.ps1
    – andyp
    Commented Aug 5, 2020 at 5:24
  • 6
    And just to make it easier, in powershell you can run $env:SITECORE_LICENSE = '' to remove the variable. Commented Aug 7, 2020 at 4:04

In my case I had previously used a Sitecore 9 docker instance on this same machine. The issue was that there was an environment variable overwriting the license path variable.

In windows open your start menu and type Edit environment variables for your account. In here I had a variable called SITECORE_LICENSE. Deleting this variable resolved my issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.