Nano.Storage.Local
10.0.0-preview1
See the version list below for details.
dotnet add package Nano.Storage.Local --version 10.0.0-preview1
NuGet\Install-Package Nano.Storage.Local -Version 10.0.0-preview1
<PackageReference Include="Nano.Storage.Local" Version="10.0.0-preview1" />
<PackageVersion Include="Nano.Storage.Local" Version="10.0.0-preview1" />
<PackageReference Include="Nano.Storage.Local" />
paket add Nano.Storage.Local --version 10.0.0-preview1
#r "nuget: Nano.Storage.Local, 10.0.0-preview1"
#:package Nano.Storage.Local@10.0.0-preview1
#addin nuget:?package=Nano.Storage.Local&version=10.0.0-preview1&prerelease
#tool nuget:?package=Nano.Storage.Local&version=10.0.0-preview1&prerelease
Nano.Storage.Local
Local file share storage for Nano applications._
Table of Contents
Summary
Storage provider implementation for local file shares.
This provider is intended for mapping a Kubernetes persistent volume as a local file system. Registering it with Nano gives you access to the IPathProvider interface.
📖 Learn more about Nano Storage.
Try it out yourself using the Api.Storage.Local or Console.Storage.Local example.
Registration
Install the Nano.Storage.Local NuGet package.
dotnet add package Nano.Storage.Local;
Register the LocalFileShareProvider provider during application startup in the ConfigureServices(...) method.
...
.ConfigureServices(services =>
{
services
.AddNanoStorage<LocalFileShareProvider>();
})
...
Configuration
Add the storage configuration.
"Storage": {
"ShareName": null,
"HealthCheck": {
"UnhealthyStatus": "Unhealthy"
}
}
Docker Compose
In addition to registering and configuring storage, map a local folder to a container path in your docker-compose.yml to give the container access to the storage directory:
services:
{my.service}:
volumes:
- {share-name}:/mnt/{share-name}
Kubernetes
Next, two additional Kubernetes templates have been added to create and manage the storage, storage-storageclass.yaml and storage-pvc.yaml.
Also, as the container in Kubernetes is read-only, the following must also be added to your Kubernetes deployment.yaml or cronjob.yaml (depending on application type)
to ensure the file share is writable.
spec:
template:
spec:
containers:
volumeMounts:
- name: %SERVICE_NAME%-volume
mountPath: /mnt/%STORAGE_SHARE_NAME%
- name: tmp
mountPath: /tmp
volumes:
- name: %SERVICE_NAME%-volume
persistentVolumeClaim:
claimName: %SERVICE_NAME%-pvc
- name: tmp
emptyDir: {}
GitHub Actions
Last, The build-and-deploy.yaml needs additional environmental variables related to local storage provder.
env:
STORAGE_SHARE_NAME: {share-name}
STORAGE_SIZE: {size}
| 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
- Nano.Storage (>= 10.0.0-preview1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Nano.Storage.Local:
| Package | Downloads |
|---|---|
|
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.0-preview2 | 65 | 4/25/2026 |
| 10.0.0-preview1 | 71 | 4/24/2026 |
- .NET 10 support.
- Comprehensive rewrite with performance optimizations, improvements, and bug fixes.
- Not compatible with previous versions of Nano.