Skip to main content

Self-Hosting SupertTokens

See how you can run SuperTokens in your own infrastructure.

Overview

One of the main features of SuperTokens is that you can run it using your own resources. This way you have full control over the authentication data and you can scale based on your needs.

Requirements

In order to deploy the Core Service you will have to configure two things: the actual API and the database.

Database

We support both PostreSQL and MySQL as a datasource for our core service. Check out the guides for information on how to initialize the database: MySQL, PostgreSQL.

SuperTokens Core

Our core service can be deployed as a standalone server in your compute infrastructure. If you are using Docker check our specific guide that shows you how to run the application. Otherwise, we provide additional instructions on how to install the core service inside a VM.

License Keys

In order to access some of the features in your self-hosted service you will have to make use of license keys. You can sign up on SuperTokens to receive one.

Once you have the license key you need to manually add it to your SuperTokens Core Instance. To do this you will have to call the Core API with the following request:

Add License Key
curl --location --request PUT <CORE_API_ENDPOINT>/ee/license \
--header 'Content-Type: application/json' \
--header 'api-key: <YOUR_API_KEY>' \
--data-raw '{ "licenseKey": "<YOUR_LICENSE_KEY>" }'