Skip to main content

Configuration

Matilda reads configuration from the environment, normally a .env file copied from .env.example. Integration settings can also be saved live on the dashboard Setup page, where they are stored in the database and take precedence over the environment. No restart is needed for either.

Nothing is required to boot. On an https deployment, two conditions are fatal: a default MATILDA_DASHBOARD_SECRET or a default MATILDA_CUSTOMER_SECRET. A demo email that collides with an owner or admin is also refused. Everything else produces a warning at most.

Instance and Docker​

VariableDefaultPurpose
MATILDA_INSTANCEdefaultNamespaces the container, project, volume, and database
MATILDA_HOST_PORT8000Host port published by Docker
MATILDA_NETWORK_MODEbridgeSet host on a Linux server to use the host's WireGuard route and see real client IPs
MATILDA_VERSIONunset (tracks latest)Pinned image tag, the git tag without the v
MATILDA_IMAGEghcr.io/shafiqco/matildaImage name
MATILDA_SERVER_HOSTNAME, MATILDA_SSH_HOST, MATILDA_ROLEunsetOnly for the SSH-tunnel client/server setup in matilda.sh

Kimi (Moonshot AI)​

VariableDefaultPurpose
KIMI_API_KEYunsetAPI key. MOONSHOT_API_KEY is accepted as a fallback name.
KIMI_MODELkimi-k2.6Reply model
KIMI_EXTRACT_MODELkimi-k2.6Post-turn extraction model
KIMI_BASE_URLhttps://api.moonshot.ai/v1API base
KIMI_MAX_TOKENS2048Reply token budget, truncated gracefully

BlueBubbles (iMessage)​

VariableDefaultPurpose
BLUEBUBBLES_URLunsetThe Mac running BlueBubbles, a LAN IP or the WireGuard address
BLUEBUBBLES_PASSWORDunsetBlueBubbles server password
MATILDA_WEBHOOK_TOKENunsetToken gating /webhook. Normally generated from Setup instead.

Dashboard login and roles​

VariableDefaultPurpose
MATILDA_DASHBOARD_OWNER_EMAILSunsetComma-separated owners seeded at startup
MATILDA_DASHBOARD_ADMIN_EMAILSunsetComma-separated admins seeded at startup
MATILDA_DASHBOARD_TEAM_NAMEunsetDefault team the admins are filed on
MATILDA_DASHBOARD_SEED_PASSWORDunsetPassword applied when an account is first created, stored hashed
MATILDA_DASHBOARD_SECRETwell-known defaultSigns the session cookie. Must be long and random in production.
MATILDA_DASHBOARD_SESSION_MAX_AGE1209600Session lifetime in seconds, 14 days
MATILDA_DASHBOARD_DEMO_EMAILunsetEnables the read-only demo login
MATILDA_DASHBOARD_DEMO_PASSWORDunsetRe-synced on every boot
MATILDA_DASHBOARD_ALLOW_CIDRSopenOptional IP allowlist layered under the login
MATILDA_DASHBOARD_EMAILSunsetDeprecated name for the owner list. Honored with a warning.

Customer login (web chat)​

VariableDefaultPurpose
MATILDA_CUSTOMER_SECRETwell-known defaultSigns the customer cookie. At the default, codes are also printed to the log.
MATILDA_LOGIN_CODE_TTL600Seconds a code is valid
MATILDA_LOGIN_MAX_ATTEMPTS5Wrong guesses before a code is burned
MATILDA_LOGIN_RATE_WINDOW900Rate-limit window in seconds
MATILDA_LOGIN_MAX_PER_PHONE3Codes per phone per window
MATILDA_LOGIN_MAX_PER_IP10Codes per IP per window

Handoff email (Resend)​

All three Resend values are required together. Blank disables email; the lead page and PDF still work.

VariableDefaultPurpose
MATILDA_PUBLIC_URLunsetAbsolute URL used only to build the link in the email
RESEND_API_KEYunsetResend key
RESEND_FROMunsetFrom address, for example Matilda <matilda@yourdomain.com>
MATILDA_NOTIFY_EMAILSunsetComma-separated notification list

Follow Up Boss​

VariableDefaultPurpose
FOLLOWUPBOSS_API_KEYunsetEnables the integration. Unset is a silent no-op.
FOLLOWUPBOSS_SYSTEMunsetRegistered system name for the X-System header
FOLLOWUPBOSS_SYSTEM_KEYunsetRegistered system key
FOLLOWUPBOSS_STAGE_MAP{"qualified":"Hot Prospect","showing":"Active Client","nurture":"Nurture"}JSON map from Matilda status to stage name. Empty object disables.
MATILDA_LOCAL_TZunsetIANA timezone for appointment times when the lead's own timezone is unknown

Server (non-Docker)​

Fixed inside Docker. Only apply when running with python run.py.

VariableDefaultPurpose
MATILDA_HOST0.0.0.0Bind address
MATILDA_PORT8000Bind port
MATILDA_DATA_DIR./dataState directory
MATILDA_DB_PATH./data/matilda.dbSQLite file
MATILDA_SESSIONS_DIR./data/sessionsAgent session state
MATILDA_FORWARDED_ALLOW_IPS127.0.0.1Proxies trusted for X-Forwarded-For
MATILDA_COOKIE_SECUREautoSecure cookies when MATILDA_PUBLIC_URL is https
MATILDA_RELOADunsetSet 1 for auto-reload in development