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:
let supertokens = require("supertokens-node");
supertokens.init({    supertokens: {        connectionURI: "http://localhost:3567",        apiKey: "someKey" | undefined    },    appInfo: {...},    recipeList: [...]});
Security

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