Skip to content
Console →
Website →
Asking an AI? Paste this URL https://keelson.dev/llms.txt

Environment variables

This page lists the environment variables that Keelson sets in your app container. Do not add any of them to env in keelson.yaml. Names beginning with KEELSON_ are reserved by the platform and cannot be used in env or secrets.

VariableDescription
PORTPort the app listens on. Read this value; do not set it
TZWorkspace time zone (for example, Asia/Tokyo)
KEELSON_MODEkeelson. Use this to determine whether the app is running on Keelson. Not set locally
KEELSON_APP_IDInternal app ID
KEELSON_WORKSPACE_IDInternal workspace ID
KEELSON_TENANT_IDCompatibility alias for KEELSON_WORKSPACE_ID (same value)
KEELSON_DEPLOY_IDInternal ID of the current deploy
KEELSON_APP_URLApp URL (https://<ws>--<app>.keelson.run). Use this when an absolute URL is required. Set when the host can be resolved
KEELSON_DIRECTORY_BASE_URLDirectory API base URL. Used by the Identity SDK. Set under the same condition as KEELSON_APP_URL (when the host can be resolved)

The former tenant-named variable remains accepted as a compatibility alias. No removal date is set.

VariableConditionDescription
KEELSON_DB_URLdb.mode: libsqlManaged SQLite connection URL
KEELSON_DB_AUTH_TOKENdb.mode: libsqlManaged SQLite authentication token
TURSO_DATABASE_URL / TURSO_AUTH_TOKENdb.mode: libsqlAliases for the two variables above (for compatibility)
KEELSON_FILES_BUCKET / KEELSON_FILES_PREFIXAlwaysStorage location used by the Files SDK. Do not use directly
KEELSON_INTERNAL_MEDIA_BASE_URL / KEELSON_APP_MEDIA_TOKENAlwaysUpload destination and authentication used by the Media SDK. Do not use directly
KEELSON_MEDIA_URL_PREFIXAlwaysMedia delivery URL prefix (/__keelson/media/)
KEELSON_DIRECTORY_TOKENAfter keelson apps directory enableDirectory API token used by the Identity SDK. Handle only on the server
  • NODE_ENV — Not set automatically. Declare "production" in env in keelson.yaml
  • External database connection details — Nothing is injected when db.mode: none. Pass them as secrets

These variables are used when running SDKs locally. They are not set on Keelson.

VariableDescription
KEELSON_FILES_DIRLocal storage location for the Files SDK (default: ./.keelson/files)
MEDIA_DIRLocal storage location for the Media SDK (default: ./media)
KEELSON_LOCAL_MODE=1Run the Identity SDK with dummy data
KEELSON_LOCAL_USER_ID / KEELSON_LOCAL_USER_EMAIL / KEELSON_LOCAL_USER_NAMEDummy user
KEELSON_LOCAL_WORKSPACE_ID / KEELSON_LOCAL_WORKSPACE_ROLE / KEELSON_LOCAL_APP_IDDummy workspace, role, and app

The former KEELSON_LOCAL_TENANT_ID and KEELSON_LOCAL_TENANT_ROLE names remain accepted as compatibility aliases. No removal date is set.