pigsty  by pgsty

PostgreSQL distribution for self-hosting and managed DBaaS

Created 5 years ago
4,755 stars

Top 10.3% on SourcePulse

GitHubView on GitHub
Project Summary

Pigsty offers a comprehensive, free, and open-source PostgreSQL distribution designed for self-hosting, aiming to provide a superior and more affordable alternative to managed Database-as-a-Service (DBaaS) offerings like AWS RDS. It targets engineers and power users who require robust, enterprise-grade PostgreSQL management capabilities on-premises or in their own cloud environments, enabling greater control and cost savings.

How It Works

Pigsty employs a modular, declarative approach, leveraging Ansible for deployment and management. Its architecture integrates best-of-breed components for High Availability (Patroni, etcd), Point-In-Time Recovery (pgBackRest), connection pooling and routing (pgBouncer, HAProxy), and comprehensive observability (VictoriaMetrics, Grafana). A key advantage is its ability to run directly on bare Linux systems without requiring Docker or Kubernetes, offering flexibility and reduced complexity.

Quick Start & Requirements

Installation can be initiated via a curl script: curl -fsSL https://repo.pigsty.io/get | bash -s v4.0.0, followed by cd ~/pigsty and executing ./configure -g then ./deploy.yml. Alternatively, a pig CLI tool simplifies the process. The system requires a compatible Linux OS on x86_64 or aarch64 architecture; recommended production distributions include RockyLinux 10.0, Debian 13.2, and Ubuntu 24.04.2. Official documentation and a public demo are available.

Highlighted Details

  • Extensive Compatibility: Supports an impressive 444+ PostgreSQL extensions and 9 different PG kernel forks, including compatibility layers for MS SQL, Oracle, MySQL, and MongoDB.
  • Bare-Metal Deployment: Designed to run natively on Linux, eschewing Docker and Kubernetes for simpler infrastructure management.
  • Integrated HA & DR: Provides self-healing HA clusters with built-in support for Point-In-Time Recovery (PITR) and robust security practices (ACL, CA, SSL).
  • Composable Modules: Extensible with bonus modules for services like Redis, MinIO, Etcd, Docker, DuckDB, and Supabase.

Maintenance & Community

Pigsty is supported by sponsors including MiraclePlus (funding), Cloudflare (repo hosting), and Vercel (website hosting). Community discussions are available via GitHub.

Licensing & Compatibility

The core Pigsty project is licensed under Apache-2.0, permitting broad commercial use. However, optional modules such as MINIO and Grafana-related components are licensed under AGPL-3.0 due to upstream dependencies, which may impose copyleft restrictions on modified, distributed versions.

Limitations & Caveats

The AGPL-3.0 license for certain optional modules could present compatibility challenges for closed-source commercial applications if those specific modules are modified and distributed. While broad Linux compatibility is implied, production stability is explicitly recommended for specific, actively maintained LTS distributions.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
38
Star History
237 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Travis Fischer Travis Fischer(Founder of Agentic), and
10 more.

ToolJet by ToolJet

0.1%
37k
Low-code platform for building internal tools
Created 4 years ago
Updated 21 hours ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Samuel Colvin Samuel Colvin(Founder and Author of Pydantic), and
14 more.

free-for-dev by ripienaar

0.1%
118k
List of free dev resources (SaaS, PaaS, IaaS)
Created 11 years ago
Updated 1 day ago
Feedback? Help us improve.