Jitsu: An Open-Source Segment Alternative You Can Self-Host
Segment is a great product with a pricing model that punishes success. It bills by monthly tracked users, so the more visitors your site gets, the more you pay to collect data you then send to a warehouse you already pay for.
Jitsu does the same job, collecting events from your sites, apps and servers and delivering them to your warehouse and tools, under an MIT licence. Here's what it does, what you can realistically run on a single server, and how to send your first events.
What Jitsu Does
From the Jitsu README:
- Collects events from the browser, mobile apps and servers, through SDKs, an HTTP API, or by forwarding from an existing Segment setup.
- Delivers them to destinations such as ClickHouse, BigQuery, Snowflake, Redshift, Postgres and S3, plus dozens of SaaS tools. Delivery is streamed or micro-batched, as often as every minute. Jitsu contrasts that with Segment loading warehouses once or twice a day.
- Runs Functions, small JavaScript snippets that filter, transform or enrich each event before delivery.
- Syncs data in from third-party sources using Airbyte-compatible connectors.
- Builds user profiles from the event stream, and shows every event live for debugging.
On pricing, the comparison is simple. Segment charges per tracked user. Jitsu's hosted cloud charges by event volume, and self-hosting has no usage billing at all. You pay for the server.
The Honest Part: What Runs Where
Two things to know before you plan a migration.
Full Jitsu now wants Kubernetes. The self-hosting docs say a feature-complete deployment requires a Kubernetes cluster. Functions and profile builders run in separate deployments managed by a Jitsu operator, and connector syncs run as Kubernetes CronJobs. The Docker Compose setup is marked as deprecated, and the docs say it can't run Functions, profile builders or connector syncs.
Releases are labelled beta. The project ships very frequently, several builds a week, all tagged as betas of 2.15. It's actively developed, but you won't find a "stable" tag to pin to.
So here's how I'd think about it:
| You need | Single server (Docker) | Kubernetes |
|---|---|---|
| Collect events from sites and apps | Yes | Yes |
| Deliver to a warehouse or tools | Yes | Yes |
| Live event debugging | Yes | Yes |
| Functions (transformations) | Not per the current docs | Yes |
| Connector syncs and profile builder | No | Yes |
If your goal is "stop paying Segment to move events into ClickHouse", a single server covers it. If you rely heavily on transformations in the pipeline, plan for Kubernetes, or do the transformations in your warehouse instead.
Sending Your First Events
Once Jitsu is running, create a Site in the console to get a write key. For a website, add the script tag:
<script async src="https://jitsu.example.com/p.js" data-write-key="YOUR_BROWSER_WRITE_KEY"></script>
That sends a page event automatically. Add data-user-id to identify logged-in users, or data-init-only="true" if you'd rather send events yourself.
From a backend, use the HTTP API with a server-to-server write key:
curl https://jitsu.example.com/api/s/track \
-H 'Content-Type: application/json' \
-H 'X-Write-Key: keyId:keySecret' \
-d '{"type":"track","event":"signup_completed","userId":"user-123","properties":{"plan":"pro"}}'
Then add a destination, such as your ClickHouse or Postgres, connect it to the Site, and watch events arrive in Live Events.
Moving Off Segment Gradually
You don't have to rip anything out on day one. Jitsu documents a Segment proxy: in Segment, add a Webhooks (Actions) destination pointing at your Jitsu endpoint with a server-to-server write key. Your existing tracking code keeps working, and events flow into Jitsu alongside Segment. Once you trust the data in your warehouse, swap the tracking snippet and turn the Segment source off.
Running It on Elestio
Jitsu on Elestio starts at $16/month for the VM, with backups, updates and monitoring included. It runs on a single dedicated VM, so expect the single-server column of the table above. Check in your console which features your instance offers before you build a pipeline around Functions. The Clone button in your dashboard is a cheap way to test a new release before your production instance takes it.
Troubleshooting
Events don't show up in Live Events. Check the write key: a browser key won't work for server-to-server calls, and the other way round. Then check that the script loads from your Jitsu domain without being blocked by an ad blocker.
The browser snippet is blocked. Ad blockers often block known analytics domains. Serve Jitsu from your own subdomain, such as data.yourcompany.com.
Events arrive but never reach the warehouse. The destination isn't connected to the Site, or its credentials are wrong. The destination's logs in the console show the error.
The Functions menu is missing or does nothing. On a Docker setup, that's expected according to Jitsu's docs. Move the transformation into your warehouse, or use a Kubernetes deployment.
Segment-forwarded events are rejected. The Webhooks destination is using a browser write key, or the URL doesn't end with the event type. Follow the proxy guide's mapping steps.
Thanks for reading ❤️ See you in the next one 👋