Skip to content
Chatto v0.5.0

Environment Variables

Environment variables override the corresponding chatto.toml settings. Use the names listed here; not every name follows the same section pattern. Check for unknown or deprecated names with chatto config check --config chatto.toml. See Check configuration.

Defaults below apply when a setting is omitted. chatto init also writes setup choices: port 4000, URL http://localhost:4000, embedded NATS enabled with data directory ./data, the asset worker enabled, SMTP port 587, and random secrets. Set the same choices and provide secrets for an equivalent ENV-only deployment. Commented values are examples; they do not override runtime defaults.

CHATTO_LOG_LEVEL
info
general.log_level

Log level. Values: debug, info, warn, error.

CHATTO_LOG_FORMAT
auto
general.log_format

Log output format. Values: auto, text, json, logfmt. auto uses text when Chatto is attached to a terminal and JSON otherwise. Use json for Loki/Grafana ingestion so each log line includes a structured level field.

CHATTO_WEBSERVER_URL
required
webserver.url

Public URL of the server, used for absolute links, public API asset URLs, and OAuth redirects. Set this to the external HTTPS origin when Chatto runs behind a reverse proxy; forwarded proxy headers are not trusted for public URL generation.

CHATTO_WEBSERVER_PORT
webserver.port

Port to listen on. Required without built-in TLS. With TLS, an omitted port uses 443. chatto init writes 4000.

CHATTO_WEBSERVER_BIND_ADDRESS
webserver.bind_address

Address to listen on, without a port. Empty binds all interfaces. Set this to 127.0.0.1 to accept connections only from the same machine, for example through a local reverse proxy. This also applies to the HTTP challenge and redirect listener when built-in TLS is enabled.

CHATTO_WEBSERVER_COOKIE_SIGNING_SECRET
required
webserver.cookie_signing_secret

256-bit hex secret for signing browser-flow cookies and CSRF proofs. The opaque chatto_auth_* authentication cookies do not contain signed user data. Generate with openssl rand -hex 32.

CHATTO_WEBSERVER_COOKIE_ENCRYPTION_SECRET
webserver.cookie_encryption_secret

Optional hex secret for encrypting browser-flow cookies after signing. Must decode to 16, 24, or 32 bytes. Generate an AES-256 key with openssl rand -hex 32.

CHATTO_WEBSERVER_API_COMPRESSION
true
webserver.api_compression

Compress eligible ConnectRPC API responses with gzip. Disable this to reduce compressor memory and CPU at the cost of higher network usage. Chatto continues to accept compressed API requests.

CHATTO_WEBSERVER_API_COMPRESSION_MIN_BYTES
1024
webserver.api_compression_min_bytes

Minimum uncompressed ConnectRPC response size, in bytes, eligible for gzip compression. Increase this threshold when small API responses do not save enough bandwidth to justify compressor memory and CPU.

CHATTO_WEBSERVER_WEBSOCKET_COMPRESSION
true
webserver.websocket_compression

Negotiate WebSocket compression. The realtime server compresses frames of at least 1 KiB with a Huffman-only encoder; smaller invalidation and heartbeat frames stay uncompressed and do not instantiate server-side compressor state.

CHATTO_WEBSERVER_REQUEST_LOGGING
false
webserver.request_logging

Log HTTP requests. Successful requests are debug-level and require CHATTO_LOG_LEVEL=debug; 4xx and 5xx responses remain visible at warning and error levels.

CHATTO_WEBSERVER_TRUSTED_PROXIES
webserver.trusted_proxies

Comma-separated IP addresses or CIDR ranges for reverse proxies that Chatto may trust to supply X-Forwarded-For, X-Real-IP, and X-Forwarded-Host. The default is empty, so direct clients cannot spoof audit attribution or WebSocket same-origin checks with forwarded headers. Configure the narrow network used by your proxy—for example, 127.0.0.1 for a same-host proxy or the specific container-network CIDR—and make the proxy overwrite forwarded headers rather than preserving client-supplied values. This does not make forwarded protocol headers authoritative for public URL generation; continue setting webserver.url.

CHATTO_WEBSERVER_ALLOWED_ORIGINS
webserver.allowed_origins

Comma-separated exact additional HTTPS origins for reverse-proxy aliases. Each origin can use browser cookie authentication, publish a matching bundled frontend OAuth identity, and serve an origin-bound MCP resource. API responses to a request on that origin use it in absolute URLs, such as server images and webhook URLs. Do not include a path, query, or fragment. Do not configure HTTP and HTTPS origins that produce the same request host. Do not use *; it permits none of these behaviors.

