CommunityToolkit.Aspire.Hosting.Ngrok
13.4.0
Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Ngrok --version 13.4.0
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Ngrok -Version 13.4.0
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.Ngrok" Version="13.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Ngrok" Version="13.4.0" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Ngrok" />
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.Ngrok --version 13.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CommunityToolkit.Aspire.Hosting.Ngrok, 13.4.0"
#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.Ngrok@13.4.0
#: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.Ngrok&version=13.4.0
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Ngrok&version=13.4.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CommunityToolkit.Aspire.Hosting.Ngrok library
Provides extension methods and resource definitions for an Aspire AppHost to configure a ngrok container.
Getting Started
Install the package
In your AppHost project, install the package using the following command:
dotnet add package CommunityToolkit.Aspire.Hosting.Ngrok
Example usage
Then, in the Program.cs file of app host, add a ngrok resource and add endpoints to be tunneled following methods:
var myService = builder.AddProject<Projects.MyService>();
var otherSevice = builder.AddProject<Projects.OtherService>();
var authToken = builder
.AddParameter("ngrok-auth-token", "your-ngrok-auth-token", secret: true);
builder.AddNgrok("ngrok", endpointPort: 59600) // omit endpointPort to use random port
.WithAuthToken(authToken)
.WithTunnelEndpoint(myService, "http", "<your-ngrok-domain>")
.WithTunnelEndpoint(otherSevice, "http"); // ngrok will generate a random domain for this service
Querying the ngrok tunneled endpoints
After the ngrok container has started, you can query the ngrok tunneled endpoints using api exposed by the ngrok container:
curl -H "Accept: application/json" -s http://localhost:59600/api/tunnels
This will return a JSON response with the ngrok tunneled endpoints.
{
"tunnels": [
{
"name": "my-http",
"ID": "5baa78f84cffb31a96cccf5bbe992451",
"uri": "/api/tunnels/my-http",
"public_url": "https://<your-ngrok-domain>",
"proto": "https",
"config": {
"addr": "http://host.docker.internal:5165",
"inspect": true
},
// ...
}, {
"name": "other-http",
"ID": "f7f1351d1307e3615ca7de310bf6bb61",
"uri": "/api/tunnels/other-http",
"public_url": "https://0849-94-134-176-242.ngrok-free.app",
"proto": "https",
"config": {
"addr": "http://host.docker.internal:3657",
"inspect": true
},
// ...
}
],
"uri": "/api/tunnels"
}
Additional Information
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 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.
-
net10.0
- Aspire.Hosting (>= 13.4.0)
-
net8.0
- Aspire.Hosting (>= 13.4.0)
-
net9.0
- Aspire.Hosting (>= 13.4.0)
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.4.1-beta.685 | 37 | 7/9/2026 |
| 13.4.1-beta.683 | 39 | 7/9/2026 |
| 13.4.1-beta.680 | 44 | 7/7/2026 |
| 13.4.1-beta.676 | 39 | 7/7/2026 |
| 13.4.1-beta.675 | 47 | 7/6/2026 |
| 13.4.1-beta.674 | 44 | 7/6/2026 |
| 13.4.0 | 8,774 | 6/2/2026 |
| 13.4.0-beta.671 | 49 | 7/3/2026 |
| 13.4.0-beta.654 | 64 | 6/18/2026 |
| 13.4.0-beta.651 | 61 | 6/17/2026 |
| 13.3.0 | 9,622 | 5/14/2026 |
| 13.2.1-beta.604 | 64 | 5/14/2026 |
| 13.2.1-beta.532 | 2,979 | 3/13/2026 |
| 13.2.1-beta.531 | 76 | 3/11/2026 |
| 13.2.1-beta.528 | 68 | 3/5/2026 |
| 13.1.2-beta.518 | 5,139 | 2/17/2026 |
| 13.1.2-beta.516 | 91 | 2/9/2026 |
| 13.1.2-beta.515 | 860 | 2/2/2026 |
| 13.1.2-beta.514 | 80 | 1/30/2026 |
| 13.1.2-beta.513 | 571 | 1/29/2026 |
Loading failed