The full Avocado Studio stack — site templates, editor app,
@ai-site-editor/site-sdk, and the orchestrator — is open source under Apache 2.0 and lives in avocadostudio-ai/avocado. The orchestrator (the brain that runs sessions, calls the LLMs, and serves draft state) is the only stateful service in the stack — Docker is the supported path for running it on your own infrastructure. If you need help self-hosting, open an issue.Where to host the orchestrator
The orchestrator is a small Node.js Fastify service. It’s stateful but not heavy — most production deployments fit comfortably on the smallest paid tier of any modern container host.Tested hosts
Resource requirements
- Memory: ~300–500 MB at idle, ~600–800 MB under typical load. A 1 GB instance is comfortable; the smallest “$7/month-ish” tier on most hosts is enough for early use.
- CPU: Mostly I/O-bound — the orchestrator spends most of its time waiting on LLM API calls, not computing. 0.5 vCPU is fine for a handful of concurrent sessions; 1 vCPU is comfortable for a small team.
- Disk: A persistent volume for
/app/.data(session state, telemetry, generated images). 1–5 GB is plenty for early use; generated-image storage is what grows fastest if you use AI image generation heavily. - Network: Outbound HTTPS to your chosen LLM providers (
api.anthropic.com,api.openai.com,generativelanguage.googleapis.com); inbound HTTPS from your editor and site origins. No inbound from end-users — only your editor and Next.js site need to reach it.
Critical hosting constraints
A few things matter regardless of which host you pick:- Persistent volume is required. The orchestrator stores its SQLite database at
/app/.data/orchestrator.db(plus-wal/-shmsidecar files and rolling backups). If you mount that path on an ephemeral filesystem (Cloud Run without a volume, Heroku-style ephemeral dynos, default container hosts without disk attachment), every redeploy or container reschedule will wipe all sessions and undo history. Always attach a persistent volume — even 1 GB is enough. - SSE-friendly reverse proxy. The chat endpoint streams server-sent events for live editor updates. Some reverse proxies and CDNs buffer responses by default, which makes the editor look frozen until the full response lands. If you put a reverse proxy in front of the orchestrator, disable response buffering on
/chat/*and/sites-agent/*(in nginx:proxy_buffering off; in Caddy:flush_interval -1onreverse_proxy; in Cloudflare: bypass cache for these paths). - Long timeouts. Sites-agent runs (full URL migration, repo integration) can take several minutes. If your host has a default request timeout of 30s or 60s, the agent will be killed mid-run. Bump request timeouts to at least 10 minutes on the orchestrator’s routes — most hosts let you configure this per service.
- CORS for the editor’s origin. Set
ORCHESTRATOR_CORS_ORIGINSto include both your site and editor origins (HTTPS, no trailing slash). See CORS configuration below. - Public HTTPS reachable from your editor and site. Both the editor (browser) and your Next.js site (server-side draft fetches) need to call the orchestrator. If your editor is on
https://editor.example.comand your site is onhttps://www.example.com, the orchestrator needs to be on a URL both can reach — usually a public HTTPS endpoint likehttps://orchestrator.example.com.
Building the image
The orchestrator source lives atapps/orchestrator in the repo. Build the image from the repository root:
packages/shared, packages/migration-sdk).
Running standalone
Required environment variables
At minimum you need one AI provider key:CORS configuration
By default the container accepts requests from
http://localhost:3000 and http://localhost:4100. For production, set the allowed origins explicitly.State persistence
The orchestrator writes session state, telemetry, and generated images to/app/.data inside the container. Mount a volume there to persist data across restarts.
The image pre-configures these paths:
ORCHESTRATOR_DB_FILE=/app/.data/orchestrator.dbCHAT_TELEMETRY_FILE=/app/.data/chat-telemetry.ndjsonORCHESTRATOR_GENERATED_IMAGE_DIR=/app/.data/generated-images
Using docker-compose
Adocker-compose.yml at the repo root runs the orchestrator with sensible defaults:
orchestrator-data) and loads env vars from .env at the repo root.
Health check
The container includes a health check that pollshttp://127.0.0.1:4200/health every 30 seconds. Check status with:
Environment reference
See.env.example at the repo root for the complete list of environment variables. Common Docker overrides:
Running locally without Docker
The whole stack is open source, so for local development you can clone the repo and run the orchestrator directly via pnpm from the repository root — that’s the faster dev loop. Docker is the supported path for production self-hosting; the source-based workflow is for contributors and anyone who wants to hack on the orchestrator itself.Troubleshooting
Container exits immediately
Check logs:docker logs avocado-orchestrator. The most common cause is missing API keys or an invalid .env file.
CORS errors from editor or site
SetORCHESTRATOR_CORS_ORIGINS to include both the site and editor origins (no trailing slashes).
State not persisting
Ensure the volume is mounted at/app/.data and that the container user has write permissions.
Health check failing
Wait for the 10-second start period. If it still fails, check that the orchestrator is listening on0.0.0.0:4200 (it should be by default) and that no firewall is blocking the port.