Skip to main content

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

ServiceImage / build contextRole
dbpostgres:16-alpinePrimary database.
apiapps/serverDjango + DRF backend.
mcpapps/mcpMCP server (HTTP transport).
webapps/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.is subdomain), 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 at https://api.<your-domain>/....
  • MCP server is at https://<your-domain>/mcp (Streamable HTTP).

Operational tips

  • The Django container expects ALLOWED_HOSTS to include both your public domains and the internal hostnames api, localhost — see docker-compose.yml for the exact value used by clone.is.
  • nginx mounts /etc/letsencrypt read-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_TOKEN unset in http mode so it can serve many users in parallel, each authenticated by their own bearer token.