Skip to content

Configuration

All settings are stored in config.yaml. Copy the example to get started:

bash
cp config.example.yaml config.yaml

Settings can also be overridden via environment variables with the STOA_ prefix:

bash
STOA_DATABASE_URL="postgres://user:pass@host:5432/db?sslmode=disable"
STOA_AUTH_JWT_SECRET="a-secure-secret"
STOA_SERVER_PORT=8080

Key Settings

SettingDefaultDescription
server.port8080HTTP port
database.urlpostgres://stoa:secret@localhost:5432/stoaPostgreSQL connection string
auth.jwt_secretchange-me-in-productionJWT signing key
media.storagelocalMedia storage (local or s3)
media.local_path./uploadsLocal upload path
i18n.default_localede-DEDefault language
payment.encryption_key(required)AES-256 key for payment config encryption (32 bytes or 64 hex chars)

Payment Encryption Key

The payment.encryption_key is required to encrypt provider credentials (API keys, secrets) stored in payment methods. Set it before the first run:

bash
# Generate a random 64-character hex key
openssl rand -hex 32

Set via environment variable:

bash
STOA_PAYMENT_ENCRYPTION_KEY="your-64-char-hex-key"

WARNING

Never commit your config.yaml to version control if it contains real secrets. Use environment variables in production.

CLI Reference

bash
stoa serve                  # Start HTTP server
stoa migrate up             # Run migrations
stoa migrate down           # Roll back last migration
stoa admin create           # Create admin user
  --email admin@example.com
  --password your-password
stoa seed --demo            # Load demo data
stoa plugin list            # List installed plugins
stoa version                # Print version

Released under the MIT License.