Aspire.Hosting.Redis 13.6.4
Redis hosting integration
Use this integration to model, configure, and orchestrate a Redis resource in an Aspire solution.
Getting started
Add the integration
From your AppHost directory, add the Aspire.Hosting.Redis integration with the Aspire CLI:
aspire add Aspire.Hosting.Redis
Usage example
In the AppHost, add a Redis resource and reference it from another resource with either C# or TypeScript:
C#
var redis = builder.AddRedis("redis");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(redis);
TypeScript
const redis = await builder.addRedis("redis");
const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
.withReference(redis);
REPL
Call WithRepl() to opt into a REPL command on the Redis resource in the dashboard:
builder.AddRedis("redis").WithRepl();
await builder.addRedis("redis").withRepl();
REPL access is disabled by default and is available only in run mode. Enable it only for trusted dashboard users: the shell uses the resource's configured credentials and is not read-only. Sharing the dashboard through a tunnel, Codespaces, or VS Code remote development also exposes this capability to users who can execute resource commands.
Use quit before closing the terminal tab to end the session cleanly. Closing the tab alone can
leave redis-cli running inside the container. Stopping the container also ends any remaining REPL processes.
When the container is running, this opens an authenticated redis-cli session in the terminal dock.
Use quit to exit. The session runs inside the container using Docker (or the configured Podman runtime);
no local Redis client is required. Passwords are passed through environment variables, not command-line
arguments. When TLS is enabled, the in-container REPL uses the non-TLS port over loopback.
Connection Properties
When you reference a Redis resource using WithReference, the following connection properties are made available to the consuming project:
Redis
The Redis resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Host |
The hostname or IP address of the Redis server |
Port |
The port number the Redis server is listening on |
Password |
The password for authentication |
Uri |
The connection URI, with the format redis://:{Password}@{Host}:{Port} |
Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called cache becomes CACHE_URI.
Additional documentation
Feedback & contributing
https://github.com/microsoft/aspire
*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd.
No packages depend on Aspire.Hosting.Redis.
.NET 8.0
- Aspire.Hosting (>= 13.6.4)
- AspNetCore.HealthChecks.Redis (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Google.Protobuf (>= 3.36.1)
- Grpc.AspNetCore (>= 2.83.0)
- Grpc.Net.ClientFactory (>= 2.83.0)
- Grpc.Tools (>= 2.83.0)
- Hex1b (>= 0.168.0)
- KubernetesClient (>= 19.0.2)
- MessagePack (>= 2.5.307)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.31)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.12)
- Microsoft.Extensions.Hosting (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Http (>= 10.0.12)
- Microsoft.Extensions.Logging (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Microsoft.Extensions.Primitives (>= 10.0.12)
- ModelContextProtocol (>= 1.4.1)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.17.0)
- OpenTelemetry.Extensions.Hosting (>= 1.17.0)
- Polly.Core (>= 8.7.0)
- Semver (>= 3.0.0)
- StackExchange.Redis (>= 2.13.17)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.12)
- System.Text.Json (>= 10.0.12)
- YamlDotNet (>= 18.1.0)
| Version | Downloads | Last updated |
|---|---|---|
| 17.0.0 | 0 | 2026-11-18 |
| 13.6.5 | 0 | 2026-11-10 |
| 13.6.4 | 117 | 2026-10-27 |
| 13.6.3 | 0 | 2026-10-21 |
| 13.6.2 | 0 | 2026-10-20 |
| 13.6.1 | 0 | 2026-10-07 |
| 13.6.0 | 0 | 2026-09-29 |
| 13.5.4 | 0 | 2026-09-15 |
| 13.5.3 | 477 | 2026-08-28 |
| 13.5.2 | 0 | 2026-08-21 |
| 13.5.1 | 0 | 2026-08-20 |
| 13.5.0 | 0 | 2026-08-18 |
| 13.4.6 | 0 | 2026-06-19 |
| 13.4.5 | 0 | 2026-06-17 |
| 13.4.4 | 0 | 2026-06-15 |
| 13.4.3 | 0 | 2026-06-08 |
| 13.4.2 | 0 | 2026-06-03 |
| 13.4.1 | 0 | 2026-06-03 |
| 13.4.0 | 0 | 2026-06-01 |
| 13.3.5 | 0 | 2026-05-21 |
| 13.3.4 | 0 | 2026-05-19 |
| 13.3.3 | 0 | 2026-05-15 |
| 13.3.2 | 0 | 2026-05-14 |
| 13.3.1 | 0 | 2026-05-12 |
| 13.3.0 | 0 | 2026-05-07 |
| 13.2.4 | 0 | 2026-04-24 |
| 13.2.3 | 0 | 2026-04-21 |
| 13.2.2 | 0 | 2026-04-08 |
| 13.2.1 | 0 | 2026-03-31 |
| 13.2.0 | 0 | 2026-03-23 |
| 13.1.3 | 0 | 2026-03-19 |
| 13.1.2 | 0 | 2026-02-26 |
| 13.1.1 | 0 | 2026-02-11 |
| 13.1.0 | 0 | 2025-12-17 |
| 13.0.2 | 0 | 2025-12-04 |
| 13.0.1 | 0 | 2025-11-26 |
| 13.0.0 | 0 | 2025-11-11 |
| 9.5.2 | 0 | 2025-10-23 |
| 9.5.1 | 0 | 2025-10-03 |
| 9.5.0 | 1 958 | 2025-09-30 |
| 9.4.2 | 0 | 2025-09-02 |
| 9.4.1 | 1 | 2025-10-22 |
| 9.4.0 | 2 | 2025-08-12 |
| 9.3.1 | 0 | 2025-06-10 |
| 9.3.0 | 0 | 2025-05-19 |
| 9.2.1 | 0 | 2025-04-24 |
| 9.2.0 | 0 | 2025-04-10 |
| 9.1.0 | 0 | 2025-02-25 |
| 9.0.0 | 0 | 2024-11-12 |
| 9.0.0-rc.1.24511.1 | 0 | 2024-10-15 |
| 8.2.2 | 0 | 2024-10-24 |
| 8.2.1 | 0 | 2024-09-26 |
| 8.2.0 | 0 | 2024-08-29 |
| 8.1.0 | 0 | 2024-07-23 |
| 8.0.2 | 0 | 2024-06-28 |
| 8.0.1 | 0 | 2024-05-21 |
| 8.0.0 | 0 | 2024-05-21 |
| 8.0.0-preview.7.24251.11 | 0 | 2024-05-07 |
| 8.0.0-preview.6.24214.1 | 0 | 2024-04-23 |
| 8.0.0-preview.5.24201.12 | 0 | 2024-04-09 |