Skip to main content
Published
Sep 15, 2026
1mo ago
Total Downloads
1.2M
1,153,265

Install

dotnet add package Aspire.Hosting.Keycloak --version 13.5.4-preview.1.26464.4
ProductVersions
.NET
net8.0

README

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

https://github.com/microsoft/aspire

Changes from Previous Version

No structural changes between v13.5.3-preview.1.26425.3 and v13.5.4-preview.1.26464.4.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 32 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.