# SuperTokens PostgreSQL

SuperTokens PostgreSQL is a self-hosted other app. PostgreSQL container for SuperTokens, an open-source user authentication platform. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/3365/supertokens-postgresql

## Description

PostgreSQL container for SuperTokens, an open-source user authentication platform. Stores user accounts, sessions, and authentication metadata in a self-hosted PostgreSQL database, so developers can add secure login and session management to their apps without a third-party auth service. Configure the database connection via environment variables or a mounted config file.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

65/100 (Good), based on 4 of 4 factors.
- Maintained: 100 (last commit 15 days ago)
- Popular: 16 (5 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 95 (512 MB minimum RAM, runs on ARM)

## Links

- GitHub: https://github.com/supertokens/supertokens-postgresql-plugin
- Docker Hub: https://hub.docker.com/r/supertokens/supertokens-postgresql
- Official website: https://supertokens.com/
- Documentation: https://supertokens.com/docs
- Unraid: https://ca.unraid.net/apps/supertokens-postgresql-1ie6lb30kcr277

## Common questions

### What happens if the SuperTokens PostgreSQL container does not receive PostgreSQL connection variables?

It waits about an hour for a PostgreSQL instance during bootup. If POSTGRESQL_USER, POSTGRESQL_PASSWORD, POSTGRESQL_PASSWORD_FILE, and POSTGRESQL_CONNECTION_URI are not provided, it uses an in-memory database.

### Does SuperTokens create and manage its own PostgreSQL tables?

SuperTokens manages its own tables. A schema is available if direct interaction with the database is needed.

### What command should I run in the Django example before starting the server?

Run python manage.py migrate. It creates the database tables the app expects, so user accounts and sessions do not fail with missing-table errors.

### After database setup, which self-hosting steps are listed for SuperTokens?

Add license keys and secure the core.

## Alternatives

- Auth0: You can connect any application (written in any language or on any stack) to Auth0 and define its Connection, the method used to authentica…
- Authelia: Authelia is an open-source authentication and authorization server that provides login, multi-factor authentication, and single sign-on for…
- Firebase: Firebase, provided by Google, is a backend service and application development platform.
- Keycloak: Keycloak is an open-source Identity and Access Management platform for adding authentication to self-hosted applications.
- Supabase: The open source Firebase alternative.

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