Skip to main content

Environment Variables

All Qaynaq settings can be configured via environment variables.

Runtime

VariableTypeDefaultDescription
ROLEstringcoordinatorNode role: coordinator or worker
GRPC_PORTuintgRPC server port (required)
HTTP_PORTuint8080HTTP port for web UI and REST API
DISCOVERY_URIstringlocalhost:50000Coordinator address for worker discovery
DEBUG_MODEboolfalseEnable debug logging

Security

VariableTypeDefaultDescription
SECRET_KEYstring32-byte encryption key, also used for signing JWT tokens

Authentication

VariableTypeDefaultDescription
AUTH_TYPEstringnoneAuthentication mode: none, basic, or oauth2
AUTH_BASIC_USERNAMEstringUsername for basic auth
AUTH_BASIC_PASSWORDstringPassword for basic auth
AUTH_OAUTH2_CLIENT_IDstringOAuth2 client ID
AUTH_OAUTH2_CLIENT_SECRETstringOAuth2 client secret
AUTH_OAUTH2_AUTHORIZATION_URLstringOAuth2 authorization endpoint
AUTH_OAUTH2_TOKEN_URLstringOAuth2 token endpoint
AUTH_OAUTH2_REDIRECT_URLstringOAuth2 redirect URL (e.g., http://localhost:8080/auth/callback)
AUTH_OAUTH2_SCOPESstringComma-separated OAuth2 scopes
AUTH_OAUTH2_USER_INFO_URLstringOAuth2 user info endpoint
AUTH_OAUTH2_ALLOWED_USERSstringComma-separated allowed email addresses
AUTH_OAUTH2_ALLOWED_DOMAINSstringComma-separated allowed email domains
AUTH_OAUTH2_SESSION_COOKIE_NAMEstringqaynaq_sessionSession cookie name

See Authentication for setup instructions.

Database

VariableTypeDefaultDescription
DATABASE_DRIVERstringDatabase backend: sqlite or postgres
DATABASE_URIstringDatabase connection string
warning

If DATABASE_DRIVER and DATABASE_URI are not set, Qaynaq stores data in memory. All data is lost when the process stops.

SQLite

export DATABASE_DRIVER="sqlite"
export DATABASE_URI="file:./qaynaq.sqlite?_foreign_keys=1&mode=rwc"

PostgreSQL

URL format:

export DATABASE_DRIVER="postgres"
export DATABASE_URI="postgres://qaynaq:yourpassword@localhost:5432/qaynaq?sslmode=disable"

DSN format:

export DATABASE_DRIVER="postgres"
export DATABASE_URI="host=localhost user=qaynaq password=yourpassword dbname=qaynaq port=5432 sslmode=disable"