Skip to main content

Binary Installation

1) Install SuperTokens 🛠️#

Go to the open source download page, click on the "Binary" tab, choose your database, and download the SuperTokens zip file for your OS. Once downloaded, extract the zip and run the install commands.

# sudo is required so that the supertokens # command can be added to your PATH variable.
cd supertokenssudo ./install

2) Start SuperTokens 🚀#

Running the following command will start the service.

supertokens start [--host=...] [--port=...]
  • The above command will start the container with an in-memory database.
  • When you are ready to connect it to your database, please visit the Database setup section
  • To see all available options please run supertokens start --help

3) Testing that the service is running 🤞#

Open a browser and visit http://localhost:3567/hello. If you see a page that says Hello back, then SuperTokens was started successfully!

If you are having issues with starting the docker image, please feel free to reach out to us over email or via Discord.

4) Stopping SuperTokens 🛑#

supertokens stop

Connecting the backend SDK with SuperTokens 🔌#

  • The default host and port for SuperTokens is localhost:3567. You can change this by passing --host and --port options to the start command.
  • The connection info will go in the supertokens object in the init function on your backend:
import supertokens from "supertokens-node";
supertokens.init({    supertokens: {        connectionURI: "http://localhost:3567",        apiKey: "someKey" // OR can be undefined    },    appInfo: {        apiDomain: "...",        appName: "...",        websiteDomain: "..."    },    recipeList: []});

There is no API key by default. Visit the API keys section to see how to add one.