Skip to main content

Overview

Self-hosted Mistle deployments are configured with a TOML file plus optional environment overrides. Use config/config.sample.toml as the complete reference for the current TOML shape. During the migration period, services that read this TOML file must also set:
MISTLE_CONFIG_FORMAT=next
Set MISTLE_CONFIG_PATH to the TOML file path used by each service. Existing MISTLE_GLOBAL_* and MISTLE_APPS_* environment variables still work as overrides after TOML is loaded.

Deployment Shape

A simple deployment can point the control plane and data plane at the same Postgres, PgBouncer, Valkey, and object storage instances. Larger deployments can split those resources by plane. The config file keeps these shared resources separate from individual service settings:
SectionPurpose
services.*Service hosts, ports, public URLs, internal URLs, and service-owned settings
postgres.*Plane-specific Postgres URLs
kv.*Plane-specific Valkey configuration
object_store.*Shared object stores
workflow.*OpenWorkflow namespaces
email.smtpSMTP delivery settings
internal_authService-to-service authentication
sandbox.*Sandbox provider, storage, publish, and token settings
telemetry.*OpenTelemetry export settings

Services

Service sections define where each service listens and how other services reach it.
SectionRequired settings
services.dashboardpublic_url, control_plane_api_origin
services.control_plane_apihost, port, public_url, internal_url
services.data_plane_apihost, port, internal_url
services.data_plane_gatewayhost, port, internal_url, sandbox WebSocket URLs
services.tokenizer_proxyhost, port, public_url, internal_url, egress_url
services.control_plane_workerworkflow_concurrency
services.data_plane_workerworkflow_concurrency
Use public URLs for browser-facing and provider-facing traffic. Use internal URLs for service-to-service traffic inside the deployment network.

Postgres

Postgres is configured separately for the control plane and data plane.
FieldUsed for
direct_urlMigrations and other direct database ownership tasks
pooled_urlRuntime application traffic through PgBouncer
Simple deployments can set both planes to the same database. Split deployments can use separate databases for postgres.control_plane and postgres.data_plane.

KV

kv.control_plane and kv.data_plane describe plane-specific Valkey dependencies. Only valkey is supported today:
[kv.data_plane]
backend = "valkey"
url = "redis://valkey:6379"
key_prefix = "mistle:runtime-state"

Object Stores

object_store.assets stores application assets. object_store.sandbox_storage is used when Archil sandbox storage should mount an S3-compatible bucket:
[sandbox.storage.archil]
mount_object_store = "sandbox_storage"

Authentication

Control-plane user authentication is configured under services.control_plane_api.auth. enabled_methods controls which login methods are available. otp is required by the current runtime. Add google only when Google OAuth is configured:
[services.control_plane_api.auth]
enabled_methods = ["otp", "google"]
Service-to-service auth is configured under internal_auth. The current method is shared_token.

Workflows

Workflow config is split by plane:
[workflow.control_plane]
namespace_id = "production"

[workflow.data_plane]
namespace_id = "production"
Workers consume the namespace and their service-specific concurrency. Managed deployments should run database and workflow migrations as deployment steps instead of relying on long-lived worker startup.

Sandbox

Use sandbox.provider = "docker" for local or simple single-node deployments. Use sandbox.provider = "e2b" for cloud sandboxes. Sandbox storage is configured independently:
BackendRequired section
docker_volumesandbox.storage.docker_volume
archilsandbox.storage.archil
Archil-backed storage can mount object_store.sandbox_storage by setting:
[sandbox.storage.archil]
mount_object_store = "sandbox_storage"

Environment Overrides

TOML should be the primary authored config. Environment variables are override inputs for deployment systems and secret managers. During the migration period:
  • keep using existing MISTLE_GLOBAL_* and MISTLE_APPS_* environment names
  • set MISTLE_CONFIG_PATH to the config file path
  • set MISTLE_CONFIG_FORMAT=next when using the sample TOML shape
  • do not use new MISTLE_POSTGRES_*, MISTLE_KV_*, or MISTLE_SERVICES_* environment namespaces
