docs(self-hosting): add Colima on macOS and make the Mac pages runtime-aware - #869
abhijaisrivastava15 wants to merge 1 commit into
Conversation
| @@ -0,0 +1,228 @@ | |||
| --- | |||
| title: "Colima on macOS" | |||
| description: "Run a self-hosted Future AGI instance on macOS with Colima instead of Docker Desktop, including the VM sizing, the repo location that silently breaks ClickHouse, and Rosetta on Apple Silicon" | |||
There was a problem hiding this comment.
Shorten the description to only what's necessary, it's listing every sub-topic
| description: "Run a self-hosted Future AGI instance on macOS with Colima instead of Docker Desktop, including the VM sizing, the repo location that silently breaks ClickHouse, and Rosetta on Apple Silicon" | ||
| --- | ||
|
|
||
| [Colima](https://github.com/abiosoft/colima) runs the Docker daemon in a Linux VM on macOS and is a drop-in replacement for Docker Desktop. It is MIT licensed, so it is the usual choice when Docker Desktop's subscription terms do not fit your organisation. |
There was a problem hiding this comment.
organisation → organization, docs use American spelling
|
|
||
| ## In this page | ||
|
|
||
| The stack itself is unchanged: you still run `./bin/install` and the same `docker compose` commands. Only four things differ from a Docker Desktop install, and all four will bite you on the first boot if you skip them: |
There was a problem hiding this comment.
Only sizing and the clone path break first boot. Rosetta just makes it slow and the socket is dev mode only, so tone down "all four will bite you on the first boot"
|
|
||
| Colima's own FAQ describes what happens when it cannot: | ||
|
|
||
| > When using docker to bind mount a volume from the host where the volume is not contained within `/Users/$USER`, the container will start without raising any errors but the mapped mountpoint on the container will be empty. |
There was a problem hiding this comment.
Not the verbatim FAQ text, it drops "(e.g. using -v or --mount)". Restore it or don't set it as a quote
|
|
||
| ## Apple Silicon and the backend image | ||
|
|
||
| Five of the six first-party images in the default stack ship `linux/arm64`, so they run native. The exception is `futureagi/future-agi`, which is `linux/amd64` only and backs both `backend` and `worker`. Those two containers are emulated on an M series Mac. |
There was a problem hiding this comment.
M-series, hyphenated, same as Installation
|
|
||
| ```bash | ||
| colima ssh -- ls /proc/sys/fs/binfmt_misc/ # expect a "rosetta" entry | ||
| docker run --rm --platform linux/amd64 alpine:3.21 uname -m # expect x86_64 |
There was a problem hiding this comment.
This passes under QEMU too, so it doesn't prove Rosetta. Say so or drop it
| Rosetta is a property of the VM, not of a container, so set it when you create the VM. If the VM already exists, `colima stop` then `colima start --vm-type vz --vz-rosetta` is the supported way to change VM settings. Run the `binfmt_misc` check above afterwards to confirm it took, because the flag is accepted either way. | ||
| </Note> | ||
|
|
||
| The default stack only pulls, it has no build context for `backend` or `worker`, so emulation is the path there. If you want a native arm64 backend image, the development overlay does carry a build for it: |
There was a problem hiding this comment.
Comma splice, make it a colon
|
|
||
| ## Development mode | ||
|
|
||
| [Development mode](/docs/self-hosting/installation) layers `docker-compose.dev.yml` on top of the base stack and includes a `docker-proxy` service that mounts the host Docker socket. It defaults to `/var/run/docker.sock`, which is Docker Desktop's path, not Colima's. Point it at Colima's socket in `.env`: |
There was a problem hiding this comment.
Installation has no dev mode section, link #other-ways-to-run-it instead
| colima start --cpu 4 --memory 8 --disk 64 | ||
| colima start --cpu 4 --memory 8 --disk 64 --vm-type vz --vz-rosetta | ||
| ``` | ||
| Drop `--vz-rosetta` on an Intel Mac. Two things differ from a Docker Desktop install and both fail quietly, so read [Colima on macOS](/docs/self-hosting/colima) before you install: the repository has to be cloned inside your home directory, and development mode needs `DOCKER_SOCKET` set. |
There was a problem hiding this comment.
Two here, four on the Colima page. "Two more things differ" so the counts don't fight
Summary
Adds
/docs/self-hosting/colima, an end to end guide for running a self-hosted instance on macOS with Colima instead of Docker Desktop, and makes the three existing Mac-facing pages consistent with it.Colima was already the runtime our own macOS install instructions told people to use, but it appeared in exactly one place: two commands in the macOS tab of Requirements. Every other Mac instruction in the section assumed Docker Desktop, including the tip directly above that tab, which opened with "Docker Desktop only" and then sent Mac readers to
Settings → Resources, a screen Colima does not have.Targets
dev; promote tomainafter review.The gap this closes
Three things about this stack break on Colima and none of them were written down. All three fail quietly, which is why they are worth a page:
/Users/$USERinto its VM, and it raises no error for a host path it cannot see: the bind mount simply arrives empty. The default stack mountsfutureagi/.ci/clickhouse-storage-policy.xmlinto ClickHouse, so a clone in/optor/VolumesgetsUnknown storage policy 'tiered'and nothing points at the clone path as the cause./var/run/docker.sock, which is Docker Desktop's path.DOCKER_SOCKETis the override and was documented nowhere, not even in.env.example.What changed
src/pages/docs/self-hosting/colima.mdx(new)The guide. Install, VM sizing with a defaults-vs-needed table, the home directory mount trap with the list of host paths the stack actually bind mounts, Apple Silicon emulation (Rosetta vs QEMU, and why
futureagi/future-agiis the one image that needs it), resizing after first start, the dev mode socket, and a Colima-specific troubleshooting table.src/lib/navigation.tsOne nav entry, "Colima on macOS", between Requirements and Installation.
src/pages/docs/self-hosting/requirements.mdxThe tip said "Docker Desktop only" and gave Docker Desktop-only instructions, while the macOS tab immediately below it told you to install Colima. Rewritten to say what the limit is (the Docker VM's memory, too small by default on either runtime) and then where you set it per runtime. The macOS tab now names both runtimes, carries the
--vm-type vz --vz-rosettaflags, and links to the new page.src/pages/docs/self-hosting/installation.mdxThe Apple Silicon note attributed Rosetta to "auto-enabled on Docker Desktop 4.16+", which is true and not the whole story: on Colima you get slower QEMU emulation unless the VM was created with
--vm-type vz --vz-rosetta. Added that clause.src/pages/docs/self-hosting/troubleshooting.mdxCannot connect to the Docker daemonsaid to start Docker Desktop. It now also coverscolima startand the case where the VM is up butdocker contextpoints elsewhere, which produces the identical error.ERROR: not enough free spacesaid "Docker Desktop's virtual disk"; now runtime-neutral with the Colima command.How every claim was grounded
No claim on the new page came from recall. What each one was read from:
futureagi/future-agiis amd64 only, the other five default-stack images are multi-archdocker manifest inspecton all seven first-party imagescolima start --helpand the upstream README$HOMEis mounted, and an unmounted path fails silentlymountinside a live VM--mountreplaces the default home mount, and overlapping mounts are rejectedMountsOrDefault()inconfig/config.goandcheckOverlappingMountsinenvironment/vm/lima/yaml.godocker-compose.ymlondevDOCKER_SOCKETdefaults to Docker Desktop's socket pathdocker-compose.dev.ymlondev--vm-type vzbinfmt_miscin a live VM shows bothqemu-x86_64androsetta127.0.0.1-bound published ports reach the host127.0.0.1:18923and curled itbackend/workerbuild:block indocker-compose.yml, and it isfi-collectorThat last row is why the page does not tell arm64 users to run
docker compose build backend worker: in the default stack that has nothing to build. The dev overlay does carry a build forbackend, and the page points there instead.Verification
scripts/audit-links.mjs, the same scriptpr-checks.ymlruns, against this branch's tree:Every internal link on the new page resolves, and the page is registered in nav rather than sitting in that orphan count. The 32 orphans are pre-existing and unrelated.
Review checklist
TLDR,Note,Warning,Tip,Tabs,Tab,CardGroup,Card) already exists insrc/components/docs/--disk 64number is consistent between Requirements and the new pageThe companion PR in
future-agi/future-agiadds the same essentials toINSTALLATION.mdand links here, so someone reading the repo rather than the docs site finds it.