Built-in automatic TLS via Let’s Encrypt. When enabled, Chatto handles certificate provisioning and renewal automatically.

CHATTO_WEBSERVER_TLS_ENABLED
false
webserver.tls.enabled

Enable automatic TLS via Let’s Encrypt. Requires ports 80 and 443 (or custom ports configured below).

CHATTO_WEBSERVER_TLS_DOMAIN
webserver.tls.domain

Domain name for the TLS certificate. Required when TLS is enabled.

CHATTO_WEBSERVER_TLS_EMAIL
webserver.tls.email

Email address for Let’s Encrypt notifications. Required when TLS is enabled.

CHATTO_WEBSERVER_TLS_CACHE_DIR
.chatto/certs
webserver.tls.cache_dir

Directory to cache TLS certificates.

CHATTO_WEBSERVER_TLS_HTTP_PORT
80
webserver.tls.http_port

Port for the HTTP server (ACME challenges and HTTPS redirect). Use a higher port if running without elevated privileges.

CHATTO_METRICS_ENABLED
false
metrics.enabled

Expose a Prometheus-compatible per-process metrics endpoint on a separate internal HTTP listener.

CHATTO_METRICS_BIND_ADDRESS
127.0.0.1
metrics.bind_address

Address to bind the metrics listener. Keep this on localhost unless a trusted internal network or sidecar needs direct scrape access.

CHATTO_METRICS_PORT
9090
metrics.port

Port for the metrics listener.

CHATTO_METRICS_PATH
/metrics
metrics.path

HTTP path for Prometheus scrapes.

CHATTO_METRICS_PPROF
false
metrics.pprof

Expose Go pprof debug endpoints on the metrics listener under /debug/pprof/. Keep the metrics listener private and enable this only while profiling.

The exporter exposes deployment-wide Chatto metrics. Run it as chatto exporter against external NATS or an exposed embedded NATS TCP listener, or set exporter.enabled = true to embed it inside chatto run for single-process installs. Clustered deployments should enable the embedded exporter on at most one replica.

CHATTO_EXPORTER_ENABLED
false
exporter.enabled

Start the deployment-wide Prometheus exporter inside chatto run.

CHATTO_EXPORTER_BIND_ADDRESS
127.0.0.1
exporter.bind_address

Address to bind the exporter listener. Keep this on localhost unless a trusted internal network or sidecar needs direct scrape access.

CHATTO_EXPORTER_PORT
9100
exporter.port

Port for the exporter listener.

CHATTO_EXPORTER_PATH
/metrics
exporter.path

HTTP path for Prometheus scrapes.

CHATTO_EXPORTER_S3_REFRESH_INTERVAL
15m
exporter.s3_refresh_interval

How often to refresh cached S3 bucket size metrics when S3 asset storage is configured.

CHATTO_EXPORTER_S3_TIMEOUT
30s
exporter.s3_timeout

Timeout for one S3 bucket-size refresh.

CHATTO_MCP_ENABLED
false
mcp.enabled

Expose the experimental MCP routes on the public Chatto HTTP server. The endpoints use the webserver.url origin and each exact non-wildcard webserver.allowed_origins entry with the /mcp path.

CHATTO_WEBSERVER_SHIELDS_ENABLED
false
webserver.shields.enabled

Expose public Shields.io-compatible badge endpoints for aggregate community counts. When enabled, /.well-known/chatto/shields/online.json and /.well-known/chatto/shields/registered.json return endpoint-badge JSON, while the matching .png URLs redirect to Shields.io-rendered badges. Leave disabled for private communities that should not publish size or activity counts.

The consumer-facing feature and bundled provider have separate switches. This lets you expose Search through Chatto while running a compatible provider separately, or embed the bundled Bleve provider in chatto run for a single-process deployment.

See Enabling Search for a complete setup guide, analyzer names, storage guidance, and troubleshooting.

CHATTO_SEARCH_ENABLED
false
search.enabled

Enable consumer-facing message queries. Compatible clients discover the Search protocol independently and use the Search status RPC to distinguish disabled, indexing, ready, degraded, and unavailable states.

CHATTO_SEARCH_PROVIDER_ENABLED
false
search_provider.enabled

Start the bundled Bleve provider inside chatto run. This does not by itself expose the consumer-facing Search feature.

