Aspire.Hosting.Keycloak
13.5.2-preview.1.26421.6
Prefix Reserved
dotnet add package Aspire.Hosting.Keycloak --version 13.5.2-preview.1.26421.6
NuGet\Install-Package Aspire.Hosting.Keycloak -Version 13.5.2-preview.1.26421.6
<PackageReference Include="Aspire.Hosting.Keycloak" Version="13.5.2-preview.1.26421.6" />
<PackageVersion Include="Aspire.Hosting.Keycloak" Version="13.5.2-preview.1.26421.6" />
<PackageReference Include="Aspire.Hosting.Keycloak" />
paket add Aspire.Hosting.Keycloak --version 13.5.2-preview.1.26421.6
#r "nuget: Aspire.Hosting.Keycloak, 13.5.2-preview.1.26421.6"
#:package Aspire.Hosting.Keycloak@13.5.2-preview.1.26421.6
#addin nuget:?package=Aspire.Hosting.Keycloak&version=13.5.2-preview.1.26421.6&prerelease
#tool nuget:?package=Aspire.Hosting.Keycloak&version=13.5.2-preview.1.26421.6&prerelease
Keycloak hosting integration
Use this integration to model, configure, and orchestrate a Keycloak resource in an Aspire solution.
Getting started
Add the integration
From your AppHost directory, add the Aspire.Hosting.Keycloak integration with the Aspire CLI:
aspire add Aspire.Hosting.Keycloak
Usage example
In the AppHost, add a Keycloak resource and enable service discovery with either C# or TypeScript:
C#
var keycloak = builder.AddKeycloak("keycloak", 8080);
var myService = builder.AddProject<Projects.MyService>()
.WithReference(keycloak);
TypeScript
const keycloak = await builder.addKeycloak("keycloak", 8080);
const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
.withReference(keycloak);
Recommendation: For local development use a stable port for the Keycloak resource (8080 in the example above). It can be any port, but it should be stable to avoid issues with browser cookies that will persist OIDC tokens (which include the authority URL, with port) beyond the lifetime of the AppHost.
Additional documentation
https://aspire.dev/integrations/gallery/ https://aspire.dev/integrations/security/keycloak/
Feedback & contributing
| 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 was computed. 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. |
-
net8.0
- Aspire.Hosting (>= 13.5.2)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Google.Protobuf (>= 3.34.1)
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Net.ClientFactory (>= 2.80.0)
- Grpc.Tools (>= 2.80.0)
- Humanizer.Core (>= 3.0.10)
- JsonPatch.Net (>= 5.0.2)
- KubernetesClient (>= 19.0.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.30)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
- Microsoft.Extensions.Logging (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Primitives (>= 10.0.11)
- ModelContextProtocol (>= 1.3.0)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- Polly.Core (>= 8.6.6)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.8)
- System.Text.Json (>= 10.0.11)
- YamlDotNet (>= 16.3.0)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Aspire.Hosting.Keycloak:
| Package | Downloads |
|---|---|
|
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions
Aspire hosting extensions for Keycloak (includes PostgreSQL integration). |
|
|
Hexalith.EventStore.Aspire
.NET Aspire hosting extensions for the Hexalith event store — DAPR topology orchestration for distributed event sourcing development |
|
|
Hexalith.Tenants.Aspire
.NET Aspire hosting extensions for the Hexalith Tenants domain service — adds the Tenants server and its EventStore domain-module wiring to a consuming AppHost. |
|
|
BellaBaxter.Aspire.Host
Aspire hosting integration for Bella Baxter — spins up the full Baxter stack (Postgres, Redis, Keycloak, OpenBao, Bella API) in a local Aspire AppHost. |
|
|
KeyCloak.Aspire.Extensions
Keycloak extensions for .NET Aspire. |
GitHub repositories (5)
Showing the top 5 popular GitHub repositories that depend on Aspire.Hosting.Keycloak:
| Repository | Stars |
|---|---|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
|
|
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
|
|
|
foxminchan/BookWorm
The practical implementation of Aspire using Microservices, AI-Agents
|
|
|
fdonnet/ubik_accounting
Double entry accounting app in Net 9
|
|
|
baotoq/micro-commerce
.NET 10 .NET Aspire
|
| Version | Downloads | Last Updated |
|---|---|---|
| 13.5.2-preview.1.26421.6 | 68 | 8/21/2026 |
| 13.5.1-preview.1.26420.4 | 598 | 8/20/2026 |
| 13.5.0-preview.1.26417.10 | 1,918 | 8/18/2026 |
| 13.4.6-preview.1.26319.6 | 74,818 | 6/19/2026 |
| 13.4.5-preview.1.26316.12 | 5,095 | 6/17/2026 |
| 13.4.4-preview.1.26314.3 | 12,384 | 6/15/2026 |
| 13.4.3-preview.1.26305.13 | 12,181 | 6/8/2026 |
| 13.4.2-preview.1.26303.6 | 7,254 | 6/3/2026 |
| 13.4.1-preview.1.26303.3 | 174 | 6/3/2026 |
| 13.4.0-preview.1.26281.18 | 12,261 | 6/1/2026 |
| 13.3.5-preview.1.26270.6 | 17,138 | 5/21/2026 |
| 13.3.4-preview.1.26268.8 | 4,376 | 5/19/2026 |
| 13.3.3-preview.1.26264.13 | 4,188 | 5/15/2026 |
| 13.3.2-preview.1.26263.11 | 6,864 | 5/14/2026 |
| 13.3.1-preview.1.26261.7 | 4,967 | 5/12/2026 |
| 13.3.0-preview.1.26256.5 | 14,369 | 5/7/2026 |
| 13.2.4-preview.1.26224.4 | 32,991 | 4/24/2026 |
| 13.2.3-preview.1.26217.6 | 5,026 | 4/21/2026 |
| 13.2.2-preview.1.26207.2 | 23,885 | 4/8/2026 |
| 13.2.1-preview.1.26180.6 | 15,713 | 3/31/2026 |