Environment overrides win when both TOML and env provide the same runtime setting.

Full TOML Key Reference

This table covers the operator-facing next TOML keys accepted by @mistle/config.
KeyRequiredNotes
global.envYesdevelopment or production.
telemetry.enabledYesEnables or disables telemetry export.
telemetry.debugYesEnables debug telemetry behavior.
telemetry.resource_attributesNoOpenTelemetry resource attributes string.
telemetry.traces.endpointYes when telemetry is enabledOptional when telemetry is disabled.
telemetry.logs.endpointYes when telemetry is enabledOptional when telemetry is disabled.
telemetry.metrics.endpointYes when telemetry is enabledOptional when telemetry is disabled.
services.dashboard.public_urlYesPublic dashboard origin.
services.dashboard.control_plane_api_originYesBrowser-facing control-plane API origin used by the dashboard build.
services.control_plane_api.hostYesBind host.
services.control_plane_api.portYesBind port.
services.control_plane_api.public_urlYesPublic control-plane API URL.
services.control_plane_api.internal_urlYesInternal control-plane API URL.
services.control_plane_api.auth.secretYesAuth signing secret.
services.control_plane_api.auth.trusted_originsYesAllowed dashboard/browser origins.
services.control_plane_api.auth.enabled_methodsYesSupported values: otp, google. otp is currently required.
services.control_plane_api.auth.otp.lengthYesOTP code length.
services.control_plane_api.auth.otp.expires_in_secondsYesOTP expiry.
services.control_plane_api.auth.otp.allowed_attemptsYesMaximum OTP attempts.
services.control_plane_api.auth.google.client_idRequired when Google auth is enabledGoogle OAuth client ID.
services.control_plane_api.auth.google.client_secretRequired when Google auth is enabledGoogle OAuth client secret.
services.control_plane_api.integrations.active_master_encryption_key_versionYesActive integration credential key version.
services.control_plane_api.integrations.master_encryption_keys.<version>YesOne or more positive integer string versions.
services.data_plane_api.hostYesBind host.
services.data_plane_api.portYesBind port.
services.data_plane_api.internal_urlYesInternal data-plane API URL.
services.data_plane_gateway.hostYesBind host.
services.data_plane_gateway.portYesBind port.
services.data_plane_gateway.internal_urlYesInternal data-plane gateway URL.
services.data_plane_gateway.sandbox_ws_public_urlYesPublic sandbox WebSocket tunnel URL.
services.data_plane_gateway.sandbox_ws_internal_urlYesInternal sandbox WebSocket tunnel URL.
services.tokenizer_proxy.hostYesBind host.
services.tokenizer_proxy.portYesBind port.
services.tokenizer_proxy.public_urlYesPublic tokenizer proxy URL.
services.tokenizer_proxy.internal_urlYesInternal tokenizer proxy URL.
services.tokenizer_proxy.egress_urlYesSandbox egress URL.
services.control_plane_worker.workflow_concurrencyYesControl-plane workflow worker concurrency.
services.data_plane_worker.workflow_concurrencyYesData-plane workflow worker concurrency.
workflow.control_plane.namespace_idYesControl-plane workflow namespace.
workflow.data_plane.namespace_idYesData-plane workflow namespace.
postgres.control_plane.direct_urlYesDirect control-plane Postgres URL for migrations.
postgres.control_plane.pooled_urlYesPooled control-plane Postgres URL for runtime traffic.
postgres.data_plane.direct_urlYesDirect data-plane Postgres URL for migrations.
postgres.data_plane.pooled_urlYesPooled data-plane Postgres URL for runtime traffic.
kv.control_plane.backendYesCurrently valkey.
kv.control_plane.urlYesControl-plane Valkey URL.
kv.control_plane.key_prefixYesControl-plane Valkey key prefix.
kv.data_plane.backendYesCurrently valkey.
kv.data_plane.urlYesData-plane Valkey URL.
kv.data_plane.key_prefixYesData-plane Valkey key prefix.
object_store.assets.bucket_nameYesAsset object store bucket.
object_store.assets.regionYesAsset object store region.
object_store.assets.endpointNoCustom object store endpoint.
object_store.assets.force_path_styleNoS3 path-style setting.
object_store.assets.access_key_idYesAsset object store access key.
object_store.assets.secret_access_keyYesAsset object store secret key.
object_store.sandbox_storage.bucket_nameRequired when mounted by Archil storageSandbox storage object store bucket.
object_store.sandbox_storage.regionRequired when mounted by Archil storageSandbox storage object store region.
object_store.sandbox_storage.endpointRequired when mounted by Archil storageSandbox storage object store endpoint.
object_store.sandbox_storage.force_path_styleNoS3 path-style setting.
object_store.sandbox_storage.access_key_idRequired when mounted by Archil storageSandbox storage access key.
object_store.sandbox_storage.secret_access_keyRequired when mounted by Archil storageSandbox storage secret key.
email.smtp.from_addressYesSMTP sender address.
email.smtp.from_nameYesSMTP sender name.
email.smtp.hostYesSMTP host.
email.smtp.portYesSMTP port.
email.smtp.secureYesWhether SMTP uses TLS.
email.smtp.usernameYesSMTP username.
email.smtp.passwordYesSMTP password.
internal_auth.methodYesCurrently shared_token.
internal_auth.shared_token.tokenRequired when method is shared_tokenShared service-to-service token.
sandbox.providerYesdocker or e2b.
sandbox.default_base_imageYesSandbox base image reference.
sandbox.publish_base_domainYesBase domain for published sandbox URLs.
sandbox.storage.backendYesarchil or docker_volume.
sandbox.storage.archil.api_keyRequired when storage backend is archilArchil API key.
sandbox.storage.archil.regionRequired when storage backend is archilArchil region.
sandbox.storage.archil.name_prefixNoPrefix for Archil storage names.
sandbox.storage.archil.mount_object_storeNoCurrently only sandbox_storage.
sandbox.storage.docker_volume.name_prefixNoPrefix for Docker volume names; section required when storage backend is docker_volume.
sandbox.tokens.connect.secretYesConnect token signing secret.
sandbox.tokens.connect.issuerYesConnect token issuer.
sandbox.tokens.connect.audienceYesConnect token audience.
sandbox.tokens.bootstrap.secretYesBootstrap token signing secret.
sandbox.tokens.bootstrap.issuerYesBootstrap token issuer.
sandbox.tokens.bootstrap.audienceYesBootstrap token audience.
sandbox.tokens.egress.secretYesEgress token signing secret.
sandbox.tokens.egress.issuerYesEgress token issuer.
sandbox.tokens.egress.audienceYesEgress token audience.
sandbox.publish.access_token.secretYesPublished sandbox access token signing secret.
sandbox.publish.access_token.issuerYesPublished sandbox access token issuer.
sandbox.publish.access_token.audienceYesPublished sandbox access token audience.
sandbox.publish.session.cookie_signing_secretYesPublished sandbox session cookie signing secret.
sandbox.docker.socket_pathRequired when sandbox provider is dockerDocker socket path.
sandbox.docker.network_nameNoDocker sandbox network name.
sandbox.e2b.api_keyRequired when sandbox provider is e2bE2B API key.
sandbox.e2b.domainRequired when sandbox provider is e2bE2B domain.
sandbox.e2b.cpu_countRequired when sandbox provider is e2bE2B sandbox CPU count.
sandbox.e2b.memory_mbRequired when sandbox provider is e2bE2B sandbox memory in MiB.