Self-host Trench
trench-js@0.0.17Open-source analytics infrastructure for event tracking
- Stars
- 1 665
- CPU
- 4 CPU cores
- RAM
- 4GB RAM
- Port
- 4000 (Trench server HTTP API)
- Requires
- Apache Kafka, ClickHouse
What is Trench?
This analytics platform runs on Kafka and ClickHouse to ingest and query high-volume event streams in real time. It implements the Segment tracking API, respects GDPR and PECR rules without cookies, and lets users export data through webhooks. A single Docker Compose file spins up the API, Kafka, and ClickHouse together, while a managed cloud tier adds autoscaling and SLA guarantees.
Should you self-host Trench?
Trench scores 52/100 on selfhost.directory (how scoring works) and ranks #9 of 27 in Analytics. It has 1 665 GitHub stars.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Typescript.
Its closest alternative on selfhost.directory is PostHog (81/100, 40 492 stars). It scores higher overall, so compare the two before you pick. See Trench vs PostHog side by side.
Features
- GDPR/PECR compliance
- Kafka SASL authentication
- Kafka SSL/TLS support
- LLM/RAG support
- Raw SQL query execution
- Real-time event processing
- Real-time SQL queries
- Segment API Compatibility
- Webhook destinations
Trench README
More in Data Pipeline
airbyteAirbyte is a self-hosted data movement platform with hundreds of connectors for ELT pipelines and AI agents, deployable via Docker, Kubernetes, and abctl CLI.
Apache HopApache Hop is a self-hosted, open-source data integration platform for visual pipelines that run on local, Hop Server, Spark, Flink, and Dataflow without rewriting.
apache-nifiApache NiFi is an open-source, self-hosted data flow automation platform with browser-based UI, provenance tracking, and secure configuration.
DaguSelf-hosted, open-source workflow orchestrator: declarative YAML DAGs run shell, Docker, Kubernetes and SSH steps from one binary, no database required.
DuckleDuckle is a free, open-source, self-hosted ETL platform: build pipelines visually or in Python/SQL, compile to DuckDB SQL, run on your own infra.
GlassFlow ClickHouse ETLSelf-hosted, open-source stream processor that ingests data from Kafka and OTLP into ClickHouse with deduplication, filtering, and temporal joins.
Grai CoreGrai is a self-hosted, open-source data lineage platform with pre-built connectors for Snowflake, BigQuery, dbt, and more.
jitsuOpen-source MIT customer data platform and Segment alternative: capture events and stream them to warehouses and SaaS tools; self-hosted on Kubernetes or Docker.
lakehouse-at-homeSelf-hosted lakehouse for local data engineering with Spark, Iceberg, and Kafka via Docker Compose, plus optional Airflow and test data tools.
logging-flumeOpen-source, self-hosted ingestion service from Apache: streaming agents with sources, channels and sinks move large amounts of log data to HDFS, Kafka or HBase.
logstashAn open-source server-side data pipeline that ingests, transforms and routes events with 200+ plugins; self-hosted via Docker, deb/rpm packages or tar/zip downloads.
multiwovenSelf-hosted, open-source Reverse ETL platform syncing data from Snowflake, BigQuery, Redshift to 50+ tools like Salesforce, HubSpot, Slack. AGPL-3.0 licensed.
0 comments