# Postgres

Postgres is an advanced open-source relational database management system that stores structured data in tables and serves it to applications using SQL (Structured Query Language) queries. It is open source and self-hosted, installable on Docker Hub, TrueNAS and Kubernetes (Helm).

Canonical page: https://ourlocalhost.com/app/4447/postgres

## Description

PostgreSQL is an advanced open-source relational database management system that stores structured data in tables and serves it to applications using SQL (Structured Query Language) queries. It is a reliable choice for self-hosted services that need transactional, standards-compliant data storage.

## Platform availability

Available on 2 of 10 platforms: TrueNAS, Helm.

## Health score

81/100 (Excellent), based on 3 of 4 factors.
- Maintained: 100 (last commit 17 days ago)
- Popular: 87 (22,705 GitHub stars)
- Easy to install: 35 (2 install platforms, install notes)

## Links

- Docker Hub: https://hub.docker.com/r/dockette/postgres
- Documentation: https://www.postgresql.org/docs/
- GitHub: https://github.com/postgres/postgres
- TrueNAS: https://apps.truenas.com/catalog/postgres/
- Kubernetes (Helm): https://artifacthub.io/packages/helm/cloudpirates-postgres/postgres
- Official website: https://www.postgresql.org

## Common questions

### What extra responsibilities come with self-hosting PostgreSQL instead of using a managed database?

You become responsible for backups, downtime, and patching. You should also verify that you can restore from your backups.

### Can I keep the PostgreSQL database on the same machine as my self-hosted app?

If both are hosted locally, you do not need to expose PostgreSQL to an external service. The thread also notes that a home Internet outage affects the app anyway because it needs the database.

### How can I make self-hosted PostgreSQL more resilient for hobby projects?

One approach is to host redundant PostgreSQL, such as using a large dedicated server plus smaller servers for critical redundant services.

### Should I run PostgreSQL 19 beta releases in production while self-hosting?

PostgreSQL 19 beta releases contain feature previews ahead of general availability. The official site does not advise running beta versions in production, but encourages testing typical application workloads.

### What does a basic self-hosted PostgreSQL setup guide cover?

The guide covers installing PostgreSQL on a Linux server, basic security and setup, optional access via pgAdmin, and monitoring with Garmingo.

## Alternatives

- Apache Cassandra
- CockroachDB: CockroachDB is a distributed SQL database for developers and operators of transactional applications that need horizontal scaling and resil…
- CouchDB: CouchDB is a document-oriented NoSQL database with a RESTful HTTP/JSON interface for storing, querying, and synchronising JSON documents ac…
- FerretDB: FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks.
- Firebird: Firebird is a relational database offering many ANSI SQL-92 features that runs on Linux, Windows, and a variety of Unix platforms.
- Microsoft SQL Server: SQL Server delivers on Microsoft’s Data Platform vision by helping your organization manage your data by enabling you to store data from st…
- MindsDB: MindsDB is an AI data solution that enables humans, AI, agents, and applications to query data in natural language and SQL, and get highly…
- MongoDB: MongoDB is an open-source, document-oriented NoSQL database that stores flexible, JSON-like documents, helping developers and self-hosters…
- MySQL Community Edition: Free GPL database platform supporting SQL and NoSQL applications with InnoDB storage, replication, clustering, connectors, and cross-platfo…
- SQLite: SQLite is a lightweight, embedded relational database engine that stores an entire database in a single file on your device.
- SurrealDB: SurrealDB is a modern "all-in-one" database that stores and organises your app's information.
- mariadb: MariaDB is a fast, open-source relational database server forked from MySQL by its original developers.

---
Source: Our Local Host (https://ourlocalhost.com/app/4447/postgres), the self-hosted and open-source app directory.
