Skip to main content

With Docker

Running the docker image ๐Ÿš€#

docker run -p 3567:3567 -d
  • To see all the env variables available, please see the README file.
  • The above command will start the container with an in-memory database. This means you do not need to connect it to MySQL to test out SuperTokens.
  • When you are ready to connect it to your database, please visit the Database setup section

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 the container 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.

Connecting the backend SDK with SuperTokens ๐Ÿ”Œ#

  • The default port for SuperTokens is 3567. You can change this by binding a different port in the docker run command. For example, docker run -p 8080:3567 will run SuperTokens on port 8080 on your machine.
  • 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.

Helm charts for Kubernetes#