Getting Started
Configuration
Configure Stalar with environment variables
Stalar is configured through environment variables and an optional config file.
Environment Variables
| Variable | Required | Description |
|---|---|---|
AUTH_SECRET | Yes | Random secret for session encryption. Generate with openssl rand -base64 32 |
STALAR_API_KEY | Yes | Your Stalar API key from stalar.dev |
Optional
| Variable | Default | Description |
|---|---|---|
DATABASE_PATH | ./data/stalar.db | SQLite database path |
STALAR_ADMIN_PASSWORD | changeme | Password for default admin user (only used on first boot) |
Docker
docker run -d \
-p 3000:3000 \
-e AUTH_SECRET=$(openssl rand -base64 32) \
-e STALAR_API_KEY=sk_xxxxx \
-v stalar_data:/app/data \
ghcr.io/stalardev/stalar:latestDocker Compose
services:
stalar:
image: ghcr.io/stalardev/stalar:latest
ports:
- "3000:3000"
environment:
- AUTH_SECRET=your-random-secret
- STALAR_API_KEY=sk_xxxxx
volumes:
- stalar_data:/app/data
- ./stalar.yaml:/app/stalar.yaml:ro
volumes:
stalar_data:Config File
You can pre-configure integrations using a stalar.yaml file. Mount this file into your container at /app/stalar.yaml.
integrations:
- name: "prometheus-prod"
type: "prometheus"
environment: "production"
config:
url: "http://prometheus:9090"
- name: "loki-prod"
type: "loki"
environment: "production"
config:
url: "http://loki:3100"
- name: "k8s-prod"
type: "kubernetes"
environment: "production"
config:
apiServerUrl: "https://kubernetes.default.svc"
token: "${K8S_TOKEN}"Secrets in Config
Secrets can be specified in three ways:
config:
# Direct value (not recommended for production)
apiKey: "sk-abc123"
# Environment variable
apiKey: "${MY_API_KEY}"
# File reference
apiKey: "$file:/run/secrets/api-key"See the Integrations section for configuration options for each integration type.