Docs Extensions Blog Service GitHub

PostgreSQL in Great STYle

The Batteries-Included PostgreSQL Distribution
Self-hosted. Open Source. Production Ready.

$ curl -fsSL https://repo.pigsty.io/get | bash
Pigsty Architecture

Still Wrestling with PostgreSQL …?

😵

Self-hosting is a nightmare?

HA, PITR, Sec, Observability, how long to master them all?

Without a senior DBA.

🧩

Extensions you need but can't get?

Missing some extension on the cloud?

Build from scratch or combine random images?

💸

Cloud RDS bleeding you dry?

5-20x the cost of bare metal — for lame EBS?

The bigger you scale, the deeper you're locked in.

Pigsty solves all of this—and it's free and open source.

One Stack. All Problems Solved.

Four pillars that let you self-hosting PostgreSQL like a Pro

🛡️ Battle-Tested High Availability

Self-healing. Sleep well.

  • Auto-failover with Patroni + Etcd, traffic balancing via HAProxy
  • Built-in pgBackRest PITR for Recovery — even from accidental drops
  • SSL/TLS encryption, access control models, SELinux & firewall out of the box
No more 3 AM pages. Wake up rested, fix it over coffee. Learn more
Pigsty HA Architecture

⚙️ Infrastructure as Code

Declare. Deploy. Done.

  • Declare your desired state in config. Pigsty makes it real—no fuss.
  • Fully customizable. Prod/UAT/Test/Devbox, same arch, different configs.
  • Ansible idempotent playbooks. Linux-Native without K8s or Docker.
Clone your entire prod env in one pass. Run 100x clusters single-handedly. See examples
# pigsty.yml - Define a 3-node HA cluster
pg-test:
  hosts:
    10.10.10.11: { pg_role: primary }
    10.10.10.12: { pg_role: replica }
    10.10.10.13: { pg_role: replica }
  vars:
    pg_cluster: pg-test
    pg_version: 18
    pg_users:
      - { name: dbuser_app, password: DBUser.App }
    pg_databases:
      - { name: app, extensions: [ vector ]}

📊 Full-Stack Observability

Total visibility. Total control.

  • SOTA observability stack powered by Grafana + Victoria
  • 3000+ metrics, 40+ fine-tuned dashboards, ready out of the box
  • Deploy standalone to monitor existing RDS / PostgreSQL instances
Pinpoint issues fast. Make data-driven decisions. End the guesswork. Try live demo
Pigsty Monitoring Dashboard

🧩 Extension Ecosystem

Every extension. Ready to run.

  • 440+ PostgreSQL extensions across 14 Linux distros, ready to install
  • 8 kernel forks: Oracle, MySQL, SQL Server, MongoDB compatible and more
  • Modules: MinIO, Redis, FerretDB, Docker, Supabase self-hosting support
Mix and compose freely. Install what you want. Full freedom, full control. Browse catalog
PostgreSQL Extension Ecosystem

440+ Extensions. 10 Kernel Forks.

Pigsty unlocks the full potential of PostgreSQL Extension Catalog Kernel Forks

Trusted by Companies Across Industries

探探
Bilibili
Airwallex
Momenta
美图
PolarDB
Bitdeer
OCI
华峰
Linkfog
Motphys
影视飓风
探探
Bilibili
Airwallex
Momenta
美图
PolarDB
Bitdeer
OCI
华峰
Linkfog
Motphys
影视飓风
We run 100+ PostgreSQL clusters at 2.5M QPS with just 1.5 DBAs.
Our TCO is 5% of public cloud. — Tantan
4474
GitHub Stars
2.5M+
QPS Battle-Tested
6+
Years in Development
#1
PG Distribution in China

Join the Community

See what people are saying

Ruohang Feng
Ruohang Feng
Founder @ Pigsty

"Pigsty is a software written to solve our own problems. And it does it well. So we open-sourced it and hope it can help you too."

Vedran B.
Vedran B.
Junior DBA & Full-Stack Developer

"This is cool and long overdue: The official PostgreSQL extension manager (called pig) has been released and it seems supported by the official PostgreSQL org. So, no more tedious digging through outdated readmes, cryptic configure scripts, or random GitHub forks & patches just to install some required extension. We are all pigs now."

Terry Zheng
Terry Zheng
Senior Software Engineer

