CertificateService 0.1.0

dotnet add package CertificateService --version 0.1.0
                    
NuGet\Install-Package CertificateService -Version 0.1.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="CertificateService" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CertificateService" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="CertificateService" />
                    
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 CertificateService --version 0.1.0
                    
#r "nuget: CertificateService, 0.1.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 CertificateService@0.1.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=CertificateService&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=CertificateService&version=0.1.0
                    
Install as a Cake Tool

CertificateService is available as a nuget package.

CertificateService supports either direct usage or usage as part of a YARP reverse proxy configuration. Here is an example appsettings.json configuration file for direct usage:

{
  "AllowedHosts": "*",
  "Urls": "http://*:80;https://*:443",
  "CertificateService": {
    "AcceptTermsOfService": true,
    "CertPath": ".certs",
    "Email": "email@user.com",
    "Password": "some-password",
    "CsrInfo": {
      "CountryName": "AU",
      "State": "NSW",
      "Locality": "Sydney",
      "Organization": "MyCompany Limited",
      "OrganizationUnit": "IT"
    },
    "Domains": [ "example.com", "www.example.com" ]
  }
}

Note: The CertificateService:Password value protects the generated .pfx certificate files and should not be stored directly in appsettings.json for production use. Use an environment variable, user secrets, Azure Key Vault, AWS Secrets Manager, Docker/Kubernetes secrets, or another secure secret store.

The .certs directory contains generated certificates and ACME account material. Do not commit it to source control.

Here is an example asp.net Program.cs using CertificateService:

using CertificateService;

var builder = WebApplication.CreateBuilder(args);

// Only enable Let's Encrypt certificate provisioning outside development.
// In development, use the normal ASP.NET Core developer certificate.
if (!builder.Environment.IsDevelopment())
{
    builder.Services.AddCertificateService();

    // Configure Kestrel SNI certificate selection using CertificateService.
    builder.WebHost.UseCertificateServiceSniSelector();
}

var app = builder.Build();

if (!app.Environment.IsDevelopment())
{
    // Let's Encrypt needs to reach:
    // http://your-domain/.well-known/acme-challenge/{token}
    app.UseCertificateServiceAcmeHttp01();

    // Optional: expose certificate status as JSON at /.well-known/status
    app.MapCertificateServiceStatus();

    // Redirect normal HTTP traffic to HTTPS after ACME challenge handling.
    app.UseHttpsRedirection();
}

app.MapGet("/", () => "Hello from CertificateService demo.");

app.Run();
Product Compatible and additional computed target framework versions.
.NET 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
0.1.0 94 5/12/2026
0.1.0-alpha.1 64 5/12/2026