VOOZH about

URL: https://www.nuget.org/packages/Nextended.Aspire.Hosting.N8n/

⇱ NuGet Gallery | Nextended.Aspire.Hosting.N8n 10.1.10




👁 Image
Nextended.Aspire.Hosting.N8n 10.1.10

dotnet add package Nextended.Aspire.Hosting.N8n --version 10.1.10
 
 
NuGet\Install-Package Nextended.Aspire.Hosting.N8n -Version 10.1.10
 
 
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="Nextended.Aspire.Hosting.N8n" Version="10.1.10" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nextended.Aspire.Hosting.N8n" Version="10.1.10" />
 
Directory.Packages.props
<PackageReference Include="Nextended.Aspire.Hosting.N8n" />
 
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 Nextended.Aspire.Hosting.N8n --version 10.1.10
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nextended.Aspire.Hosting.N8n, 10.1.10"
 
 
#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 Nextended.Aspire.Hosting.N8n@10.1.10
 
 
#: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=Nextended.Aspire.Hosting.N8n&version=10.1.10
 
Install as a Cake Addin
#tool nuget:?package=Nextended.Aspire.Hosting.N8n&version=10.1.10
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Nextended.Aspire.Hosting.N8n provides n8n for .NET Aspire

A first-class .NET Aspire integration for n8n — the fair-code workflow-automation platform. One AddN8n("n8n") call gives you a fully wired n8n instance with a PostgreSQL backend, sensible self-hosting defaults, optional queue mode (Redis + workers), and 1:1 deployment to Azure Container Apps via azd up.

Table of Contents


Quick Start

var builder = DistributedApplication.CreateBuilder(args);

var n8n = builder.AddN8n("n8n");

builder.Build().Run();

This starts:

Service Default port
n8n editor / REST API 5678
PostgreSQL backend (internal, auto-created)

All values use sensible self-hosting defaults and are ready for local development and Azure Container Apps deployment.


Database Backend

By default AddN8n creates a dedicated PostgreSQL container as the n8n backend.

Use an existing Aspire PostgreSQL resource

var pg = builder.AddPostgres("pg");
var db = pg.AddDatabase("n8ndb");

var n8n = builder.AddN8n("n8n")
 .WithDatabase(db); // or: .WithDatabase(pg, "n8ndb")

The auto-created PostgreSQL container is removed automatically when you supply your own.

Use the bundled SQLite database

var n8n = builder.AddN8n("n8n")
 .WithSqlite(); // single container, data persisted in the n8n data dir

Queue Mode (Redis + Workers)

For scalable, production-like execution, enable queue mode. A plain Redis container is added as the broker and one or more worker containers process executions. Queue mode requires the PostgreSQL backend.

var n8n = builder.AddN8n("n8n")
 .WithQueueMode(workers: 3); // Redis + 3 worker containers

// or add/scale workers explicitly:
var n8n2 = builder.AddN8n("n8n2")
 .WithWorkers(2); // enables queue mode + 2 workers

A deliberately plain (non-TLS) Redis is used: Aspire's AddRedis enables TLS with a self-signed certificate, which the n8n/ioredis client cannot consume out of the box.

The Redis password defaults to a stable development value. Override it — ideally via an Aspire parameter, so the secret flows through user secrets locally and Key Vault on deployment:

var redisPassword = builder.AddParameter("n8n-redis-password", secret: true);

var n8n = builder.AddN8n("n8n")
 .WithQueueMode(workers: 2, redisPassword: redisPassword);
 // order-independent alternatives: .WithRedisPassword(redisPassword) / .WithRedisPassword("plain")

Security

Everything is overridable; secrets accept either a plain string (simple) or an Aspire parameter (recommended — user secrets locally, Key Vault on deployment):

var encryptionKey = builder.AddParameter("n8n-encryption-key", secret: true);

var n8n = builder.AddN8n("n8n")
 .WithEncryptionKey(encryptionKey); // or .WithEncryptionKey("a-stable-32+-char-secret")

