SimpleCDN 1.1.0
dotnet add package SimpleCDN --version 1.1.0
NuGet\Install-Package SimpleCDN -Version 1.1.0
<PackageReference Include="SimpleCDN" Version="1.1.0" />
<PackageVersion Include="SimpleCDN" Version="1.1.0" />
<PackageReference Include="SimpleCDN" />
paket add SimpleCDN --version 1.1.0
#r "nuget: SimpleCDN, 1.1.0"
#:package SimpleCDN@1.1.0
#addin nuget:?package=SimpleCDN&version=1.1.0
#tool nuget:?package=SimpleCDN&version=1.1.0
SimpleCDN
SimpleCDN is one of the simplest and easiest-to-use CDN servers. All you need for a basic setup is two extra lines in your startup code:
var builder = WebApplication.CreateBuilder();
+ var cdnBuilder = builder.Services.AddSimpleCDN(options => options.DataRoot = "/var/www/static");
var app = builder.Build();
+ app.MapGroup("/cdn").MapSimpleCDN();
This will map the SimpleCDN endpoint to /cdn and serve files from /var/www/static.
Features
- Automatic compression (currently supported: gzip, deflate, brotli)
- In-memory caching
- Redis caching, with the SimpleCDN.Extensions.Redis package. Although it's a few milliseconds slower than the in-memory cache, it saves you from having files in memory multiple times with multiple instances.
SimpleCDN is also available as a standalone application with a docker container: ghcr.io/jonathanbout/simplecdn.
Configuration
General configuration
This configuration is for general settings for the CDN server.
var cdnBuilder = builder.Services.AddSimpleCDN(options => { ... });
// or
cdnBuilder.Configure(options => { ... });
options.DataRoot: The root directory to serve files from. This is a required property.options.Footer: Set a custom footer for generated index pages. Default isPowered by SimpleCDN, with a link to the github repo.options.PageTitle: Set a custom title for generated index pages. Default isSimpleCDN.options.AllowDotfileAccess: Whether to allow access to files starting with a dot. Default isfalse.options.ShowDotFiles: Whether to show files starting with a dot. Default isfalse. Ifoptions.AllowDotfileAccessisfalse, this option is ignored.options.BlockRobots: Whether to block robots from indexing the CDN. Default istrue.options.GenerateIndexJson: Whether to generateindex.jsonfiles when requested, just like the standardindex.json. For every directory anindex.jsonwill be available, unless one exists on disk already. Default isfalse.
General caching configuration
This configuration is used by the Cache Manager and uses it to configure the caching provider.
cdnBuilder.ConfigureCaching(options => { ... });
options.MaxAge: The maximum time a file can be unused before it is removed from the cache. Default is 1 hour.options.MaxItemSize: The maximum size of a file to cache in kB. When the size of a file exceeds this threshold, it will be streamed directly from disk. Default is8_000(8 MB).
In-memory caching configuration
This configuration is used by the in-memory cache provider.
cdnBuilder.AddInMemoryCache(options => { ... });
options.MaxSize: The maximum size of the cache in kB. Default is500_000(500MB). When this limit is passed, the least recently used files are removed from the cache until the size is below the limit.
| 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SimpleCDN:
| Package | Downloads |
|---|---|
|
SimpleCDN.Extensions.Redis
An extension for using Redis with SimpleCDN, the static file server. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0 | 119 | 5/14/2026 |
| 1.1.0-pre2 | 105 | 5/14/2026 |
| 1.1.0-pre1 | 111 | 5/4/2026 |
| 1.0.7 | 126 | 4/6/2026 |
| 1.0.6 | 721 | 12/2/2025 |
| 1.0.5 | 272 | 8/26/2025 |
| 1.0.4 | 249 | 6/3/2025 |
| 1.0.3 | 240 | 5/2/2025 |
| 1.0.2 | 183 | 2/21/2025 |
| 1.0.1 | 186 | 2/11/2025 |
| 1.0.0 | 180 | 2/11/2025 |
| 0.9.0-pre1 | 155 | 1/29/2025 |
| 0.8.0 | 187 | 1/23/2025 |
| 0.8.0-rc7 | 175 | 1/23/2025 |
| 0.8.0-rc6 | 173 | 1/21/2025 |
| 0.8.0-rc5 | 155 | 1/17/2025 |
| 0.8.0-rc4 | 153 | 1/16/2025 |
| 0.8.0-rc3 | 138 | 1/15/2025 |
| 0.8.0-pre11 | 158 | 1/17/2025 |
| 0.8.0-pre10 | 163 | 1/17/2025 |