Self-host PgStack
v2.2.0Creates search and audit replicas for your Postgres database
- Stars
- 1 537
- Port
- 54321 (Postgres-compatible SQL endpoint)
- Requires
- PostgreSQL
ghcr.io/pgstack-io/pgstackWhat is PgStack?
PgStack links to a Postgres database through logical replication and builds two read-only replicas. One replica focuses on search, offering keyword, semantic, and combined ranking with optional OpenAI embeddings. The other replica records every row change with before and after snapshots for auditing. The software runs in one Docker container and serves a Postgres-compatible SQL interface on port 54321. A YAML file controls which tables and columns are indexed. The core is AGPL-3.0 licensed, while a paid cloud edition provides a web dashboard, team features, managed embeddings, autoscaling, and hardened security.
Should you self-host PgStack?
PgStack scores 54/100 on selfhost.directory (how scoring works) and ranks #23 of 41 in Search Engines. It has 1 537 GitHub stars.
It shipped 5 stable releases in the past year. The latest, v2.2.0, came out on 23 October 2026. New versions land roughly every 7 days.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is SearXNG (86/100, 38 940 stars). It scores higher overall, so compare the two before you pick. See PgStack vs SearXNG side by side.
Features
- ARM64 Support
- Audit Trail
- BM25 keyword search
- Hybrid SearchRequires OPENAI_API_KEY
- Logical replication
- Postgres wire protocol
- SCRAM authentication
- Search replica
- Semantic SearchRequires OPENAI_API_KEY
- YAML Configuration
PgStack README
FAQ
Why use PgStack instead of building this myself?
Companies like Facebook, AngelList, LinkedIn, Gusto, and Airbnb have built similar systems, often investing significant time and millions of dollars. PgStack provides this as a managed capability.
How do I query my data?
Connect to your provisioned PgStack database with any Postgres client. Query audit history or search data with relevance ranking and filters using SQL.
Do I need to migrate my database or install extensions?
No database migration or search/audit extensions are needed. PgStack uses read-only access so your existing database and application stay in place.
Where is my data stored?
Your existing Postgres remains the source of truth. Audit history and searchable data are stored separately in PgStack's isolated infrastructure and accessed through a Postgres-compatible database.
How does PgStack connect to Postgres?
PgStack connects via read-only access using Postgres's built-in logical replication, without inserting, updating, or deleting records. Setup requires permissions to configure replication.
More in Data Management
pgvectorOpen-source vector similarity search for Postgres
ResourceSpaceResourceSpace is an open-source Digital Asset Management (DAM) system designed for teams to store, organize, search, and share digital assets with advanced metadata, AI-powered search, and granular permissions.
SLayerSelf-hosted semantic layer letting AI agents query warehouses via structured requests with runtime formulas instead of raw SQL. Supports multiple databases.
SupersetApache Superset is a Data Visualization and Data Exploration Platform
tianjiSelf-hosted insight hub combining web analytics service monitoring and server status checks. Apache 2.0 licensed open-source platform for independent developers.
timelinizeTimelinize is a self-hosted, open-source personal archival suite that imports data from many sources into a unified timeline on your computer.
unopimSelf-hosted, open-source PIM and DAM built on Laravel to centralize and enrich product catalogs beyond 10 million products, with AI agent chat and CSV/XLSX import.
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.
AnagnorisisSelf-hosted local recommendation system that learns from your ratings and searches images, music, text, and video — all processed on your hardware.
Apache DruidApache Druid: a high performance real-time analytics database.
Apache IoTDBApache IoTDB is a self-hosted, open-source time-series database for industrial IoT with high-throughput reads/writes, ultra-high compression, and SQL-like queries.
barmanSelf-hosted, open-source disaster-recovery tool for PostgreSQL: remote backups, WAL archiving, point-in-time recovery, incremental, encrypted and cloud backups.
0 comments