Antigravity + xCloud
Run Docker apps with Antigravity on xCloud
Running Docker apps with Antigravity means asking Google's agent in the agent panel, with your Compose project open, to scan it, deploy it to an xCloud Docker server once you approve and keep the app backed up.
- Skill: xcloud:deploy
- Toolsets: sites, servers
- Free with every xCloud account
YouScan this workspace's compose file with xCloud and tell me which port to proxy.
git_compose-scanread-only
AgentTwo services. web publishes 8080, db publishes nothing. xCloud should proxy to 8080, which is free on Frankfurt.
YouGood. Dry run it.
servers_sites_git_dockerdry run
AgentDry run clean: docker-compose.yml, port 8080, staging hostname assigned. Confirm the create?
. Keep a human in the loop: xCloud stops and asks before anything that creates, deploys, updates, reboots, deletes or buys.
Setup
How Do You Set Up Antigravity to Run Docker apps on xCloud?
Connect Antigravity once; every job on this account uses the same connection. Then ask in plain words.
Add xCloud in View raw config
In the Antigravity IDE, click the three dots at the top of the agent side panel, choose MCP Servers, then Manage MCP Servers, then View raw config. Paste this into mcp_config.json and save. The field is serverUrl: it is the only remote URL property in Antigravity's documented configuration, so do not write url or httpUrl.
{ "mcpServers": { "xcloud": { "serverUrl": "https://app.xcloud.host/mcp" } } }Sign in, then check the connection
Open Agent settings (Cmd+, on Mac, Ctrl+, on Windows and Linux), go to Customizations and click Authenticate next to xcloud. Approve the teams and the access level in the browser, copy the authorization code it shows, paste it into the settings panel and click Submit. Then ask this in the agent panel.
Who am I on xCloud?No browser sign-in? Use an API key
Create a token with the mcp:invoke scope plus the read abilities for the areas it will use (read:servers and read:sites, with read:billing and read:addons for billing and add-on tools) and the matching write: abilities if it should change things in Settings, Developers, API Tokens and add it as a header. Replace YOUR_TOKEN with the token, which contains a pipe character, and never paste it into chat. Keep this file out of git.
{ "mcpServers": { "xcloud": { "serverUrl": "https://app.xcloud.host/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } }Check it worked
Then ask Antigravity for the job itself, for example:
Scan the docker-compose.yml in this workspace with xCloud and tell me which service xCloud should proxy to.
In practice
How Does Docker apps Work from Antigravity?
Antigravity asks twice, and the Docker job shows why that is useful. A tool you have not allowed runs in Ask mode, so the panel stops on every xCloud call until you accept it. For the scan you will click through git_detect and git_compose-scan, which are reads, and a permission pattern such as mcp(xcloud/git_compose-scan) lets you allow just those. The Docker create is different. After Antigravity approves it, xCloud still wants an explicit confirmation, and the dry run comes first: the compose file, the port, the address and any warnings, printed in the panel before you answer once for the real call.
Because the agent has your repository open, it can compare the scan with the file on screen. Say deploy this to the Frankfurt Docker server and Antigravity tells you which services publish which ports, flags a file that publishes none, which xCloud accepts and then answers 502, and offers the rewrite as an edit you review: publish 127.0.0.1:8080:8080 and build the image from source if it pulled from a private registry. xCloud's deploy runs docker compose pull and never docker login, so a private image cannot be pulled. The change goes into the repository and gets pushed before the deploy reads it. After the confirmed create, Antigravity polls the site status and fetches the URL.
Backups work from the same panel. Ask for a Docker backup before a risky change, and Antigravity calls the backup tool and reads the list until the row completes. The app is stopped while the snapshot is captured, so ask at a quiet time. Anything that replaces data, a restore, is a dashboard step, and Antigravity hands you the path instead.
Antigravity specific: Add the xCloud entry with serverUrl, not url or httpUrl, and finish OAuth by pasting the authorization code under Settings, Customizations, or no xCloud tool will appear. Allow tools one by one, such as mcp(xcloud/git_compose-scan), and avoid mcp(xcloud/*), which would also skip Antigravity's prompt for the Docker create. Antigravity also has a separate hosting product on xCloud, but this page is about it managing your Docker apps.
What xCloud does for docker apps
xCloud reads the repository, scans the Compose file for services and ports before anything is created, previews the site with a dry run and deploys it behind its own nginx once you approve. Docker sites can be backed up on demand and on a schedule, and a failed deploy is diagnosed and retried on the same site.
- Pick a Docker server. The agent uses the server you name, or lists your servers and asks. A Docker deploy needs a Docker server; any other stack answers with an incompatible_server refusal, and an agentic server never takes a second site. WordPress is not supported on Docker servers.
- Detect the repository. git_detect reads the repository root for a Dockerfile or one of the four Compose file names, and checks access and server compatibility. It creates nothing, and an access problem is never worked around by naming an app type by hand.
- Scan the Compose file. git_compose-scan runs before the dry run. It lists the services and the host ports the file publishes, resolves which Compose file name it found, and suggests a primary port. The agent never guesses the port.
- Dry run, then one approval. The agent sends the Docker create request with dry_run set to true and shows the resolved configuration: compose file, port, address and warnings. It asks once, naming the server and the URL, before sending the same body with confirm set to true and an idempotency key.
- Poll and verify. A 202 means queued, not running. The agent polls the site status until it is terminal, reads failed_steps and the SSL block, and fetches the URL before it calls the app live. A 502 here usually means the Compose file publishes no port.
- Back up and recover. The agent can take a Docker backup, read the backup list and settings, and add a note to a backup. If a deploy fails it reads the diagnosis, proposes a fix from the correctable fields and retries on the same site after your approval. Restoring a backup is a dashboard step.
Reference
Docker apps Settings and Limits on xCloud
The facts Antigravity works within when it runs Docker apps. Where a row names the dashboard, that step stays yours to take there.
| Setting or limit | What applies |
|---|---|
| Supported inputs | A Dockerfile for a single container, or a Compose file for one or more services, on a Docker server. Go, Python, Rust and Java apps all deploy this way |
| Server stack | Docker servers only. The Docker deploy on any other stack, including an agentic server, answers 422 with the code incompatible_server |
| Which Compose file runs | docker-compose.yml at the repository root. A file named compose.yaml, compose.yml or docker-compose.yaml, or one in a subdirectory, deploys through the pinned Docker create with docker.compose_file set to the path the scan resolved |
| Public port | xCloud's nginx owns ports 80 and 443 and proxies to one host port of 1024 or higher on 127.0.0.1. xCloud runs your Compose file as-is and never rewrites its ports mapping |
| Port refusals | A port another site already holds is refused as port_unavailable. A port the file does not publish is refused as port_not_published, with the published ports listed |
| No published port | A Compose file that publishes no port is accepted and then answers 502, so the scan is the step that catches it |
| Private registries | The deploy runs docker compose pull and never docker login, so an image from a private registry cannot be pulled. Build the image from source instead |
| Environment and redeploys | Send environment values through env_file_content. A redeploy runs git reset --hard and git clean -df in the site directory, so uncommitted server-side changes are lost |
| What a Docker backup holds | Named volumes, eligible bind mounts, the Compose file and the app's .env, in an encrypted snapshot. The app is stopped while the backup captures and restarted afterwards |
| Backup tools | Take a backup, list backups, read the count and the settings, change the settings, add a note and delete a backup. Remote copies go to a storage provider you add in the dashboard |
| Restores | A restore replaces the app's data in place, so it stays a dashboard step: Site, Site Backup, Previous Backups, Restore Backup |
| Dot-prefixed paths | A 403 on a path that starts with a dot is the dot-path allowlist. It is fixed with docker.allowed_dot_paths in the deploy settings, without a rebuild |
Rules Antigravity has to follow
- The Compose file is scanned before the dry run, and the port always comes from the scan, never from a guess.
- A file that binds ports 80 or 443, publishes no port or pulls from a private registry is not deployed as-is. The agent shows the rewrite, such as publishing 127.0.0.1:<high port>:<app port> and building the image from source, and the change goes into your repository.
- Creating a site, deploying, redeploying and deleting a backup stop for your approval. A backup runs without a separate prompt but stops the app while it captures, so ask for one at a quiet time.
- A failed Docker site is retried in place with corrections. It is never deleted and recreated, because it keeps its domain and port.
- Restoring a backup, adding a backup storage provider and changing a live site's domain are dashboard steps; the agent gives you the path and the dashboard link xCloud returned.
Example prompts
What Can You Ask Antigravity to Do for Docker apps?
Type these as written and swap in your own repository, site and server names. Reads and routine actions such as backups, cache purges, PageSpeed scans and vulnerability scans run straight away; creating, deploying, updating, rebooting, deleting, buying or starting a broken-link scan stops and asks first.
Scan the docker-compose.yml in this workspace with xCloud and tell me which service xCloud should proxy to.Deploy this workspace to my Frankfurt Docker server as a Compose app. Run the dry run, show me the warnings and wait for my go-ahead.Back up the Docker app on notes.example.com, then list its backups so I can see the new one complete.Scan the docker-compose.yml in github.com/acme/api and tell me which services and ports xCloud would use.Deploy github.com/acme/shop to the Frankfurt Docker server as a Compose app. Scan the compose file first, show me the services and ports, then wait for my approval before creating anything.Deploy the main branch of github.com/acme/api to my Docker server as a Compose app on a staging hostname.My Compose app on notes.example.com answers 502. Check which port its compose file publishes and which port xCloud is using.Take a backup of the Docker app on notes.example.com now, before I upgrade it, and tell me when it is done.Show the backup settings and the last backup of every Docker app on this team, and list the ones with no schedule.The last deploy of the API site failed. Diagnose it, show me the settings I can correct, fix the build command and retry on the same site.Antigravity and Docker apps: Frequently Asked Questions
What people ask before they let Antigravity run Docker apps through xCloud.
Why does Antigravity ask me before every xCloud call?
A tool you have not allowed runs in Ask mode, so the panel stops each time. You can allow single read tools, such as the Compose scan, with a permission pattern. xCloud then adds its own confirmation for the Docker create.
Do I need to open the Compose file for Antigravity to deploy it?
No, but it helps. The deploy reads your repository from Git, not your disk. With the project open, Antigravity can compare the scan with the file you are editing and fix a missing port before you commit and push.
Which servers can run a Docker app on xCloud?
Docker servers. Node.js, PHP and static builds use Nginx or OpenLiteSpeed servers, and the Docker deploy on any other stack is refused with an incompatible_server code. An OpenClaw, Hermes, Paperclip or DeepSeek Harness server hosts only the site created at provisioning, so it takes no Docker app.
Why does the agent scan the Compose file before deploying?
xCloud proxies to the host port your file publishes and never rewrites it. The scan lists the services and ports, so the agent picks a port that is free on the server and published by the file instead of guessing.
Why does my Compose app answer 502 after it deployed?
The most common cause is a Compose file that publishes no port: xCloud accepts it, then its nginx has nothing to proxy to. Publish the app on 127.0.0.1 with a high port, such as 127.0.0.1:8080:8080, and redeploy.
Can an agent deploy an image from a private registry?
Not as-is. The deploy runs docker compose pull and never docker login, so a private image cannot be pulled. Build the image from source in the Compose file, or deploy a repository that does.
Can an agent back up and restore a Docker app?
It can take a backup, read the backup list and settings, change the settings, add a note and delete a backup. Restoring replaces the app's data in place, so you do that in the dashboard under Site, Site Backup, Previous Backups.
Can I run WordPress as a Docker app on xCloud?
No. Creating a WordPress site on a Docker server is refused because WordPress is not supported on Docker servers. Use an Nginx or OpenLiteSpeed server for WordPress.
Other agents
Docker apps with Other Agents
The same job, the same xCloud tools, a guide for each client.
- Run Docker apps with Claude CodeAnthropic's terminal coding agent. One claude mcp add command, plus the xCloud skills plugin with nine skills on top.
- Run Docker apps with ClaudeAnthropic's chat assistant on the web and desktop. Add xCloud as a custom connector, no terminal needed.
- Run Docker apps with Claude CoworkAnthropic's desktop agent for delegated work. Add the xCloud connector, then hand off hosting jobs.
- Run Docker apps with CursorThe AI code editor. One mcp.json entry with the compact URL, because Cursor stops at 40 tools.
- Run Docker apps with CodexOpenAI's coding agent for the terminal. A codex mcp add command or a config.toml entry, then codex mcp login.
- Run Docker apps with OpenCodeThe open-source terminal coding agent. One remote MCP entry, then opencode mcp auth xcloud.
- Run Docker apps with Hermes AgentNous Research's agent with memory and a built-in scheduler. An mcp_servers entry in config.yaml and one login.
- Run Docker apps with OpenClawThe open-source agent runtime with chat apps and automations. ClawHub skill plus the MCP client.
- Run Docker apps with WindsurfThe Cognition editor, now Devin Desktop. devin mcp add for the Devin Local agent, a serverUrl entry for legacy Cascade.
- Run Docker apps with GitHub CopilotCopilot agent mode in VS Code. One .vscode/mcp.json entry, or the Agent Plugins package.
- Run Docker apps with Gemini CLIGoogle's terminal agent. One gemini mcp add command, OAuth found automatically.
- Run Docker apps with ChatGPTOpenAI's chat assistant. A developer-mode app with the xCloud MCP URL and OAuth.
- Run Docker apps with ChatGPT dotsOpenAI's always-on agent in ChatGPT. Uses the xCloud MCP plugin you add in ChatGPT, with custom rules and scheduled tasks.
- Run Docker apps with GrokxAI's terminal agent, Grok Build. One grok mcp add command or a config.toml entry.
- Run Docker apps with Grok BotxAI's always-on Bots on a cloud computer. One Remote HTTPS MCP plugin, OAuth sign-in, routines on a schedule.
- Run Docker apps with KiroAWS's agentic IDE. One url entry in .kiro/settings/mcp.json, plus the portable xCloud Agent Plugins package.
- Run Docker apps with ZedThe Zed editor's Agent Panel. One context_servers entry in settings.json and a browser sign-in.
More Antigravity guides
- Antigravity and xCloud overview
- Deploy from Git with Antigravity
- Install one-click apps with Antigravity
- Manage WordPress with Antigravity
- Back up and stage sites with Antigravity
- Manage SSL and domains with Antigravity
- Manage servers with Antigravity
- Troubleshoot a broken site with Antigravity
- Speed up a slow site with Antigravity
- Secure sites and servers with Antigravity
Run Your Hosting from Antigravity
xCloud MCP, the Agent Skills and the Public API are free with every account. Connect once and ask.