Backend Configuration
The backend server is configured via .app-config.{json,yaml} files or environment variables.
Configuration Options
Section titled “Configuration Options”The port the server listens on
Type: integer (Required)
Default: 50051
staticPath
Section titled “staticPath”Path to static files to serve (optional)
Type: string | null (Optional)
basePath
Section titled “basePath”Base path for the API
Type: string (Required)
Default: "/mzchat"
databaseUrl
Section titled “databaseUrl”Database connection URL (e.g. file:backend.db)
Type: string | null (Optional)
databaseBackend
Section titled “databaseBackend”Database backend type
Type: string (Required)
Default: "sqlite"
Allowed Values: sqlite, postgres, libsql
canonicalAddress
Section titled “canonicalAddress”The canonical public address of the server
Type: string (Required)
Default: "http://localhost:50051"
assetsDomain
Section titled “assetsDomain”Domain used for serving assets (defaults to canonicalAddress)
Type: string | null (Optional)
migrationsPath
Section titled “migrationsPath”Path to database migrations
Type: string (Required)
Default: "drizzle"
uploadsPath
Section titled “uploadsPath”Path to store uploaded files
Type: string (Required)
Default: "uploads"
stateDir
Section titled “stateDir”Directory for storing state (database, secrets, etc.)
Type: string | null (Optional)
meiliUrl
Section titled “meiliUrl”Meilisearch URL (optional)
Type: string | null (Optional)
meiliApiKey
Section titled “meiliApiKey”Meilisearch API Key (optional)
Type: string | null (Optional)
meiliIndexName
Section titled “meiliIndexName”Meilisearch index name
Type: string (Required)
Default: "mzchat-messages"
meiliDbPath
Section titled “meiliDbPath”Path to embedded Meilisearch database
Type: string | null (Optional)
jwtSecret
Section titled “jwtSecret”Secret used for signing JWTs
Type: string | null (Optional)
logLevel
Section titled “logLevel”Logging level (info, debug, error, etc.)
Type: string (Required)
Default: "info"
runMigrations
Section titled “runMigrations”Whether to run database migrations on startup
Type: boolean (Required)
Default: true
trustProxy
Section titled “trustProxy”Trust X-Forwarded-For from a reverse proxy so rate limits see client addresses (enable only behind a proxy)
Type: boolean (Optional)
Default: false
allowPrivateFederation
Section titled “allowPrivateFederation”Allow outbound federation and push requests to loopback and private addresses (for local testing only)
Type: boolean (Optional)
Default: false
IRC Server Configuration
Type: Object
irc.enabled
Section titled “irc.enabled”Enable the IRC server
Type: boolean (Optional)
Default: false
irc.port
Section titled “irc.port”Port for the IRC server
Type: integer (Optional)
Default: 6667
irc.publicHost
Section titled “irc.publicHost”Public facing host for the IRC server (optional)
Type: string | null (Optional)
irc.publicPort
Section titled “irc.publicPort”Public facing port for the IRC server (optional)
Type: integer | null (Optional)
S3 Storage Configuration
Type: Object
s3.endpoint
Section titled “s3.endpoint”Type: string | null (Optional)
Default: "http://localhost:9000"
s3.region
Section titled “s3.region”Type: string | null (Optional)
Default: "us-east-1"
s3.bucket
Section titled “s3.bucket”Type: string | null (Optional)
Default: "mzchat-uploads"
s3.accessKeyId
Section titled “s3.accessKeyId”Required when endpoint is set
Type: string | null (Optional)
s3.secretAccessKey
Section titled “s3.secretAccessKey”Required when endpoint is set
Type: string | null (Optional)
s3.publicUrl
Section titled “s3.publicUrl”Type: string | null (Optional)
s3.forcePathStyle
Section titled “s3.forcePathStyle”Type: boolean (Optional)
Default: false
livekit
Section titled “livekit”LiveKit Configuration
Type: Object
livekit.url
Section titled “livekit.url”LiveKit server URL
Type: string (Optional)
Default: "http://localhost:7880"
livekit.apiKey
Section titled “livekit.apiKey”LiveKit API Key. Calls are disabled unless both key and secret are set.
Type: string | null (Optional)
livekit.apiSecret
Section titled “livekit.apiSecret”LiveKit API Secret
Type: string | null (Optional)