Pigsty Docs v4.5
“PostgreSQL In Great STYle”: Postgres, Infras, Graphics, Service, Toolbox, it’s all Yours.
—— Battery-Included, Local-First PostgreSQL Distribution as a Free & Open-Source RDS Alternative
Free & Open Source Local First Production Ready
GitHub | Demo | Blog | Discuss | Discord | DeepWiki | Roadmap | Chinese Docs
Press ⌘ with K on macOS, or Ctrl with K, to open local search and the command palette from anywhere.
Getting Started
Learn Pigsty in four steps: read about the project, understand the concepts, try a single-node installation, and deploy to production.
Understand Pigsty’s architecture and design philosophy: high availability, backup & recovery, security and compliance.
Architecture Cluster Model Monitoring IaC HA PITR Service Access Security
Install Pigsty on one node on your laptop or cloud server. Then access the database services and web UI.
Plan and prepare a multi-node, high-availability Pigsty deployment. Then deploy it to production.
Get Started: Prepare a node with a fresh Linux installation. Run these commands as a user with passwordless ssh and sudo privileges:
Download, Configure, and Deploy Pigsty. Installation takes minutes. You can add more nodes and database clusters later.
Next, explore the Web UI. Access PostgreSQL services on port 5432 and Grafana dashboards on port 3000. The Grafana username and password are admin and pigsty.
You can also wrap PostgreSQL kernel flavors as RDS services: Citus, WiltonDB, IvorySQL, OpenHalo, Percona, OrioleDB, PolarDB, and Supabase.
Modules
Pigsty consists of modules. The PGSQL, INFRA, NODE, and ETCD modules form the PINE stack. These modules are required to self-host complete PostgreSQL RDS services:
PostgreSQL clusters with automatic failure recovery. Includes HA, PITR, IaC, ACL, monitoring, and a large selection of extensions.
Configuration Administration Backup & PITR Services Kernels Parameters
Nginx, local software repo, DNS, NTP, and the VictoriaMetrics & Grafana observability stack.
Configure host nodes to the required state. Includes node monitoring, log collection, VIP, and HAProxy load balancing.
Reliable distributed consensus storage (DCS), providing cluster metadata for PostgreSQL high availability.
Optional modules provide additional functions for your PostgreSQL data infrastructure:
S3-compatible object storage, an optional centralized repository for database backups.
High-performance in-memory data structure server with standalone, cluster, and sentinel modes.
Container runtime for launching containerized, stateless software and application templates.
JuiceFS distributed file system with PostgreSQL as the metadata engine, providing shared POSIX storage.
AI coding sandbox: Code-Server, JupyterLab, Claude Code, and Codex CLI.
Apache Kafka 4.x dynamic KRaft message queue clusters with security and monitoring included.
Native MySQL 8.4 LTS as a standalone instance or a three-node InnoDB Cluster.
Experimental module family: Kubernetes, DuckDB, TigerBeetle, and more for early adopters.
Reference
Comprehensive references, the extension catalog, ready-to-use templates, and companion tool manuals:
Detailed reference lists: operating systems, file hierarchy, ports, metrics, and product comparisons.
Linux Support Modules File Hierarchy Ports Comparison Cost Reference SOP
A catalog of 600 packaged PostgreSQL ecosystem extensions: metadata, docs, downloads, and support matrix.
Ready-to-use cluster configuration templates, plus containerized software and application templates.
Manuals for the companion tools Pigsty builds upon: packaging, HA, connection pooling, backup, and monitoring.