---
title: SQLite
description: Configure DurableStack with SQLite for local or single-instance durable scenarios.
order: 55
available_in: [dotnet, nodejs]
---

# SQLite

SQLite provides durable local persistence with minimal setup.

It is a strong fit for local development and small single-instance deployments.

## Registration

:::code-group
```csharp
using DurableStack.Hosting.DependencyInjection;

var connectionString = "Data Source=durable_stack.db";

builder.Services.AddDurableStackSqlite(connectionString, options =>
{
    options.WorkerName = $"local-api-{Environment.MachineName}-{Environment.ProcessId}";
});
```

```typescript
import { createDurableStackSqlite } from "durablestack";

const { runtime } = await createDurableStackSqlite(
  { connectionString: "Data Source=durable_stack.db" },
  {
    workerName: `local-api-${process.pid}`
  }
);
```
:::

## Operational notes

- Use persistent volume storage if data must survive container restarts.
- SQLite is generally not the first choice for high-scale distributed clusters.
- Keep retention/pruning enabled to avoid local file growth.
