Authentication is a critical part of your self-hosted Stormkit instance. During the initial setup, you will create an admin account that has full access to the admin interface and can configure instance-wide options.
The admin account can:
However, to import private repositories, you must configure at least one of the following authentication methods:
Visit the developer portal of your chosen provider and create an oAuth application:
To enable GitHub authentication, you need to create a GitHub App (not an oAuth App) and configure the following environment variables:
https://api.your-stormkit-domain.com
)https://api.your-stormkit-domain.com/auth/github/callback
https://api.your-stormkit-domain.com/app/webhooks/github/deploy
https://api.your-stormkit-domain.com/auth/github/installation
.pem
fileAdd the following variables to your environment configuration. If you used the install.sh
script, your environment variables are stored in ~/.profile
file.
# The GitHub App name you chose during creation
GITHUB_APP_NAME=your-app-name
# Found under the General tab of your GitHub App page
GITHUB_APP_ID=123456
# The client secret (generate one if not created automatically)
GITHUB_SECRET=your_client_secret
# Found under the General tab of your GitHub App page
GITHUB_CLIENT_ID=Iv1.abc123def456
# Base64 encoded private key from the .pem file
# Encode using: cat your-private-key.pem | openssl base64 -A
GITHUB_PRIV_KEY="LS0tLS1CRUdJTi..."
Important: Make sure to enclose the GITHUB_PRIV_KEY
value with quotes since it contains special characters.
To enable GitLab authentication, you need to create a GitLab App and configure the following environment variables:
https://api.your-stormkit-domain.com/auth/gitlab/callback
Add the following variables to your environment configuration. If you used the install.sh
script, your environment variables are stored in ~/.profile
file.
# The Secret key
GITLAB_SECRET=gloas-abc123...
# Your Application ID
GITLAB_CLIENT_ID=af845...
For the environment variables to take effect, make sure to restart Stormkit. For an environment using docker compose, the command to restart the services is:
docker compose down workerserver hosting && docker compose up workerserver hosting -d
Note: If you are providing environment variables using the ~/.profile
method, make sure to source that file before restarting the server.
source ~/.profile