"Pigsty is a better local open source RDS for PostgreSQL alternative. I wonder if there anything similar for Redis and MySQL."

Darragh ORiordan
Darragh ORiordan
Principal Engineer & Cloud Architect

"If you ever have to set up a postgres instance for production outside of RDS/Managed, Pigsty is a brilliant implementation"

Grzegorz Głąb
Grzegorz Głąb
Spiritus Movens / Serendipitous Planner

"Great toolbox: Pigsty - 'PostgreSQL In Great STYle': Postgres, Infras, Graphics, Service, Toolbox, it's all Yours."

Paul Hewson
Paul Hewson
Data Scientist / Statistician

"This is neat, self hosted PostgreSQL as a service"

François-Guillaume Ribreau
François-Guillaume Ribreau
Hacker, Maker, Tech Advisor

"Looking for a self-hosted PostgreSQL RDS alternative? You won't believe what this project does"

Ruohang Feng
Ruohang Feng
Founder @ Pigsty

"Pigsty is a software written to solve our own problems. And it does it well. So we open-sourced it and hope it can help you too."

Vedran B.
Vedran B.
Junior DBA & Full-Stack Developer

"This is cool and long overdue: The official PostgreSQL extension manager (called pig) has been released and it seems supported by the official PostgreSQL org. So, no more tedious digging through outdated readmes, cryptic configure scripts, or random GitHub forks & patches just to install some required extension. We are all pigs now."

Terry Zheng
Terry Zheng
Senior Software Engineer

"Pigsty is a better local open source RDS for PostgreSQL alternative. I wonder if there anything similar for Redis and MySQL."

Darragh ORiordan
Darragh ORiordan
Principal Engineer & Cloud Architect

"If you ever have to set up a postgres instance for production outside of RDS/Managed, Pigsty is a brilliant implementation"

Grzegorz Głąb
Grzegorz Głąb
Spiritus Movens / Serendipitous Planner

"Great toolbox: Pigsty - 'PostgreSQL In Great STYle': Postgres, Infras, Graphics, Service, Toolbox, it's all Yours."

Paul Hewson
Paul Hewson
Data Scientist / Statistician

"This is neat, self hosted PostgreSQL as a service"

François-Guillaume Ribreau
François-Guillaume Ribreau
Hacker, Maker, Tech Advisor

"Looking for a self-hosted PostgreSQL RDS alternative? You won't believe what this project does"

Anirudha S.
Anirudha S.
Enterprise Architect

"Pigsty aims to harness the collective power of PostgreSQL ecosystem extensions and democratize access to production-grade database services and with GCP a great start ahead!"

Marcin Gwóźdź
Marcin Gwóźdź
Director of FerretDB

"You can easily now use FerretDB with Pigsty: the a battery-included, local-first, open-source RDS PG alternative."

Peter Zaitsev
Peter Zaitsev
Entrepreneur | Technologist

"Pigsty: PostgreSQL in Great STYle, Battery-Included Free RDS Alternative!"

Philippe Noël
Philippe Noël
Founder @ ParadeDB

"Proud for @ParadeDB to be included in Pigsty! Pigsty is truly one of the best ways to run Postgres and its whole ecosystem. Probably the more comprehensive list of extensions in Postgres"

Broken Mind
Broken Mind
Cognitive Sys Optimization Engineer

"man... this is so fun, the open source community always have the gold, is the postgres the best!! awesome work from the last released! a bunch of extensions to help community"

ɘɿuɔɐɿɈ
ɘɿuɔɐɿɈ
Architect

"I want to take a moment to express my immense gratitude to the dedicated developers, maintainers, and contributors of the Pigsty project - a remarkable repository."

Yurii Rashkovskii
Yurii Rashkovskii
Founder @ Omnigres

"Pigsty Is Postgres All Batteries Included. Did I say All? No, it's a little bit more than that."

Anirudha S.
Anirudha S.
Enterprise Architect

"Pigsty aims to harness the collective power of PostgreSQL ecosystem extensions and democratize access to production-grade database services and with GCP a great start ahead!"

Marcin Gwóźdź
Marcin Gwóźdź
Director of FerretDB

"You can easily now use FerretDB with Pigsty: the a battery-included, local-first, open-source RDS PG alternative."

Peter Zaitsev
Peter Zaitsev
Entrepreneur | Technologist

