CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 01:20:26 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"f66247435a45b0e7900bbf1173d55e4e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=aEi%2FLvRefuAkv44PS4c5Hr1nrQHmM2NDzvsqUX1jei0UxwOMMxbOJPrOT6KTPA%2B6NTborLfAZAC%2B0lMUDiix6Ys9WjkW1Dx%2Fv9EMaaIhfUhCvoUUtzxdh0Ad5lrAQw5mQanFcZ0%2FBI4oy2h31mtIWLRKvg5dVB7pd8W%2BDkmTXAMl%2FuDTQSQO5VQjZ%2BSUT9parh8OFiDefxyZQdmGEdf5BlGrv4FL%2BiJuZV0qYNHRmg6XYDGodtW5vWOSLpW4k3pzrLB7UpktT3%2Bz8hDtRpPH9g%3D%3D--rqT71aVmCimOcDNP--1Kdfooo8qR3rFC2jC4CDvQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.787476497.1753838425; Path=/; Domain=github.com; Expires=Thu, 30 Jul 2026 01:20:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 30 Jul 2026 01:20:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: C4D8:1A4ED6:162468:211BEC:68897359
Building from source · supertokens/supertokens-core Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 592
Building from source
Rishabh Poddar edited this page Sep 25, 2021
·
13 revisions
Building from source can allow you to customise SuperTokens as per your needs. This is recommended only for advanced users who are experts in authentication and security.
- Please follow the CONTRIBUTING.md file for instructions on how to setup a development environment, make changes to the code and run tests.
- Make sure you are in the
supertokens-root
folder, and havesupertokens-core
,supertokens-plugin-interface
and a SuperTokens plugin repo in it. - Based on your system OS, download the JRE from supertokens-jre, extract the ZIP, rename the folder to
jre
and put it in thesupertokens-root
folder. - Run
./startTestingEnv --wait
(AND KEEP IT RUNNING - DO NOT QUIT IT DURING THE NEXT STEPS) - Open a new terminal in
supertokens-root
and runls
. Make sure you seecore
folder,plugin
folder and theplugin-interface
folder. - In
supertokens-root
, runcp temp/config.yaml .
- If you want to install SuperTokens on your machine, run
java -classpath "./cli/*" io.supertokens.cli.Main true install
(you may need to usesudo
, but first try without it). You can kill the process started in step 4. This should also remove the files / folders mentioned in step 5. Then check that SuperTokens is installed by runningsupertokens
. Finally, to uninstall SuperTokens, runsupertokens uninstall
- If you do not want to install SuperTokens and just run the core using
java
directly, runjava -Djava.security.egd=file:/dev/urandom -classpath "./core/*:./plugin-interface/*" io.supertokens.Main ./
in thesupertokens-root
folder.
Due to the code architecture, one docker image only works with one database. For example, you can build a docker image that has SuperTokens and works with a MySQL database, or one that only works with MongoDB. In fact, we distribute a docker image for each supported database.
To build your own:
- Please follow the CONTRIBUTING.md file for instructions on how to setup a development environment, make changes to the code and run tests.
- Find the correct docker repo (for your database). For example, if you want to build a docker image with MySQL, there will be a repository called
supertokens-docker-mysql
- Clone the repo you found in the previous step and make sure that it's side-by-side to the
supertokens-root
folder. - Copy the
supertokens-root
folder into the cloned directory. For example, if building for MySQL, runcp -rf ./supertokens-root ./supertokens-docker-mysql
- Download the linux JRE from supertokens-jre, extract the ZIP, rename the folder to
jre
and put it in the copiedsupertokens-root
folder. - Go into the copied
supertokens-root
folder and run./startTestingEnv --wait
(AND KEEP IT RUNNING - DO NOT QUIT IT DURING THE NEXT STEPS) - Open a new terminal in the cloned docker repo, and run
cp supertokens-root/temp/config.yaml supertokens-root/
- Open the
Dockerfile
in an editor. - Remove the following lines (should be line number 2 onwards):
ARG PLUGIN_NAME=mysql ARG PLAN_TYPE=FREE ARG CORE_VERSION=2.4.0 ARG PLUGIN_VERSION=1.3.0 RUN apt-get update && apt-get install -y curl zip RUN curl -o supertokens.zip -s -X GET \ "https://api.supertokens.io/0/app/download?pluginName=$PLUGIN_NAME&os=linux&mode=DEV&binary=$PLAN_TYPE&targetCore=$CORE_VERSION&targetPlugin=$PLUGIN_VERSION" \ -H "api-version: 0" RUN unzip supertokens.zip RUN cd supertokens && ./install
- Replace the above lines with:
RUN mkdir ./supertokens COPY ./supertokens-root/ ./supertokens RUN cd supertokens && ./jre/bin/java -classpath "./cli/*" io.supertokens.cli.Main true
- Run the docker build command:
docker build -t supertokens .
- Start the docker container (default to using in-memory database):
docker run -p 3567:3567 supertokens
Clone this wiki locally
You can’t perform that action at this time.