How to switch from Sentry to OpenFault
OpenFault is a free, MIT-licensed, self-hosted error tracker that accepts events from the Sentry SDKs you already ship. To switch, start one container, create a project, and replace the DSN in your SDK config. It is for engineers weighing self-hosted Sentry alternatives who want one container and SQLite, with no Redis, Kafka, Postgres or ClickHouse.
OpenFault is in early development. Run it next to Sentry before you switch Sentry off.
The short page on this is Drop-in Sentry replacement. The migration summary is Migrate from Sentry. This post walks through the steps in order.
1. Start the container
docker run -d --name openfault -p 8080:8080 -v openfault-data:/data ghcr.io/openfault/openfault:latest
Nothing needs configuring first: no env vars, no config file. Everything OpenFault keeps, the SQLite database and its generated secret, lives in /data. Details are in the install guide.
Open http://localhost:8080. The setup wizard asks for the organization name, your name, email and password (10+ characters), and the first project’s name and platform. You land on the project’s SDK setup page with its DSN.
If the DSN shows http://localhost:8080, set OPENFAULT_BASE_URL to your public URL so DSNs and links use the right host. Put OpenFault behind a proxy that terminates HTTPS; the install guide has a three-line Caddy example.
2. Swap the DSN
The DSN looks like https://<key>@errors.example.com/<project-id>. Change only that value. No fork, no plugin, no wrapper.
Sentry.init({
- dsn: "https://[email protected]/56",
+ dsn: "https://[email protected]/1",
});
Per SDK, from Send your first event:
- Rails (sentry-ruby): set
config.dsninconfig/initializers/sentry.rb. - Next.js (@sentry/nextjs): set the DSN in
sentry.client.config.ts,sentry.server.config.tsandsentry.edge.config.ts. - Node (@sentry/node):
Sentry.init({ dsn: "..." }). - Python (sentry-sdk):
sentry_sdk.init(dsn="..."). - iOS: keep
sentry-cocoaand set the new DSN the same way.
Rails, Next.js, Node and Python are the tested SDKs.
3. Check it landed
Sentry.captureException(new Error("hello from OpenFault"));
Open the project. A new issue shows up within a second or two.
4. Source maps and dSYMs
Point sentry-cli at your host with a write token from Settings → API tokens. Debug-ID bundles only:
export SENTRY_URL=https://errors.example.com
export SENTRY_ORG=openfault # any value; one install is one org
export SENTRY_PROJECT=web # your project's slug
export SENTRY_AUTH_TOKEN=of_... # a write token
sentry-cli sourcemaps inject ./dist
sentry-cli sourcemaps upload ./dist
@sentry/nextjs uploads during next build with the same four variables. For iOS, sentry-cli debug-files upload sends dSYMs, Mach-O only. See Source maps and dSYMs.
5. Connect an agent over MCP (optional)
OpenFault is also an MCP server, at /mcp on your host. In Claude Code:
claude mcp add -t http openfault https://errors.example.com/mcp -H "Authorization: Bearer of_..."
Cursor and a generic .mcp.json are covered in the MCP docs. Give agents a read token unless you want them to triage. A person approves an issue with Approve for fix before an agent gets its frames, breadcrumbs and request data.
What does not carry over
- History: no import. Keep Sentry read-only until you stop needing old issues.
- Tracing, replay, profiling: accepted and thrown away with a
200. OpenFault tracks errors. - Releases from CI:
sentry-cli releasesanddeployssucceed but record nothing. Releases come from events. - Older uploads: legacy release-name source maps are not supported.
Common questions
Do I have to change my Sentry SDK?
No. Keep the official Sentry SDK and change the DSN. Rails, Next.js, Node and Python are tested.
Can I import my Sentry history?
No. There is no import. Keep Sentry read-only until you stop needing old issues.
Is OpenFault ready to replace Sentry in production?
OpenFault is in active development and not production ready. Run it next to Sentry before you switch Sentry off.
What happens to tracing, replay and profiling data?
It is accepted and thrown away with a 200. Rate-limit headers tell SDKs to stop sending it. OpenFault tracks errors.
Does OpenFault have an MCP server?
Yes. Connect Claude Code, Cursor or any client that speaks Streamable HTTP and can send an Authorization header. Give agents a read token unless you want them to resolve or mute issues.
Comparing options first? See self-hosted Sentry alternatives.