Runlight.Server 0.5.0

dotnet tool install --global Runlight.Server --version 0.5.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Runlight.Server --version 0.5.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Runlight.Server&version=0.5.0
                    
nuke :add-package Runlight.Server --version 0.5.0
                    

Runlight for .NET

Runlight is privacy friendly web analytics that runs inside your own ASP.NET Core app. It counts visitors without cookies and without storing anyone’s IP address. The numbers stay in your database, and the dashboard is served from your domain at /runlight.

These packages are the .NET version of Runlight. They need .NET 10 or later, and the runlight tool also runs Runlight on a domain of its own. They answer every request the way the TypeScript library does and use the same tables, so either one can read the other’s database.

Package What it is
Runlight The library, with no dependencies of its own.
Runlight.AspNetCore MapRunlight() and UseRunlight() for ASP.NET Core.
Runlight.Server The runlight tool, which runs the standalone server.

Get started

Add the ASP.NET Core package and the driver for your database.

dotnet add package Runlight.AspNetCore
dotnet add package Microsoft.Data.Sqlite

Create one instance for your app, and map its routes.

using Microsoft.Data.Sqlite;
using Runlight;
using Runlight.Store;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSingleton(new Runlight.Runlight(new RunlightOptions
{
    Store = Stores.Sqlite(SqliteFactory.Instance, "data/runlight.db"),
    Site = new SiteOptions { Name = "example.com", Hostnames = ["example.com"], Timezone = "Europe/London" },
}));

var app = builder.Build();
app.MapRunlight();
app.Run();

Add the script to every page, just before </head>.

<script defer src="/runlight/s.js"></script>

Set RUNLIGHT_TOKEN to a long random string, then open /runlight/?token= followed by that string to sign in.

To run Runlight on a domain of its own, install the tool and start it in an empty folder.

dotnet tool install --global Runlight.Server
runlight serve

The .NET guide has the Postgres, MySQL, and MariaDB stores, the scheduled check, sign-in accounts, and the standalone server’s settings.

License

Runlight is MIT licensed.

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.

This package has no dependencies.

Version Downloads Last Updated
0.5.0 55 11/15/2026
0.4.3 86 11/10/2026
0.4.2 80 11/10/2026
0.4.1 85 11/10/2026
0.4.0 94 11/9/2026
0.3.3 92 11/6/2026
0.3.2 114 10/27/2026
0.3.1 105 10/26/2026
0.3.0 112 10/24/2026
0.2.0 102 10/18/2026
0.1.8 114 10/17/2026
0.1.7 105 10/15/2026
0.1.6 101 10/14/2026
0.1.5 96 10/14/2026
0.1.4 103 10/14/2026
0.1.3 103 10/12/2026
0.1.2 101 10/12/2026
0.1.1 101 10/11/2026
0.1.0 109 10/10/2026