"Pigsty: PostgreSQL in Great STYle, Battery-Included Free RDS Alternative!"

Philippe Noël
Philippe Noël
Founder @ ParadeDB

"Proud for @ParadeDB to be included in Pigsty! Pigsty is truly one of the best ways to run Postgres and its whole ecosystem. Probably the more comprehensive list of extensions in Postgres"

Broken Mind
Broken Mind
Cognitive Sys Optimization Engineer

"man... this is so fun, the open source community always have the gold, is the postgres the best!! awesome work from the last released! a bunch of extensions to help community"

ɘɿuɔɐɿɈ
ɘɿuɔɐɿɈ
Architect

"I want to take a moment to express my immense gratitude to the dedicated developers, maintainers, and contributors of the Pigsty project - a remarkable repository."

Yurii Rashkovskii
Yurii Rashkovskii
Founder @ Omnigres

"Pigsty Is Postgres All Batteries Included. Did I say All? No, it's a little bit more than that."

Dexter Yang
Dexter Yang
Architect, Hacker

"Pigsty, which adopts the currently popular 'fair-code' model for IaaS / PaaS / BaaS / Serverless DB. Unlike M3O (an 'AWS alternative' project) that's geared more toward developers, pigsty is squarely aimed at dba / ops teams."

Vitaliy Kukharik
Vitaliy Kukharik
Founder & CTO @ Autobase

"If you haven't heard about Pigsty extension repository yet, take a look at this. A lot of extremely useful work has been done! Thanks Vonng for this contribution."

Grant Zhou
Grant Zhou
President at Highgo Software

"You can use Pigsty to serve IvorySQL - Oracle compatible PostgreSQL fork as a local-first RDS"

Digoal Zhou
Digoal Zhou
PostgreSQL Expert

"Pigsty is ideal for managing multiple PG or PolarDB databases, especially if you have extensive extension requirements. Highly recommended!"

Steven Lee
Steven Lee
Author of duckdb_fdw

"Thanks for including the duckdb_fdw in Pigsty. Hope to see more extensions in the future!"

Vignesh Ravichandran
Vignesh Ravichandran
Postgres Contributor

"IMHO, Pigsty is underrated. It deserves more visibility. Production grade @PostgreSQL but with full control !"

Bo Hu
Bo Hu
Co-founder of FeatBit

"Pigsty boosts our PostgreSQL expertise and ensures critical use cases for FeatBit's PostgreSQL solution are rock-solid."

Dexter Yang
Dexter Yang
Architect, Hacker

"Pigsty, which adopts the currently popular 'fair-code' model for IaaS / PaaS / BaaS / Serverless DB. Unlike M3O (an 'AWS alternative' project) that's geared more toward developers, pigsty is squarely aimed at dba / ops teams."

Vitaliy Kukharik
Vitaliy Kukharik
Founder & CTO @ Autobase

"If you haven't heard about Pigsty extension repository yet, take a look at this. A lot of extremely useful work has been done! Thanks Vonng for this contribution."

Grant Zhou
Grant Zhou
President at Highgo Software

"You can use Pigsty to serve IvorySQL - Oracle compatible PostgreSQL fork as a local-first RDS"

Digoal Zhou
Digoal Zhou
PostgreSQL Expert

"Pigsty is ideal for managing multiple PG or PolarDB databases, especially if you have extensive extension requirements. Highly recommended!"

Steven Lee
Steven Lee
Author of duckdb_fdw

"Thanks for including the duckdb_fdw in Pigsty. Hope to see more extensions in the future!"

Vignesh Ravichandran
Vignesh Ravichandran
Postgres Contributor

"IMHO, Pigsty is underrated. It deserves more visibility. Production grade @PostgreSQL but with full control !"

Bo Hu
Bo Hu
Co-founder of FeatBit

"Pigsty boosts our PostgreSQL expertise and ensures critical use cases for FeatBit's PostgreSQL solution are rock-solid."

Up and Running in Minutes

curl https://pigsty.io/get | bash
./configure
./install.yml
Supported Platforms: Linux x86_64 / Arm64 · EL 8 / 9 / 10 · Ubuntu 22 / 24 · Debian 12 / 13

Ready to Sora?

$ curl -fsSL https://repo.pigsty.io/get | bash