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.
cd supertokens
./install
# sudo is required so that the supertokens
# command can be added to your PATH variable.
cd supertokens
sudo ./install
Rem run as an Administrator. This is required so that the supertokens
Rem command can be added to your PATH.
cd supertokens
install.bat
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
andport
for SuperTokens islocalhost:3567
. You can change this by passing--host
and--port
options to thestart
command. - 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
supertokens
object in theinit
function on your backend:// backend code let supertokens = require("supertokens-node"); supertokens.init({ supertokens: { connectionURI: "http://localhost:3567;" }, appInfo: {...}, recipeList: [...] });