Self-hosting
Clone is small enough to self-host. The whole stack runs from one docker-compose.yml at the repo root: Postgres, the Django API, the MCP server, and the nginx-fronted web container that also serves these docs and the public marketing site.
What you'll need
- A host with Docker and docker-compose v2.
- Postgres 16 (containerized) or your own managed Postgres at
DATABASE_URL. - An Anthropic API key (
ANTHROPIC_API_KEY) — Prediction and memory promotion require it. - A domain name with HTTPS certificates (Let's Encrypt is the assumed default).
Stack at a glance
| Service | Image / build context | Role |
|---|---|---|
db | postgres:16-alpine | Primary database. |
api | apps/server | Django + DRF backend. |
mcp | apps/mcp | MCP server (HTTP transport). |
web | apps/web (build context: repo root) | nginx — serves the SPA, reverse-proxies /api, /admin, /static, /mcp, and /docs. Also where the docs build is bundled. |
In production the only port exposed to the internet is the web container's 80/443; everything else talks over the internal compose network.
Pages in this section
- Docker Compose — bring the stack up, environment variables, persistence, where each service lives.
- DNS & TLS — required DNS records (including the
api.clone.issubdomain), Let's Encrypt setup, and the most common DNS gotcha. - Smithery — publishing the MCP server URL through Smithery so end users can install it without editing config.
Once it's up
- Public site is at
https://<your-domain>/. - Documentation is at
https://<your-domain>/docs/(this site, deployed from your fork). - API is at
https://<your-domain>/api/...and athttps://api.<your-domain>/.... - MCP server is at
https://<your-domain>/mcp(Streamable HTTP).
Operational tips
- The Django container expects
ALLOWED_HOSTSto include both your public domains and the internal hostnamesapi,localhost— seedocker-compose.ymlfor the exact value used byclone.is. - nginx mounts
/etc/letsencryptread-only from the host. Renew certificates on the host (e.g. with certbot's cron job); the container will pick them up at the next reload. - The MCP server intentionally has
CLONE_API_TOKENunset inhttpmode so it can serve many users in parallel, each authenticated by their own bearer token.