hack.foo
Guides

Cursor cloud agents

Not run yet. This page follows the provider's documentation as read on 2026-11-18 (setup, builds). The install step is the one in Any Linux machine with Docker.

Cloud agents run in Ubuntu VMs. Cursor documents a Docker setup in a .cursor/environment.json Dockerfile. A Build keeps the disk, including Docker's data directory, so pulled images survive between agents. Processes do not.

Files to commit

.cursor/environment.json:

{
  "build": { "dockerfile": "Dockerfile", "context": ".." },
  "install": "sudo service docker start && hack config set --global proxy.bind_address 127.0.0.1 && hack global install --no-interactive",
  "start": "sudo service docker start && hack up --detach --no-interactive --json"
}

.cursor/Dockerfile: the parts of Cursor's documented Docker recipe that matter here (a Docker engine and the Compose plugin, fuse-overlayfs as the storage driver, legacy iptables, and a sudo user in the docker group), using Ubuntu's own Docker packages, then hack from the release installer. No Docker engine runs during the build, so the installer's own hack global install step cannot start the proxy; the install line above does that:

FROM ubuntu:24.04
RUN apt-get update && apt-get install -y --no-install-recommends \
      ca-certificates curl git sudo docker.io docker-compose-v2 fuse-overlayfs iptables tmux \
 && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy \
 && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
RUN mkdir -p /etc/docker && printf '{"storage-driver":"fuse-overlayfs"}\n' > /etc/docker/daemon.json
RUN (id ubuntu >/dev/null 2>&1 || useradd -m -s /bin/bash ubuntu) \
 && echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu \
 && usermod -aG docker ubuntu
RUN curl -fsSL https://github.com/hack-dance/hack/releases/latest/download/hack-install.sh \
  | HACK_INSTALL_NONINTERACTIVE=1 HACK_INSTALL_BIN=/usr/local/bin bash
USER ubuntu

Secret: in the Cursor dashboard, Cloud Agents → Secrets, add HACK_ENV_SECRET_KEY as an Environment Variable or Runtime Secret. A Build Secret is not visible to the running agent.

Environment: in Cloud Agents → Environments, create an environment for the repository and set its environment.json location to that repository. A new environment defaults to None (skip environment.json), which ignores the file above. Builds use the file from the default branch.

Check it

Ask the agent to run (with your project's host):

curl --noproxy hello.hack.local --resolve hello.hack.local:443:127.0.0.1 -k https://hello.hack.local/

Expected differences

  • No DNS for Hack's names: use curl --resolve.
  • Forwarded ports send their own host name, which Hack's proxy has no route for yet.

Not known yet

The VM's CPU architecture and whether systemd-resolved runs. The first run should record both.


Source: v5 (next.34) · docs/site/guides/cloud-cursor.md.

On this page