CHATTO_SEARCH_PROVIDER_DIRECTORY
./data/search
search_provider.directory

Directory for the bundled provider’s disposable local index. Protect this directory like message data: it contains plaintext-derived search content, is not included in Chatto backups, and can be rebuilt from retained EVT history. Do not set it to the embedded NATS data directory or one of its parent directories.

CHATTO_SEARCH_PROVIDER_LANGUAGES
all bundled analyzers
search_provider.languages

Comma-separated Bleve analyzer codes to use when indexing messages and analyzing queries. Supported values are ar, cjk, ckb, da, de, en, es, fa, fi, fr, hi, hr, hu, it, nl, no, pl, pt, ro, ru, sv, and tr. Changing the set automatically rebuilds a recognized Chatto index on restart. See index recovery if startup reports an error. Use none for language-neutral literal and typo-tolerant matching only; the TOML equivalent is languages = [].

CHATTO_DIAGNOSTICS_STARTUP_CPU_PROFILE
diagnostics.startup_cpu_profile

Write a Go CPU profile covering process startup through core boot to this path. Useful for local projection replay benchmarking; disabled when empty.

CHATTO_OPERATOR_API_ENABLED
false
operator_api.enabled

Enable the local root-equivalent Operator API Unix socket for chatto operator ... commands. The public web listener never serves this API.

CHATTO_OPERATOR_API_SOCKET_PATH
/tmp/chatto/operator.sock
operator_api.socket_path

Unix socket path for local operator commands. The socket mode is fixed at 0600; Docker users should normally run chatto operator ... inside the running container with docker exec.

CHATTO_CORE_SKIP_SETUP_WIZARD
false
core.skip_setup_wizard

Disable the first-run web setup wizard. Use this for installations where you create accounts through the local operator API. The flag does not change or reset durable initialization state. Use the same value on all replicas. Existing servers skip the wizard automatically.

CHATTO_CORE_EVT_READ_CACHE_IDLE_TTL
15m
core.evt_read_cache_idle_ttl

Keep an EVT record in each server process’s timeline read cache for this duration after its last access. A shorter duration reduces idle memory use and can cause more NATS reads. A longer duration can make repeated timeline reads faster and use more memory. Supports values such as 15m and 1h.

CHATTO_CORE_EVT_READ_CACHE_MAX_BYTES
256MiB
core.evt_read_cache_max_bytes

Set the approximate maximum size of each server process’s timeline read cache. Chatto evicts the least-recently-used EVT records when the cache exceeds this limit. Supports values such as 128MiB and 1GiB. Set this value to -1 to disable the byte limit. The idle timeout remains active. Chatto logs both effective cache settings at info level during startup. Set CHATTO_LOG_LEVEL=debug to also log cache hit and miss summaries, read durations, LRU eviction counts, expiry counts, and cache clears.

CHATTO_CORE_PROJECTION_SNAPSHOTS
false
core.projection_snapshots

Persist encrypted projection snapshots and replay only the later EVT delta for eligible projections at startup. Chatto treats EVT as authoritative and automatically replays it when a snapshot is missing, incompatible, corrupt, expired, or unavailable. User profile state is eligible, but password verifiers, external identities, and OAuth consent remain outside snapshots and cold-replay from focused event subjects. One elected replica attempts publication after boot and every 23–24 hours.

CHATTO_CORE_PROJECTION_SNAPSHOT_RETENTION
7d
core.projection_snapshot_retention

Retain projection snapshot generations for this duration. NATS applies the duration as the dedicated Object Store TTL. Chatto uses it as the cutoff for optional S3 expiry. Supports values such as 7d, 1w, and 168h.

CHATTO_CORE_PROJECTION_SNAPSHOT_S3_CLEANUP
true
core.projection_snapshot_s3_cleanup

Delete marked S3 projection snapshot generations older than core.projection_snapshot_retention. Disable this when the bucket has an external lifecycle policy for internal/projection-snapshots/. When enabled, S3 credentials need permission to list that prefix, inspect object metadata, and delete matching objects. Chatto validates the exact internal generation path, content type, and object-purpose marker before deletion; asset paths are never eligible.

CHATTO_CORE_SECRET_KEY
required
core.secret_key

256-bit hex secret for HMAC-derived bearer-token, cookie-session, OAuth-code, account-flow, and invitation-code verifiers. Generate with openssl rand -hex 32. Keep this stable across restores if you want sessions, pending credentials, and existing invitation codes to remain valid. Changing it invalidates distributed codes without deleting their durable invitation records; authorised administrators can copy newly derived codes. It also makes projection snapshots unreadable, which Chatto safely rebuilds from EVT.

