# PostgREST

PostgREST is an open-source tool that generates a representational state transfer (REST) interface for any existing PostgreSQL database. It is open source and self-hosted, installable on Docker Hub, Unraid and Kubernetes (Helm).

Canonical page: https://ourlocalhost.com/app/58/postgrest

## Description

PostgREST is an open-source tool that generates a representational state transfer (REST) interface for any existing PostgreSQL database. It exposes database tables and views as standard web endpoints, reducing the need to hand-write boilerplate backend code. It is useful for developers and homelab builders who already run PostgreSQL and want a predictable, standards-compliant interface for their data.

## Platform availability

Available on 2 of 10 platforms: Unraid, Helm.

## Health score

72/100 (Good), based on 4 of 5 factors.
- Maintained: 100 (last commit 2 days ago)
- Popular: 89 (27,763 GitHub stars)
- Easy to install: 45 (2 install platforms, install notes, Docker image)
- Security check: 20 (1 serious finding, CI, tests, OpenSSF Scorecard 6.2/10)

## Security check

1 serious finding: A GitHub workflow can be triggered by outsiders to run their code with the project's secrets.
Automated checks on commit ee09d9a, 13 Oct 2026. Not an audit.

## Links

- Documentation: https://docs.postgrest.org/en/latest/references/configuration.html#config-full-list
- GitHub: https://github.com/PostgREST/postgrest
- Docker Hub: https://hub.docker.com/r/postgrest/postgrest
- Official website: https://postgrest.org
- Unraid: https://ca.unraid.net/apps/postgrest-0j1f96p1wo12fx?q=PostgREST
- Kubernetes (Helm): https://artifacthub.io/packages/helm/colearendt/postgrest

## Common questions

### How do I tell PostgREST which PostgreSQL database to use?

Start PostgREST by giving it a config file path. That file holds required settings such as the database address, and if it is missing or wrong, PostgREST will not know which database to connect to.

### Which ports do I need to keep free or open?

If you run PostgreSQL locally with Docker, keep port 5432 free because PostgreSQL listens for connections there. PostgREST uses a separate API port, such as 3000, and you should open it only if clients on other devices need to call it.

### How does PostgREST handle authentication and authorization?

It authenticates clients with JSON Web Tokens and delegates authorization to the role permissions defined in the database. While serving a request, it acts as the authenticated database user and cannot do anything that user could not.

### What extra responsibility does self-hosting the PostgreSQL backend add?

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

### Should I expose PostgREST directly to clients?

Some users put PostgREST behind their own API layer, such as Flask, to add business logic. It can also be acceptable to expose it directly depending on your needs and hosting setup.

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