Docker is the fastest way to run OpenSwarm in a production-like environment. The includedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/UnkleFunk/HouseMusicSwarm-/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose.yml builds the image, forwards port 8080, and mounts the mnt/ and uploads/ directories as volumes so data persists across container restarts. The container starts python server.py automatically, so the FastAPI endpoint is live the moment the stack comes up.
Prerequisites
- Docker Engine ≥ 24 and Docker Compose v2 installed on your host
- API keys for at least one LLM provider (OpenAI, Anthropic, or Google Gemini)
- Optional but recommended: a
COMPOSIO_API_KEYandCOMPOSIO_USER_IDif you want the 10,000+ external integrations
Deployment
Create your .env file
Copy the example file and fill in your keys:At minimum, set one LLM provider key and The full set of available variables is described in the Environment variables table below.
DEFAULT_MODEL:Build and start the stack
Verify the service is running
Once the container is up, the FastAPI server is available at You should see the auto-generated OpenAPI documentation page. If you get a connection error, run
http://localhost:8080.Check the health of the open-swarm agency endpoint:docker-compose logs openswarm to inspect startup output.docker-compose.yml
env_file directive means every variable in your .env is injected into the container automatically — no extra environment: block needed. The two volume mounts keep generated files (in mnt/) and uploaded assets (in uploads/) on the host filesystem so they survive container replacements.
Dockerfile highlights
TheDockerfile is based on python:3.13-slim and installs everything the full agent stack needs:
- Python deps are copied and installed before the rest of the source, so they are layer-cached and don’t reinstall on every code change.
- LibreOffice (
libreoffice-impress) enables PPTX → PDF conversion used by the Slides Agent. - Poppler (
poppler-utils) providespdftoppmfor the PDF thumbnail pipeline. - Playwright Chromium is installed via the system dependency block; browsers are fetched separately at runtime.
Environment variables
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | One of the three | Primary LLM provider — OpenAI |
ANTHROPIC_API_KEY | One of the three | Primary LLM provider — Anthropic Claude |
GOOGLE_API_KEY | One of the three | Primary LLM provider — Google Gemini; also used for image/video generation |
DEFAULT_MODEL | Recommended | Model string for all agents. Defaults to gpt-5.2 if unset. Use litellm/claude-sonnet-4-6 for Anthropic or litellm/gemini/gemini-3-flash for Google. |
COMPOSIO_API_KEY | Optional | Unlocks 10,000+ external integrations (Gmail, Slack, HubSpot, etc.) |
COMPOSIO_USER_ID | Optional | Ties Composio to your account’s connected apps |
SEARCH_API_KEY | Optional | Enables web search, Scholar search, and product search. Get at searchapi.io |
PEXELS_API_KEY | Optional | Stock photo search for the Slides Agent |
PIXABAY_API_KEY | Optional | Additional stock photo source for the Slides Agent |
UNSPLASH_ACCESS_KEY | Optional | Additional stock photo source for the Slides Agent |
FAL_KEY | Optional | fal.ai — Seedance video generation and background removal |
The TUI (
agency.tui()) is not available in Docker mode. The container always starts python server.py, which runs the FastAPI HTTP server. To interact with the agency, send requests to the API endpoint at http://localhost:8080 — see the API Server page for endpoint details.