Self-hosted without Docker
1) Install SuperTokens 🛠️
Go to the open source download page, scroll to the "Download the binary" section, choose your backend framework and 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.
You may get an error like "java cannot be opened because the developer cannot be verified". To solve this, visit System Preferences > Security & Privacy > General Tab, and then click on the Allow button at the bottom. Then retry the command above.
Rem run as an Administrator. This is required so that the supertokens
Rem command can be added to your PATH.
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!
4) Stopping SuperTokens 🛑
Connecting the backend SDK with SuperTokens 🔌
- The default
portfor SuperTokens is
localhost:3567. You can change this by passing
--portoptions to the
- There is no API key by default. You can add one visiting the API keys section
- Assuming the default, the connection info will go in the
supertokensobject in the
initfunction on your backend:
let supertokens = require("supertokens-node");