Back to Apps
SuperTokens

Deploy SuperTokens on Your Own Server

Auth Provider solution alternative to Auth0 / Firebase Auth / AWS Cognito

🛠️ Developer Tools

Want to deploy SuperTokens on your server faster? Try Senate with one-command setup, automatic HTTPS and monitoring.

Get Started

What is SuperTokens?

SuperTokens is an open source user authentication solution. More details: https://supertokens.com

Self-Host SuperTokens

Follow these steps to deploy on your own server.

1

Install Docker

Skip this step if Docker is already installed on your server.

curl -fsSL https://get.docker.com | sh
2

Configure

Customize the settings below. Defaults work for most cases.

General
3

Deploy

Copy the configuration and run it on your server.

services:
  supertokens:
    image: supertokens/supertokens-postgresql:7.0
    environment:
      API_KEYS: 92d99af5192f82d64d4c5861c96a4de16fbfe67b82bb4b8afc2795135feef9e5
      DISABLE_TELEMETRY: "true"
      POSTGRESQL_CONNECTION_URI: postgresql://supertokens:2a7c4c868d744a13@supertokens-postgres:5432/supertokens
    depends_on:
      - supertokens-postgres
  supertokens-postgres:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: supertokens
      POSTGRES_PASSWORD: 2a7c4c868d744a13
      POSTGRES_USER: supertokens
    volumes:
      - supertokens-postgres-data:/var/lib/postgresql/data
volumes:
  supertokens-postgres-data: {}

Then run:

docker compose up -d
4

Access

Once started, access your app at http://localhost:3567

Why Self-Host SuperTokens?

Full Data Ownership

Your data stays on your servers. No third-party access.

No Monthly Fees

Pay only for your server. No per-seat or usage charges.

Complete Control

Customize, backup, and scale on your own terms.

Privacy & Compliance

Meet GDPR, HIPAA, or internal security requirements.

Technical Details

Docker Image

supertokens/supertokens-postgresql:${supertokens_version}

Want to go faster?

Try Senate! Senate handles Docker, HTTPS, updates, and monitoring for you. Deploy any of our 300+ apps with a single command.

Install on any Linux server:

sh -c "$(curl -sSL https://get.senate.sh)"