CHATTO_CORE_ASSETS_SIGNING_SECRET
required
core.assets.signing_secret

256-bit hex secret for signing asset URLs. Generate with openssl rand -hex 32.

CHATTO_CORE_ASSETS_MAX_UPLOAD_SIZE
25 MB
core.assets.max_upload_size

Maximum upload size for all files, including images, GIFs, and videos (e.g., 25MB, 25 MiB). Video upload enablement does not change this limit.

CHATTO_CORE_ASSETS_STORAGE_BACKEND
nats
core.assets.storage_backend

Storage backend for persisted assets. Values: nats, s3.

Only used when storage_backend is set to s3. See the S3 Storage guide for setup instructions.

CHATTO_CORE_ASSETS_S3_ENDPOINT
core.assets.s3.endpoint

S3 endpoint URL (e.g., s3.amazonaws.com for AWS, or a custom endpoint for S3-compatible services).

CHATTO_CORE_ASSETS_S3_BUCKET
core.assets.s3.bucket

S3 bucket name. Created automatically on startup if it doesn’t exist.

CHATTO_CORE_ASSETS_S3_PATH_PREFIX
core.assets.s3.path_prefix

Optional object key prefix for all S3 assets. Leave empty to store objects at the bucket root.

CHATTO_CORE_ASSETS_S3_REGION
core.assets.s3.region

AWS region. Optional for non-AWS S3-compatible services.

CHATTO_CORE_ASSETS_S3_ACCESS_KEY_ID
core.assets.s3.access_key_id

S3 access key ID.

CHATTO_CORE_ASSETS_S3_SECRET_ACCESS_KEY
core.assets.s3.secret_access_key

S3 secret access key.

CHATTO_CORE_ASSETS_S3_USE_SSL
true
core.assets.s3.use_ssl

Use HTTPS for S3 connections.

CHATTO_CORE_ASSETS_S3_PATH_STYLE
auto
core.assets.s3.path_style

Override S3 URL addressing. By default, Chatto uses virtual-hosted addressing for AWS S3 endpoints and path-style addressing for custom S3-compatible endpoints.

Chatto always caches resized images and Neighborhood images for seven days. Remove the obsolete [core.assets.cache] section and the CHATTO_CORE_ASSETS_CACHE_ENABLED and CHATTO_CORE_ASSETS_CACHE_TTL environment variables from your configuration. These settings no longer have an effect.

CHATTO_NATS_REPLICAS
1
nats.replicas

Number of replicas for JetStream streams, KV buckets, and object stores. Must be an odd number (1, 3, or 5) for quorum. Set to 3 or 5 when running a NATS cluster for fault tolerance.

CHATTO_NATS_EMBEDDED_ENABLED
false
nats.embedded.enabled

Enable the embedded NATS server. chatto init writes true. Set to false when connecting to an external NATS server.

CHATTO_NATS_EMBEDDED_PORT
0
nats.embedded.port

Embedded NATS server port. Leave unset or set to 0 for in-process only mode. Set to 4222 or another port to expose a TCP listener for NATS CLI/admin commands.

CHATTO_NATS_EMBEDDED_BIND_ADDRESS
127.0.0.1
nats.embedded.bind_address

Embedded NATS server bind address.

CHATTO_NATS_EMBEDDED_HTTP_PORT
0
nats.embedded.http_port

NATS monitoring/stats HTTP port. Set to 0 to disable. Useful for debugging with the NATS dashboard.

CHATTO_NATS_EMBEDDED_DATA_DIR
nats.embedded.data_dir

JetStream data directory for the embedded server. Set an explicit persistent directory. chatto init writes ./data.

CHATTO_NATS_EMBEDDED_SYNC_INTERVAL
NATS default
nats.embedded.sync_interval

Set how often embedded JetStream syncs file data to disk. Use a duration such as 30s, or use always to sync every write before NATS acknowledges it. Set this to always when you use a single NATS server and data durability is more important than maximum write throughput. If you omit this setting, Chatto keeps the NATS default.

CHATTO_NATS_EMBEDDED_AUTH_TOKEN
nats.embedded.auth_token

Auth token for the embedded NATS server. When the embedded TCP port is enabled, Chatto derives matching nats.client defaults for CLI/admin commands unless you override them explicitly.

