UmbHost.GreenStack.Umbraco.Configuration
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package UmbHost.GreenStack.Umbraco.Configuration --version 1.0.0
NuGet\Install-Package UmbHost.GreenStack.Umbraco.Configuration -Version 1.0.0
<PackageReference Include="UmbHost.GreenStack.Umbraco.Configuration" Version="1.0.0" />
<PackageVersion Include="UmbHost.GreenStack.Umbraco.Configuration" Version="1.0.0" />
<PackageReference Include="UmbHost.GreenStack.Umbraco.Configuration" />
paket add UmbHost.GreenStack.Umbraco.Configuration --version 1.0.0
#r "nuget: UmbHost.GreenStack.Umbraco.Configuration, 1.0.0"
#:package UmbHost.GreenStack.Umbraco.Configuration@1.0.0
#addin nuget:?package=UmbHost.GreenStack.Umbraco.Configuration&version=1.0.0
#tool nuget:?package=UmbHost.GreenStack.Umbraco.Configuration&version=1.0.0
UmbHost GreenStack for Umbraco
Configures an Umbraco site to run correctly on UmbHost GreenStack. Install it and
redeploy; there is nothing to call from Program.cs.
dotnet add package UmbHost.GreenStack.Umbraco.Configuration
Supports Umbraco 13 (.NET 8) and Umbraco 17 (.NET 10). NuGet picks the right build for your site.
When it applies
The package switches itself on inside a container (DOTNET_RUNNING_IN_CONTAINER=true, which the official
.NET images set) and stays off when you run the site from your IDE. Force it either way with
GreenStack__Enabled=true|false.
What it configures
| What | Why | |
|---|---|---|
| Forwarded headers | Trusts X-Forwarded-For / X-Forwarded-Proto from any peer, first in the pipeline |
TLS terminates at the Cloudflare edge; without this Umbraco sees plain HTTP and the wrong client IP |
| HTTPS health checks | Disables the "HTTPS Configuration" and HSTS health checks | HTTPS and HSTS are enforced at the edge, so the container can't pass them |
| HTTPS runtime validator | Removes UseHttpsValidator |
Production runtime mode otherwise refuses to boot while Global:UseHttps is false (the Umbraco 13 default) |
| Data Protection | Persists keys to /app/keys (not in Development) |
GreenStack mounts it on storage shared by every replica, so logins and antiforgery tokens survive redeploys and work on every replica |
| Single instance | Global:DisableElectionForSingleServer = true on a single-replica service, unless you set it |
No server-role election when there is only one server |
| SignalR backplane (Umbraco 17) | Uses the site's own SQL database as the SignalR backplane on a service with 2 or more replicas | A load-balanced Umbraco 17 backoffice otherwise throws "No connection with that ID" |
| Umbraco Forms views | Copies Views/Partials/Forms to the publish output |
View precompilation doesn't carry them, so forms render blank |
| Razor sources | CopyRazorGenerateFilesToPublishDirectory = true unless you set it |
Packages that resolve views from disk still find them |
Build warning GREENSTACK001 |
Warns when RazorCompileOnBuild / RazorCompileOnPublish is false |
Production runtime mode needs precompiled views, otherwise every template 404s |
| Startup warnings | Logs a warning when the site isn't in Production runtime mode, when an appsettings file sets something GreenStack injects (application URL, backoffice host, MainDom lock, Examine directory factory, connection string), or disables election on a load-balanced site | Those values come from UmbPanel for each environment; a connection string in a file is a secret baked into your image |
Every setting marked "unless you set it" only fills a gap: a value in your own configuration always wins.
Replicas
GreenStack tells the site how many replicas its service runs: UmbPanel sets GreenStack__Replicas from
the Docker service on every deploy. Scaling in UmbPanel changes it, which restarts every replica with the new
count, so they always agree on single-instance or load-balanced. You don't set it yourself.
Settings
All optional. Set them as environment variables on the service in UmbPanel.
| Variable | Default | Meaning |
|---|---|---|
GreenStack__Enabled |
on in a container | Force the package on or off |
GreenStack__DataProtectionKeysPath |
/app/keys |
Where Data Protection keys are stored |
Set <GreenStackAllowRuntimeRazorCompilation>true</GreenStackAllowRuntimeRazorCompilation> in your .csproj
to silence GREENSTACK001 if the site deliberately runs ModelsBuilder in InMemoryAuto mode outside
Production runtime mode.
What it doesn't do
These stay in your project, and the GreenStack templates already contain them:
- Production runtime mode, which GreenStack requires in every environment, staging included:
Runtime:Mode = Production,ModelsBuilder:ModelsMode = Nothing(notNone),Hosting:Debug = false.appsettings.Production.jsonis only loaded in Production, so set these where every environment reads them. - The Dockerfile: non-root user
1000,EXPOSE 8080,--locked-moderestore. - Versioned asset URLs (
asp-append-version="true"or a Vite manifest). Cloudflare hard-caches static files and media. - Redirects: never redirect
*.umbpanel.io(the health check uses it) and don't callUseHttpsRedirection(). - Path casing: GreenStack runs Linux, so
Views/Partials/Formsandviews/partials/formsare different folders.
Leave UmbracoApplicationUrl, BackOfficeHost, MainDomLock, the Examine directory factory, the connection
string and ASPNETCORE_ENVIRONMENT out of your configuration: GreenStack injects them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- IntelliTect.AspNetCore.SignalR.SqlServer (>= 1.4.2)
- MessagePack (>= 3.1.12)
- Umbraco.Cms.Infrastructure (>= 17.0.0 && < 18.0.0)
-
net8.0
- Umbraco.Cms.Infrastructure (>= 13.0.0 && < 14.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.