Nano.Storage
10.0.0-preview1
See the version list below for details.
dotnet add package Nano.Storage --version 10.0.0-preview1
NuGet\Install-Package Nano.Storage -Version 10.0.0-preview1
<PackageReference Include="Nano.Storage" Version="10.0.0-preview1" />
<PackageVersion Include="Nano.Storage" Version="10.0.0-preview1" />
<PackageReference Include="Nano.Storage" />
paket add Nano.Storage --version 10.0.0-preview1
#r "nuget: Nano.Storage, 10.0.0-preview1"
#:package Nano.Storage@10.0.0-preview1
#addin nuget:?package=Nano.Storage&version=10.0.0-preview1&prerelease
#tool nuget:?package=Nano.Storage&version=10.0.0-preview1&prerelease
Nano.Storage
Storage provider common implementations for Nano applications.
⚠️ This NuGet is transitive and included in other Nano Packages, and is not meant to be included directly.
Table of Contents
Summary
Add a flexible, provider-agnostic file storage layer to your Nano applications.
To connect a filshare, register an IStorageProvider. Each provider handles its own setup, connectivity, and optional health checks,
while Nano exposes a consistent interface to your application.
Once a storage provider is registered, Nano automatically registers an IPathProvider, which can be injected anywhere in your application.
This gives easy access to the storage root fileshare directory as well as the temporary (tmp) directory.
Registration
To use Nano.Storage, register a storage provider as a service dependency in your application.
Use the AddNanoStorage<TProvider>() extension method, where TProvider is your chosen IStorageProvider implementation:
...
.ConfigureServices(services =>
{
services
.AddNanoStorage<TProvider>();
})
...
In addition to registering storage, map a local folder to a container path in in your docker-compose.yml so the container can access the storage directory.
services:
{service-name}:
volumes:
- ./bin/{share-name}:/mnt/{share-name}
When deploying Nano applications to Kubernetes, ensure your deployment.yaml or cronjob.yaml, depending on the application type, maps the shared storage directory and
a secret is created for the storage account. The exact configuration depends on the storage provider. See supported Storage Providers for details.
⚠️ Optionally, map a writable
tmpdirectory for temporary files.
This allows the main container to remain immutable while supporting temporary data.
spec:
template:
spec:
containers:
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}
Last, the build-and-deploy needs to have additional environmental variables defined used by the storage provider. Again exactly what variables depends on the specific
storage provider. See supported Storage Providers for details.
Configuration
The Storage section in the configuration defines the storage provider and related settings used by the application.
| Setting | Type | Default | Description |
|---|---|---|---|
ShareName |
string | null | The logical container, share, or bucket name used for file storage. |
Credentials |
object | null | Optional. The credential or account of the storage provider. |
Credentials.Id |
string | null | Required. The account id, username or tenant identifier used to authenticate with the storage provider. |
Credentials.Secret |
string | null | Required. The password, secret, key, password or credential used to authenticate with the storage provider. |
HealthCheck |
object | null | Storage health check. Only relevant for NanoApiApplication and NanoWebApplication.. |
"Storage": {
"ShareName": null,
"Credentials": {
"Id": null,
"Secret": null
},
"HealthCheck": null
}
📖 Learn more about Application Configuration here.
Health Checks
When health checks are enabled in the storage configuration, Nano automatically registers a health check for the configured storage provider.
This allows the application to verify that the underlying storage fileshare connection is available and operational. The health check integrates with ASP.NET Core's health check system and can be used by monitoring tools, load balancers, or container orchestrators to determine the health status of the application.
| Setting | Type | Default | Description |
|---|---|---|---|
HealthCheck.UnhealthyStatus |
enum | Unhealthy | The health status reported when the storage provider is unavailable. Only relevant for NanoApiApplication and NanoWebApplication. |
"Storage": {
"HealthCheck": {
"UnhealthyStatus": "Unhealthy"
}
}
⚠️ In order for storage healthcheck to take effect, healthchecks must be enabled for the application. Read more about Nano Health Check.
Storage Providers
Nano provides several storage providers, so usually there is no need to implement a custom provider for your application.
Storagae providers implements the interface IStorageProvider. It contains a single method Configure(...), that is responsible for handling
any configuration and setup required for the storage provider.
To create a new storage provider, implement the IStorageProvider interface. Make sure to register all required services in the Configure(...) method,
and then register your provider with the application using .AddNanoStorage<TProvider>().
The following storage providers are currently supported in Nano.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.7)
- Nano.Storage.Abstractions (>= 10.0.0-preview1)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Nano.Storage:
| Package | Downloads |
|---|---|
|
Nano.Storage.Azure
This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details. |
|
|
Nano.Storage.Local
This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details. |
|
|
Nano.All
This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.6 | 104 | 8/16/2026 |
| 10.0.5 | 139 | 8/7/2026 |
| 10.0.4 | 147 | 8/5/2026 |
| 10.0.3 | 156 | 8/4/2026 |
| 10.0.2 | 158 | 8/2/2026 |
| 10.0.1 | 148 | 8/2/2026 |
| 10.0.0 | 151 | 7/19/2026 |
| 10.0.0-rc5 | 146 | 7/15/2026 |
| 10.0.0-rc4 | 162 | 7/13/2026 |
| 10.0.0-rc3 | 302 | 7/9/2026 |
| 10.0.0-rc2 | 152 | 7/8/2026 |
| 10.0.0-rc1 | 253 | 6/4/2026 |
| 10.0.0-preview2 | 147 | 4/25/2026 |
| 10.0.0-preview1 | 139 | 4/24/2026 |
- .NET 10 support.
- Comprehensive rewrite with performance optimizations, improvements, and bug fixes.
- Not compatible with previous versions of Nano.