CHATTO_NATS_CLIENT_URL
nats.client.url

NATS server URL to connect to when using external NATS or an exposed embedded TCP listener. Supports comma-separated URLs for cluster failover (e.g., nats://n1:4222,nats://n2:4222).

CHATTO_NATS_CLIENT_AUTH_METHOD
nats.client.auth_method

NATS authentication method for external NATS or an exposed embedded TCP listener. Values: none, token, userpass, credentials, nkey.

CHATTO_NATS_CLIENT_TOKEN
nats.client.token

NATS auth token (when using token auth method). When explicitly set alongside embedded NATS, it must match CHATTO_NATS_EMBEDDED_AUTH_TOKEN.

CHATTO_NATS_CLIENT_USERNAME
nats.client.username

NATS username (when using userpass auth method).

CHATTO_NATS_CLIENT_PASSWORD
nats.client.password

NATS password (when using userpass auth method).

CHATTO_NATS_CLIENT_CREDENTIALS_FILE
nats.client.credentials_file

Path to .creds file (when using credentials auth method).

CHATTO_NATS_CLIENT_NKEY_SEED
nats.client.nkey_seed

NKey seed (when using nkey auth method).

CHATTO_NATS_CLIENT_CA_CERT
nats.client.ca_cert

PEM-encoded CA certificate for verifying the NATS server’s TLS certificate. When set, the NATS client connection uses TLS.

CHATTO_AUTH_DIRECT_REGISTRATION
true
auth.direct_registration

Enable direct (email/password) registration. When false, the registration page is hidden and the registration API returns 403. Existing users can still sign in through enabled password login or configured SSO providers.

CHATTO_AUTH_DIRECT_LOGIN
true
auth.direct_login

Enable direct sign-in with a username or email address and password. When false, the password login form and recovery link are hidden. Password sign-in, user password changes, and password recovery are disabled on the server. Account settings shows disabled password controls with an SSO notice. Sensitive account actions require fresh SSO authentication instead of local password proof. Existing sessions, stored passwords, registration, and operator recovery are unaffected.

CHATTO_AUTH_TOKEN_TTL
90d
auth.token_ttl

Renewal window for active human sessions and initial lifetime of each same-origin cookie credential. Active bearer sessions advance this window during background refresh. In the final quarter, the bundled browser automatically renews the same cookie handle through a dedicated route. Ordinary validation does not write the session. An inactive session expires after one complete window. Supports durations like 90d or 2160h.

CHATTO_AUTH_ACCESS_TOKEN_TTL
15m
auth.access_token_ttl

Fixed lifetime of each human bearer access token. Validation does not renew it; compatible clients rotate the paired refresh credential before expiry. Supports durations like 15m, 30m, or 1h.

CHATTO_AUTH_LOOPBACK_CLIENT_ENABLED
false
auth.loopback_client_enabled

Let the Chatto web client sign in to this server when the client runs on a local address of the member’s device, for example a development server on localhost. The client uses the built-in chatto://loopback identity. Its sessions end at most 24 hours after sign-in and do not renew. When you set this to false, existing sessions of this client also stop working. Upgrade every serving replica before you enable this setting, and use the same value on every replica. Sign-ins made while replicas use different values can end, and members must then sign in again. See Clients From Other Origins.

CHATTO_AUTH_EMAIL_OTP_THROTTLING_ENABLED
true
auth.email_otp.throttling_enabled

Enable throttling for registration and email-verification code delivery and wrong-code attempts. Set to false to disable these throttles while keeping OTP TTL enforcement.

CHATTO_AUTH_EMAIL_OTP_TTL
30m
auth.email_otp.ttl

How long registration and email-verification codes remain valid. Supports durations like 15m, 30m, or 1h.

CHATTO_AUTH_EMAIL_OTP_MAX_DELIVERED_CODES
10
auth.email_otp.max_delivered_codes

Maximum successfully delivered registration or email-verification codes allowed for the same email challenge before fresh code requests are throttled.

CHATTO_AUTH_EMAIL_OTP_MAX_WRONG_ATTEMPTS
5
auth.email_otp.max_wrong_attempts

Maximum wrong-code submissions allowed for the same email challenge before the challenge is exhausted until its TTL expires.

External login providers are configured as repeated [[auth.providers]] tables in chatto.toml. Supported provider types are oidc, github, gitlab, google, and discord.

CHATTO_AUTH_PROVIDERS_<index>_<field>
auth.providers

Counted environment-variable equivalent of repeated [[auth.providers]] tables. Indexes start at 0 and must not have gaps. Supported fields are ID, TYPE, LABEL, CLIENT_ID, CLIENT_SECRET, TOKEN_ENDPOINT_AUTH_METHOD, ISSUER_URL, SCOPES, REQUEST_EMAIL, AUTO_PROVISION, ALLOWED_GROUPS, GROUPS_CLAIM, and GROUP_ROLES. GROUP_ROLES takes space-separated group:role pairs, the same as the TOML value. SCOPES and ALLOWED_GROUPS take comma-separated lists. An empty ALLOWED_GROUPS value is an error. Use chatto.toml for group names that contain commas. CLIENT_SECRET is optional only for public OIDC clients; OAuth provider types still require it.

For compatibility with older single-provider OIDC deployments, Chatto also accepts CHATTO_AUTH_OIDC_ENABLED, CHATTO_AUTH_OIDC_ISSUER_URL, CHATTO_AUTH_OIDC_CLIENT_ID, CHATTO_AUTH_OIDC_CLIENT_SECRET, and optional CHATTO_AUTH_OIDC_LABEL. These create one oidc provider with id = "oidc". Do not combine them with counted CHATTO_AUTH_PROVIDERS_<index>_* variables.

[[auth.providers]]
id = "chatto-hub"
type = "oidc"
label = "Chatto Hub"
issuer_url = "https://hub.chatto.dev"
client_id = "..."
client_secret = "..."
auto_provision = false

Provider IDs are used in login URLs and external identity links, so do not change them after users link accounts through that provider.

request_email defaults to false, so Chatto does not request provider email scopes unless you opt in. Set request_email = true when you want provider-verified email claims. OIDC providers can run with only openid profile; Chatto links and signs in accounts by issuer and subject even when no email claim is returned.

CHATTO_AUTH_PROVIDERS_0_TOKEN_ENDPOINT_AUTH_METHOD sets the OIDC-only token_endpoint_auth_method option: client_secret_basic, client_secret_post, or none. Basic and POST require a secret; none forbids one. Omit the option to use public-client authentication without a secret, or discovery-selected Basic/POST with a secret. See token authentication configuration.

For a CIMD-capable OIDC provider, set CHATTO_AUTH_PROVIDERS_<index>_CLIENT_ID to {webserver.url}/oauth/client-metadata.json and omit CHATTO_AUTH_PROVIDERS_<index>_CLIENT_SECRET. Chatto then publishes the public client metadata at that URL. See the External Login Providers guide for an example.

To allow only the members of some groups of an OIDC provider, set allowed_groups. To give roles to group members, set group_roles. See Map groups to roles. See Restrict who can sign in.

Set auto_provision = true only for providers whose users should be allowed to create accounts. Unlinked identities from providers without auto-provisioning can still be linked by existing signed-in users from account settings.

Provider account settings also support counted environment variables:

TOML optionEnvironment suffix after CHATTO_AUTH_PROVIDERS_0_Default
manage_usernamesMANAGE_USERNAMESfalse
update_usernamesUPDATE_USERNAMESfalse; requires manage_usernames
username_claimUSERNAME_CLAIMpreferred_username; OIDC only
allow_unlinkingALLOW_UNLINKINGtrue

See managed usernames and account links for collision handling, existing accounts, and operator controls.

See External Login Providers for callback URLs, provider-specific examples, and discovery behavior.

SMTP is the default transactional email transport. Set email.transport = "jmap" when your provider exposes JMAP submission and you want Chatto to authenticate with a bearer token instead.

CHATTO_EMAIL_TRANSPORT
smtp
email.transport

Transactional email transport. Supported values are smtp and jmap.

CHATTO_EMAIL_JMAP_SESSION_URL
email.jmap.session_url

HTTPS JMAP session resource URL. Required when email.transport is jmap.

CHATTO_EMAIL_JMAP_ACCESS_TOKEN
email.jmap.access_token

Bearer access token for the JMAP account. Required when email.transport is jmap.

CHATTO_EMAIL_JMAP_FROM
email.jmap.from

From address for outgoing email. It must match a sending identity in the JMAP account. Required when email.transport is jmap.

CHATTO_EMAIL_JMAP_ACCOUNT_ID
email.jmap.account_id

Optional JMAP account ID. By default, Chatto uses the session’s primary submission account.

CHATTO_EMAIL_JMAP_IDENTITY_ID
email.jmap.identity_id

Optional JMAP identity ID. By default, Chatto uses the identity matching email.jmap.from.

CHATTO_EMAIL_JMAP_DRAFT_MAILBOX_ID
email.jmap.draft_mailbox_id

Optional JMAP Drafts mailbox ID. By default, Chatto uses the mailbox with the drafts role.

CHATTO_SMTP_ENABLED
false
smtp.enabled

Enable SMTP email sending.

CHATTO_SMTP_HOST
smtp.host

SMTP server hostname.

CHATTO_SMTP_PORT
smtp.port

SMTP port. Common values: 587 for STARTTLS, or 465 for implicit TLS/SMTPS.

CHATTO_SMTP_TLS
mandatory
smtp.tls

SMTP TLS policy. Use mandatory to require STARTTLS on port 587, or implicit for SMTPS on port 465. When this value is omitted or left as mandatory, Chatto automatically uses implicit TLS for port 465. Use opportunistic only when the SMTP server cannot support mandatory STARTTLS and plaintext fallback is explicitly acceptable. Chatto logs a warning at startup when this value is opportunistic.

CHATTO_SMTP_TLS_SERVER_NAME
smtp.tls_server_name

SMTP TLS server name for certificate verification and SNI. Use when smtp.host is an IP address or internal alias but the certificate is issued for a DNS name.

CHATTO_SMTP_TLS_SKIP_VERIFY
false
smtp.tls_skip_verify

Disable SMTP TLS certificate verification. Insecure; use only for trusted internal SMTP servers with self-signed or mismatched certificates. Chatto logs a warning at startup when this value is true.

CHATTO_SMTP_USERNAME
smtp.username

SMTP username.

CHATTO_SMTP_PASSWORD
smtp.password

SMTP password.

CHATTO_SMTP_FROM
smtp.from

From address for outgoing emails.

CHATTO_PUSH_ENABLED
false
push.enabled

Enable Web Push notifications.

CHATTO_PUSH_VAPID_PUBLIC_KEY
push.vapid_public_key

VAPID public key for Web Push. Generate with npx web-push generate-vapid-keys.

CHATTO_PUSH_VAPID_PRIVATE_KEY
push.vapid_private_key

VAPID private key for Web Push.

CHATTO_PUSH_VAPID_SUBJECT
push.vapid_subject

VAPID subject identifier. Use an operator email address, optionally prefixed with mailto:, or an https: contact URL.

CHATTO_ASSET_PROCESSING_ENABLED
false
asset_processing.enabled

Start the built-in durable asset-processing worker inside chatto run. chatto init writes this as true for a self-contained default installation. The explicit chatto asset-processing command runs regardless of this setting.

CHATTO_ASSET_PROCESSING_FFMPEG_PATH
asset_processing.ffmpeg_path

Path to the ffmpeg binary. If not set, Chatto looks for ffmpeg in PATH.

CHATTO_ASSET_PROCESSING_FFPROBE_PATH
asset_processing.ffprobe_path

Path to the ffprobe binary. If not set, Chatto looks for ffprobe in PATH.

CHATTO_ASSET_PROCESSING_MAX_CONCURRENT_JOBS
2
asset_processing.max_concurrent_jobs

Maximum number of jobs to process concurrently in each worker process. Higher values use more CPU and memory.

CHATTO_ASSET_PROCESSING_TEMP_DIR
asset_processing.temp_dir

Directory for temporary files during transcoding. Defaults to the system temp directory.

CHATTO_VIDEO_ENABLED
false
video.enabled

Allow video uploads and enqueue their derivative processing. At least one embedded or standalone asset-processing worker must have ffmpeg and ffprobe available.

CHATTO_VIDEO_MAX_UPLOAD_SIZE
unset
video.max_upload_size

Deprecated. Set CHATTO_CORE_ASSETS_MAX_UPLOAD_SIZE to the desired limit for all files, then remove this setting. While this setting is present, the larger of it and the general limit applies to all files, even when video uploads are disabled. An absent general limit uses its 25 MB default. The old implicit 100 MB video default no longer applies.

CHATTO_LIVEKIT_ENABLED
false
livekit.enabled

Enable LiveKit voice and video call support. Requires a running LiveKit server.

CHATTO_LIVEKIT_URL
livekit.url

LiveKit server WebSocket URL. Use ws:// for development, wss:// for production.

CHATTO_LIVEKIT_API_KEY
livekit.api_key

LiveKit API key for authentication.

CHATTO_LIVEKIT_API_SECRET
livekit.api_secret

LiveKit API secret for signing JWT tokens. Keep this confidential.

CHATTO_LIVEKIT_SERVER_ID
livekit.server_id

Unique identifier for this Chatto server, prefixed to deterministic LiveKit room names. This value must match across replicas of one Chatto server, and should differ only across different Chatto servers sharing the same LiveKit cluster. When empty, room names use the unprefixed format. The old CHATTO_LIVEKIT_INSTANCE_ID / livekit.instance_id name is still accepted as a deprecated alias.

CHATTO_LIVEKIT_INSTANCE_ID
livekit.instance_id

Deprecated alias for CHATTO_LIVEKIT_SERVER_ID / livekit.server_id. Prefer the server ID name in new deployments.

CHATTO_LIVEKIT_WEBHOOK_API_KEY
livekit.webhook_api_key

API key that LiveKit uses to sign webhook requests. When multiple Chatto servers share a LiveKit cluster, the webhook signing key may differ from the per-server API key. Falls back to CHATTO_LIVEKIT_API_KEY when not set.

CHATTO_LIVEKIT_WEBHOOK_API_SECRET
livekit.webhook_api_secret

API secret for validating webhook signatures. Falls back to CHATTO_LIVEKIT_API_SECRET when not set.

CHATTO_OWNERS_EMAILS
owners.emails

Comma-separated list of email addresses that confer server-owner status. A user with any verified email matching the list gets full server access (including /admin routes). Only verified email addresses are matched.

Server-wide resource limits. Use -1 for unlimited (the default), 0 to disable creation entirely, or any positive integer to cap.

CHATTO_LIMITS_MAX_USERS
-1
limits.max_users

Maximum number of verified accounts on this server. An account counts once it has at least one verified sign-in factor: a verified email or a linked SSO identity. Enforced when accounts are created and when the first verified factor is added. Note that the check is non-atomic, so a burst at the boundary can briefly overshoot by one or two.

[core.bot_webhooks]
max_attempts = 5
retry_delay = "30s"
expiry = "24h"
Environment variableTOML keyDefaultMeaning
CHATTO_CORE_BOT_WEBHOOKS_MAX_ATTEMPTScore.bot_webhooks.max_attempts5Maximum delivery attempts, including the first attempt. Range: 1–100.
CHATTO_CORE_BOT_WEBHOOKS_RETRY_DELAYcore.bot_webhooks.retry_delay30sInitial delay. Range: 1 second–30 minutes. Doubles after each failed attempt, up to 30 minutes.
CHATTO_CORE_BOT_WEBHOOKS_EXPIRYcore.bot_webhooks.expiry24hLifetime from the source message time. Range: 1 second–30 days.

Restart the server after a change. Delivery and retries are best effort. Restart discards pending work and retry timers. A source event accepted after restart uses the new attempt limit and retry delay; expiry is still measured from the original message time. Attempts include failures before HTTP starts. The network policy is checked on each attempt. Destinations require public HTTPS, except localhost and *.localhost, which permit HTTP and HTTPS only when every resolved address is loopback. IP literals do not receive this exception. Redirects are not followed.

See outbound bot webhooks for the request body, signature scheme, and receiver requirements.

[core.log]
retention = "7d"
Environment variableTOML keyDefaultDescription
CHATTO_CORE_LOG_RETENTIONcore.log.retention7dRetention of operational diagnostics. Minimum: 1 second. Zero selects the default.

LOG retains terminal outbound webhook failures across server replicas. Expired records are removed and cannot be recovered. LOG is excluded from backups. Retention limits record age; it does not impose a fixed byte limit. Use the same configuration on all replicas.

Builds with the bootstrap tag can create bots on an empty server. Release builds ignore bootstrap settings. Later starts do not change existing data.

Environment variableTOML key within [[bootstrap.bots]]Description
CHATTO_BOOTSTRAP_BOTS_0_BIObioOptional public Markdown bio, set only when the bot is first created.
CHATTO_BOOTSTRAP_BOTS_0_CREDENTIAL_FILEcredential_fileFile for the initial API key, written with owner-only permissions.
CHATTO_BOOTSTRAP_BOTS_0_OUTBOUND_WEBHOOK_URLoutbound_webhook_urlOptional destination for an enabled outbound webhook named Local development. The signing secret is not exported.

Use consecutive indices from zero for additional bots. The development stack sets these values for TestBot and points its webhook at the local Runling port.