CommunityToolkit.Aspire.Hosting.Logto 13.6.1

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Logto --version 13.6.1
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Logto -Version 13.6.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Logto" Version="13.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Logto" Version="13.6.1" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Logto" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommunityToolkit.Aspire.Hosting.Logto --version 13.6.1
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Logto, 13.6.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CommunityToolkit.Aspire.Hosting.Logto@13.6.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Logto&version=13.6.1
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Logto&version=13.6.1
                    
Install as a Cake Tool

Logto Hosting Extensions for .NET Aspire

Overview

This package provides .NET Aspire hosting extensions for integrating Logto with your AppHost. It includes helpers for wiring Logto to PostgreSQL (via Aspire.Hosting.Postgres.AddPostgres()) and optional Redis caching, and exposes fluent APIs to configure the required environment variables for Logto database connectivity, initialization, and caching.


Features

  • Configure Logto to use PostgreSQL via AddLogto(...).
  • Optional Redis integration for caching via .WithRedis(...).
  • Fluent helpers to set environment variables:
    • DB_URL (Postgres connection string)
    • REDIS_URL
    • NODE_ENV
    • ADMIN_ENDPOINT
  • Data persistence via:
    • .WithDataVolume() (managed Docker volume)
    • .WithDataBindMount() (host bind mount).
  • Configurable Admin Console access and proxy header trust (TRUST_PROXY_HEADER).
  • Built-in health check for /api/status.

Usage (AppHost)

using Aspire.Hosting;
using Aspire.Hosting.Postgres;
var postgres = builder.AddPostgres("postgres");

// Basic setup connecting to Postgres
var logto = builder
    .AddLogto("logto", postgres)
    .WithDatabaseSeeding();

// Advanced setup with Redis and specific configurations
var redis = builder.AddRedis("redis");

var logtoSecure = builder
    .AddLogto("logto-secure", postgres, databaseName: "logto_secure_db")
    .WithRedis(redis)
    .WithAdminEndpoint("https://admin.example.com")
    .WithDisableAdminConsole(false)
    .WithTrustProxyHeader(true)      // optional override, default is already true
    .WithSensitiveUsername(true)
    .WithNodeEnv("production");

Logto will be configured with:

  • DB_URL=postgresql://.../logto_db (constructed from the Postgres resource)
  • REDIS_URL=... (when Redis is attached with .WithRedis(...))
  • ADMIN_ENDPOINT=... (when configured with .WithAdminEndpoint(...))
  • NODE_ENV=production (when configured with .WithNodeEnv(...))
  • Auto-configured health checks on /api/status.

Notes

  • Extension methods are in the Aspire.Hosting namespace.
  • Call .WithDatabaseSeeding() to run the database seeding command npm run cli db seed -- --swe && npm start on startup.
  • Container ports are 3001 (HTTP) and 3002 (Admin). Host ports are random by default unless explicitly configured.
Product 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.6.2-beta.959 40 10/27/2026
13.6.1 58 10/26/2026
13.6.1-beta.950 56 10/26/2026
13.6.1-beta.938 54 10/24/2026
13.6.1-beta.935 59 10/15/2026
13.6.1-beta.933 53 10/13/2026
13.6.1-beta.930 50 10/11/2026
13.6.0 141 10/1/2026
13.6.0-beta.914 56 10/1/2026
13.6.0-beta.910 62 9/30/2026
13.5.1-beta.895 65 9/29/2026
13.5.1-beta.806 63 9/28/2026
13.5.1-beta.803 63 9/28/2026
13.5.1-beta.781 49 9/28/2026
13.5.1-beta.779 53 9/28/2026
13.5.1-beta.777 55 9/28/2026
13.5.1-beta.776 66 9/28/2026
13.5.1-beta.775 65 9/27/2026
13.5.1-beta.770 58 9/25/2026
13.5.1-beta.767 60 9/22/2026
Loading failed