The encryption key encrypts stored credentials. If it changes, existing credentials can no longer be decrypted. A stable development default is used when none is set — always set your own.

A note on WithBasicAuth

WithBasicAuth(user, password) sets the legacy N8N_BASIC_AUTH_* variables and only takes effect on n8n versions < 1.0. The modern default image uses the built-in owner-account / user management model, which is configured interactively on first launch — those variables are ignored there.


Public URLs & Timezone

var n8n = builder.AddN8n("n8n")
 .WithTimezone("Europe/Berlin")
 .WithWebhookUrl("https://n8n.example.com/")
 .WithEditorBaseUrl("https://n8n.example.com/");

In publish mode (azd up) the webhook and editor URLs default to the public n8n endpoint when not set explicitly, and the instance is configured for running behind the Azure Container Apps ingress (https, proxy hops, secure cookies).


Seeding Workflows & Credentials

For local development and integration tests, seed n8n with workflows/credentials on startup. A one-shot init container runs the n8n CLI import before the main instance starts (and the main instance waits for it to finish).

Seed workflows from files, from raw JSON content, or from a whole directory:

var n8n = builder.AddN8n("n8n")
 // individual workflow JSON files
 .WithWorkflows("workflows/order-sync.json", "workflows/cleanup.json")
 // raw JSON content (e.g. embedded resources / generated)
 .WithWorkflowContents(myWorkflowJsonString)
 // every *.json in a directory
 .WithWorkflowsFromDirectory(Path.Combine(builder.AppHostDirectory, "workflows"));

All variants are additive and collect into a single managed staging directory that is imported via n8n import:workflow --separate. Each file/content must be a workflow export (a single workflow JSON object, as produced by n8n export:workflow --separate).

Credentials work the same way from a directory:

var n8n = builder.AddN8n("n8n")
 .WithImportCredentials(Path.Combine(builder.AppHostDirectory, "credentials"));

Seeding uses local bind mounts and is skipped in publish mode. WithImportWorkflows(dir) remains available as an alias for WithWorkflowsFromDirectory(dir).


Accessing Resources

var n8n = builder.AddN8n("n8n").WithQueueMode(2);

var database = n8n.GetDatabase(); // IResourceBuilder<PostgresDatabaseResource>?
var redis = n8n.GetRedis(); // IResourceBuilder<RedisResource>?
var workers = n8n.GetWorkers(); // IReadOnlyList<...>
var endpoint = n8n.GetHttpEndpoint(); // EndpointReference

// Wire a frontend / service to n8n:
builder.AddProject<Projects.MyApi>("api")
 .WithReference(n8n) // ConnectionStrings:n8n = n8n URL
 .WaitFor(n8n);

Consuming the n8n API from a service

In a referenced service project:

builder.AddN8nClient("n8n", settings => settings.ApiKey = builder.Configuration["N8n:ApiKey"]);

// then inject:
public sealed class MyService(N8nApiClient n8n)
{
 public Task<HttpResponseMessage> ListWorkflows()
 => n8n.Http.GetAsync("/api/v1/workflows");
}

The base URL is resolved from ConnectionStrings:n8n (set automatically by WithReference(n8n)). A health check probing /healthz is registered as well.


Deployment

The whole topology deploys to Azure Container Apps via azd:

azd init
azd up

All containers and their configuration are translated 1:1 from the Aspire model into Bicep/ACA resources. The n8n editor is exposed via an external HTTPS ingress; PostgreSQL, Redis and the workers stay internal.


Defaults

Setting Default
Image n8nio/n8n:1.110.1
Editor / REST port 5678
Database dedicated PostgreSQL container
Encryption key insecure dev default (override with WithEncryptionKey)
Timezone UTC
Queue mode disabled
Diagnostics / telemetry disabled

Override the image with WithImage("n8nio/n8n", "<tag>") or WithImageTag("<tag>").

Supported frameworks

  • .NET 8.0
  • .NET 9.0
  • .NET 10.0
Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows 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
10.1.10 46 6/16/2026