Chatwoot Custom ships as a single Docker image built by a multi-stage Dockerfile. Stage 1 clones upstream Chatwoot, overlays all custom frontend files, and runs a Vite build. Stage 2 starts from the official Chatwoot Rails image and overlays all custom backend files on top of the compiled frontend output. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jAtInn71/chatwoot-costom/llms.txt
Use this file to discover all available pages before exploring further.
build.sh script is the recommended entry point for local and CI builds.
build.sh
Usage:
| Argument | Default | Purpose |
|---|---|---|
agent_id | agent_6601kc1fqeecfc88s7d52jde0syq | Legacy fallback agent ID baked into the bundle |
voice_id | (empty) | ElevenLabs voice ID (legacy fallback) |
agent_name | AI Assistant | Display name (legacy fallback) |
tag | latest | Docker image tag |
chatwoot-custom:<tag>:
ElevenLabs env vars are legacy fallbacks
VITE_ELEVENLABS_AGENT_ID, VITE_ELEVENLABS_VOICE_ID, and VITE_ELEVENLABS_AGENT_NAME are Vite build arguments — they are inlined into the widget JavaScript bundle at build time via import.meta.env. Changing the agent ID at runtime without rebuilding has no effect.
These build args are legacy fallbacks only. Voice agent configuration now lives exclusively in the per-inbox dashboard settings (voice_agent_provider, voice_agent_api_key, voice_agent_config_data, elevenlabs_agent_id). The widget fetches this config on every panel open via GET /api/v1/widget/conversations/inbox_config, so dashboard changes take effect on the next bubble click without any rebuild.
For new deployments, skip the build-arg approach entirely. Build with
./build.sh (defaults), then configure your agent from the Chatwoot dashboard under Settings → Inboxes → [your inbox] → Configuration → Voice Agent. The build args exist only for edge-case fallbacks and backwards compatibility.Dockerfile overview
Stage 1 — Node.js / Vite build
exit 139) under heavy minification load on Alpine in memory-constrained CI runners. glibc provides a much more stable V8 runtime for builds of this size.
The stage:
- Installs
git,python3,build-essential, andpnpm. - Clones upstream Chatwoot with
--depth 1. - Runs
pnpm install --frozen-lockfile. - Copies all
custom/widget/andcustom/dashboard/files over the cloned source tree. - Runs
vite build --config vite.config.ts --minify esbuild.
Stage 2 — Rails production image
Memory requirements
The Vite build is memory-intensive. The Dockerfile sets the following environment variables in Stage 1 to prevent OOM kills:--max-old-space-size=6144— raises the V8 heap. Total RSS during minification spikes past 4 GB on this codebase; 3 GB was causingSIGSEGV(exit 139) in CI.--max-semi-space-size=128— reduces GC churn in the young-generation heap.UV_THREADPOOL_SIZE=4— caps libuv workers to avoid forking too many native threads on memory-tight runners.GOMAXPROCS=2— limits esbuild parallel workers, the biggest source of OOM during minification.
Local development workflow
Edit custom files
Make changes inside
custom/widget/, custom/backend/, or custom/dashboard/. Do not touch any file outside custom/.Pushing to a registry
After a successful build:<registry> with your container registry hostname (e.g., ghcr.io/your-org, registry.example.com).