{"id":37044330,"url":"https://github.com/jonathanbout/simplecdn","last_synced_at":"2026-05-14T21:01:08.191Z","repository":{"id":264388388,"uuid":"893228666","full_name":"JonathanBout/SimpleCDN","owner":"JonathanBout","description":"A CDN server for serving your static files somewhat efficiently","archived":false,"fork":false,"pushed_at":"2026-04-06T15:09:45.000Z","size":780,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T15:42:25.422Z","etag":null,"topics":["cdn","index-generator","static-file-server"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/SimpleCDN","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonathanBout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-23T21:41:37.000Z","updated_at":"2026-04-06T15:09:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"470ab359-8639-4cda-b49b-099ded2499da","html_url":"https://github.com/JonathanBout/SimpleCDN","commit_stats":null,"previous_names":["jonathanbout/simplecdn"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/JonathanBout/SimpleCDN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanBout%2FSimpleCDN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanBout%2FSimpleCDN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanBout%2FSimpleCDN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanBout%2FSimpleCDN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonathanBout","download_url":"https://codeload.github.com/JonathanBout/SimpleCDN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathanBout%2FSimpleCDN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31481238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T14:34:32.243Z","status":"ssl_error","status_checked_at":"2026-04-06T14:34:31.723Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn","index-generator","static-file-server"],"created_at":"2026-01-14T05:07:09.066Z","updated_at":"2026-05-14T21:01:08.119Z","avatar_url":"https://github.com/JonathanBout.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleCDN\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/JonathanBout/SimpleCDN/dotnet.yml?style=flat-square\u0026logo=.net\u0026label=tests\u0026labelColor=%23512BD4\u0026link=https%3A%2F%2Fgithub.com%2FJonathanBout%2FSimpleCDN%2Factions%2Fworkflows%2Fdotnet.yml)\n\nSimpleCDN is, well, a simple CDN server. Built with relatively high r/w latency in mind (think NAS mount), it provides efficient ways to cache files, either using the built-in in-memory cache, or the Redis extension.\n\n![image](https://github.com/user-attachments/assets/8749c243-3396-455c-bc95-d99084477279)\n\n## How to use this in an existing project?\n### NuGet Packages\nSimpleCDN is available on NuGet:\n- [![SimpleCDN on NuGet](https://img.shields.io/nuget/v/SimpleCDN?style=flat-square\u0026logo=nuget\u0026label=SimpleCDN\u0026link=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FSimpleCDN)](https://NuGet.org/packages/SimpleCDN)\n- [![SimpleCDN.Extensions.Redis on NuGet](https://img.shields.io/nuget/v/SimpleCDN?style=flat-square\u0026logo=redis\u0026label=SimpleCDN.Extensions.Redis\u0026link=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FSimpleCDN.Extensions.Redis)](https://nuget.org/packages/SimpleCDN.Extensions.Redis)\n\n## How to use SimpleCDN Standalone\n### Using Docker\n\n**Tags:**\n- `latest`: the latest stable release, useful for quickly testing SimpleCDN.\n- `main`: the latest build of the main branch, usually on the last commit. Not recommended for anything as it may contain bugs or break.\n- `X.X[.X]`: pin to a specific minor or patch version. This provides higher precision and is recommended for production scenarios, especially with multi-instance environments. Supported versions can be found in the [tags listing](https://github.com/JonathanBout/SimpleCDN/tags). Note that the docker tag does not have the `v` prefix, so Git tag `v0.7.1` is Docker tag `0.7` or `0.7.1`.\n\n#### with `docker run`\n```\ndocker run -p \"\u003cyour_port\u003e:8080\" -v \"\u003cyour_cdn_data\u003e:/data:ro\" ghcr.io/jonathanbout/simplecdn\n```\nThis will pull and run the latest stable build of SimpleCDN.\n\n#### with `docker compose`\n```yml\nservices:\n  server:\n    image: ghcr.io/jonathanbout/simplecdn\n    volumes:\n    - \u003cyour_cdn_data\u003e:/data:ro # :ro to make the bind mount read-only\n    ports:\n    - \u003cyour_port\u003e:8080\n\n# === use below only if you want to use redis ===\n    environment:\n    - Cache__Redis__ConnectionString=redis:6379\n  redis:\n    image: redis\n```\n\n### Using dotnet\n#### dotnet run\n```\n# PublishAOT is not supported with dotnet run so we need to disable it\ndotnet run --property:PublishAot=false -- --CDN:DataRoot \u003cyour_cdn_data\u003e\n```\n\n### Variables\n\n#### Generic\n| key | value type | default value | description |\n|--|--|--|--|\n| `CDN:DataRoot` | a local path | `/data` when using the Docker image, otherwise required. | The data root, where the files to be served are stored. |\n| `CDN:AllowDotFileAccess` | `true` or `false` | `false` | Whether to allow access to dotfiles and directories. |\n| `CDN:ShowDotFiles` | `true` or `false` | `false` | Whether to show dotfiles in generated index files. When `AllowDotFileAccess` is `false`, `ShowDotFiles` is ignored. |\n| `CDN:BlockRobots` | `true` or `false` | `true` | Whether to request robots to not index CDN files. Its still up to the robots to adhere to this rule. |\n| `CDN:Footer` | Any HTML | `Powered by SimpleCDN` (with a link to this GitHub repo) | The text to place at the bottom of generated index files. |\n| `CDN:PageTitle` | Any `\u003ctitle\u003e` compatible string | `SimpleCDN` | The text to display in the browser's title bar. |\n| `CDN:GenerateIndexJson` | `true` or `false` | `false` | Whether to generate `index.json` files, just like `index.html` files but easier to read for machines. |\n\n#### Caching\n| key | value type | default value | description |\n|--|--|--|--|\n| `Cache:MaxAge` | A TimeSpan | One hour | How long an item may be stale (read nor written) before being removed. |\n| `Cache:MaxItemSize` | A size in kB within your devices memory. | `8_000` | The maximum size of a file to be cached. If the size exceeds this value, the file is streamed directly from the disk. |\n| `Cache:Type` | `InMemory`, `Redis` or `Disabled` | `InMemory`, or if Redis has been configured, `Redis` | What cache provider to use, if any. |\n| **In-Memory Options** |\n| `Cache:InMemory:MaxSize` | A size in kB | `500_000` | How big the cache may grow. When an entry is added, the oldest entries will be removed until this limit is met. |\n| **Redis Options** |\n| `Cache:Redis:ConnectionString` | A redis connection string | None. Required when using Redis | How SimpleCDN should connect to your Redis instance. |\n| `Cache:Redis:ClientName` | A string, without spaces | `SimpleCDN` | How SimpleCDN should identify itself to Redis. |\n| `Cache:Redis:KeyPrefix` | A string | `SimpleCDN` | A string to prepend to Redis entry keys. |\n\n#### Overriding the defaults:\n- With an environment variable, e.g. `CDN__DataRoot=/mnt/data`\n- With an appsettings.json file, e.g.\n```json\n{\n  \"CDN\": {\n    \"ShowDotFiles\": false\n  }\n}\n```\n- with a command line argument, e.g. `--CDN:MaxCachedItemSize 10000`\n\n_tip: see [github.com/thomhurst/ReadableTimeSpan](https://github.com/thomhurst/ReadableTimeSpan) for the supported TimeSpan formats_\n\n\u003e [!NOTE]  \n\u003e Command line arguments have precedence over appsettings.json and appsettings.json has precedence environment variables.\n \n## Development\n\nContributions are always welcome! Feel free to create an issue if you encounter problems. If you know a fix, a Pull Request is even better!\n\nIf you want to build a custom caching provider, take a look at the\n[extensions/README.md file](https://github.com/jonathanbout/simplecdn/tree/main/extensions/README.md).\n\n### Building the docker image\nBuilding a docker image can be done easily with `docker build`:\n```\ndocker build . -f src/standalone/Dockerfile -t simplecdn:local\n```\nBe aware the build context has to be the root of the repo, whilst the dockerfile is in the `src/standalone` folder.\n\n### Running tests\nExecuting the Unit tests can be done with just a single command:\n```\ndotnet test SimpleCDN.sln\n```\nThis will run the NUnit Unit Tests and the XUnit Integration Tests in the tests folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanbout%2Fsimplecdn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanbout%2Fsimplecdn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanbout%2Fsimplecdn/lists"}