Skip to main content

Configuration

All configuration is via environment variables. Copy .env.example to .env and set your values before starting the stack.

Storage

VariableDefaultDescription
SP_DATA_DIR~/.signalpilotPath to the directory where the gateway stores its SQLite database, encryption salt, annotations, and local state. Override per-deployment (e.g. /var/lib/signalpilot).

Encryption

VariableDefaultDescription
SP_ENCRYPTION_KEYRequired. Primary key used for AES-GCM encryption of credentials at rest.
SP_ENCRYPTION_SALTRequired. Salt used in key derivation. Must be set alongside SP_ENCRYPTION_KEY.
SP_ALLOW_LEGACY_CRYPTOfalseSet to true to allow SHA-256 credential hashing during migration windows. AES-GCM is the canonical path.
SP_BYOK_PROVIDERBYOK encryption provider name (e.g. aws_kms). Pro/Team/Enterprise plans only.
SP_BYOK_PROVIDER_CONFIGJSON-encoded configuration for the BYOK provider.

Network

VariableDefaultDescription
SP_GATEWAY_URLhttp://localhost:3300Public URL of this gateway instance. Used for internal service-to-service callbacks and embedded in MCP tool responses. Override when reverse-proxying or hosting at a non-default port.
SP_SANDBOX_MANAGER_URLURL of the sandbox manager service (DuckDB/SQLite sandboxed execution). Required when using sandbox-backed connectors.
SP_GATEWAY_CSP_POLICYOverride the default Content-Security-Policy header. Leave unset to use the built-in policy.
SP_BACKEND_URLURL of the SignalPilot backend API (cloud deployments only).
SP_ALLOWED_ORIGINSComma-separated list of allowed CORS origins.
SP_MCP_PORT8000Port the MCP server listens on (only used when SP_MCP_TRANSPORT=streamable-http).
SP_MCP_TRANSPORTstdioMCP transport protocol. Valid values: stdio, streamable-http.

Deployment

VariableDefaultDescription
SP_DEPLOYMENT_MODElocalSet to cloud to enable multi-tenant plan enforcement, SSRF validation for TCP connections, and Clerk JWT authentication.

Rate limiting

VariableDefaultDescription
SP_PER_KEY_RPM1000MCP tool calls per minute per API key.
SP_PER_ORG_RPM5000MCP tool calls per minute per org (cloud mode).

Auth

VariableDefaultDescription
SP_JWT_LEEWAY30Clock leeway in seconds for JWT verification.
SP_SANDBOX_TOKENShared secret used to authenticate gateway-to-sandbox-manager requests.

Governance

VariableDefaultDescription
SP_MAX_EXPORT_ROWS50000Maximum rows allowed in a single audit export.
SP_ANNOTATIONS_TTL60.0Cache TTL in seconds for schema annotation files.
SP_ADMIN_USER_IDSlocalComma-separated user IDs with admin access. The value local is the single-user local-deployment sentinel.

SSRF protection

VariableDefaultDescription
SP_ALLOW_PRIVATE_CONNECTIONSSet to true to allow TCP connections to RFC1918 private ranges (loopback and link-local are always blocked). Intended for self-hosted deployments where the warehouse is on a private network. Unset by default in cloud mode.

Knobs that are not env-driven:

  • LIMIT injection defaultquery_database accepts a row_limit parameter (default 1000, max 10000). There is no global env override; callers control the per-call limit.
  • Budget caps — set per session via the start_session/check_budget MCP tools. There is no global default budget env var.
  • Audit log — always enabled; every query is logged. There is no env toggle.
  • PII redaction in audit — always active; SQL string literals are replaced with <REDACTED> in audit records.