# h0st.cloud

Push code. Get a cloud. An agent keeps it running.

Every project gets its own container, git remote and URL with TLS. An AI agent sets it up, ships each push without downtime, and when something breaks, finds the cause and proposes the fix. No Dockerfile, no YAML.

## For agents

You're reading the Markdown version of https://h0st.cloud/. Next steps for an agent helping someone deploy:

- Read the agent guide: https://h0st.cloud/llms.txt. It covers connecting, the deploy model, the manifest and every MCP tool.
- Connect over MCP: https://h0st.cloud/mcp (Streamable HTTP, Bearer token). Discovery card: https://h0st.cloud/.well-known/mcp.json
- Get a token: the person sends `/token` to https://t.me/my_cloudhost_bot on Telegram.

```sh
claude mcp add -t http -s user cloudhost https://h0st.cloud/mcp -H "Authorization: Bearer ch_…"
```

## From git push to a live URL.

There is no setup step. Push the repo and the onboarding agent works out the rest: stack, build, services and healthchecks.

1. **Push your code.** A Node app (Express, Next, Vite, SvelteKit, Astro) or a static site. Push to `main` for production, or to any other branch for a preview.
2. **An agent sets it up.** It reads the project, writes `cloudhost.json`, runs the build and waits for the healthcheck. You get a message when it's done.
3. **It's live.** At `<name>.h0st.cloud` with TLS, or on your own domain. The supervisor keeps every service up.

A manifest the onboarding agent writes:

```json
{
  "build": "pnpm install && pnpm build",
  "services": [{ "name": "web", "start": "node dist/server.js", "port": 3000, "healthcheck": "/health" }],
  "artifacts": ["uploads"]
}
```

## From a 3 AM crash to a fix you approve over coffee.

Every cloud watches itself. When something breaks, an agent finds the cause and proposes a fix. Nothing ships until you say so.

1. **Running.** Every service is supervised: healthchecks, restarts and log rotation for each process, from PID 1 inside the container.
2. **Something breaks.** A crash loop, a failed build, a task that errors or a burst of 5xx. Each becomes one incident with the logs attached, not a page per restart.
3. **An agent works out why.** A read-only triage agent goes through the logs and the code, then writes up the cause and one or more fixes.
4. **You decide.** You get the error, a summary and the proposed fixes in Telegram, with buttons: implement it, pick another option, or dismiss.
5. **The fix lands on a preview.** A fix agent works on its own branch and builds a preview URL, so you can check it before it goes anywhere.
6. **One tap to production.** Promote it and the fix ships blue/green, like any other deploy.

## Deploys that never drop a request.

Every push to main builds next to the live version. Traffic moves only once the new one answers its healthcheck.

- **Built beside the live version.** The new build runs in the idle slot on a spare port. If it fails to build or never gets healthy, the old version keeps serving.
- **The last version stays warm.** The previous build stays in the other slot, so rolling back is a swap, not a rebuild.
- **Single-instance apps too.** Apps that must only run once, like an in-memory hub or a job loop, hand over through a lock while the proxy holds requests.
- **A URL for every branch.** Push any other branch to get `<name>-<branch>.h0st.cloud`. Promote it from Telegram when it looks right.

## Everything a small app needs, in one container.

Services, schedules, previews, bots and data, all run by the same supervisor.

- **Cron and tasks.** Schedules for scripts, commands and agent turns, plus one-off tasks whenever you need them.
- **Preview branches.** Each branch gets its own build and URL. Promoting one merges it into main and deploys it.
- **Your own Telegram bots.** Send `/asbot` to create a bot that routes into a cloud. Its token stays on the host, never in your container.
- **Isolated by default.** Each cloud runs on its own network bridge. Clouds can't reach each other, only the internet and the host.
- **Data that outlives deploys.** `data/` and declared artifacts live outside the code slots, so deploys never touch them. SQLite files are snapshotted before each promote.
- **Feedback that turns into fixes.** Every page gets a feedback button. Each submission is triaged like an incident: a summary, a proposed change and an Implement button.

## Your coding agent can deploy too.

h0st.cloud speaks MCP. Point Claude Code or any MCP client at `h0st.cloud/mcp` and it can create clouds, push code, set env vars, read logs and query the database with your token. Send `/token` to the bot to get one. The full tool list is in https://h0st.cloud/llms.txt.

```sh
claude mcp add -t http -s user cloudhost https://h0st.cloud/mcp -H "Authorization: Bearer ch_…"
```

A typical session: `cloudhost_deploy` returns a push URL, `git push cloudhost HEAD:main` sends the code, `cloudhost_list_tasks` shows onboarding running, `cloudhost_list_services` shows `web` healthy, and the app is live at `https://<name>.h0st.cloud`.

## Questions.

### What can I run?

Node apps, from Express to Next, Nuxt, SvelteKit and Astro, plus workers, bots, cron jobs and static sites. If your app needs system packages, list them under `system.apt` in the manifest and the cloud gets an image with them installed.

### Do I need a Dockerfile or a config file?

No. On the first push the onboarding agent writes `cloudhost.json` for you. If your repo already has one, it's used as is.

### How do I sign up?

Open https://t.me/my_cloudhost_bot on Telegram. Your Telegram account is your account: send `/create <name>` for a cloud, or `/token` for an API token to use with MCP.

### Can I use my own domain?

Yes. Bind it to a cloud and add a CNAME to `<name>.h0st.cloud`. The TLS certificate is issued automatically on the first request.

### What happens to my data when I deploy?

Nothing. `data/` and any artifacts you declare live outside the code slots, so a deploy or a rollback never touches them. SQLite databases in `data/` are also snapshotted before every promote.

### Can I see what the agent did?

Every agent turn is logged: each tool call, its result and the final answer. Ask the bot, or read it over MCP.

## Push your first cloud.

Open the bot, create a cloud, and push. The agent takes it from there: https://t.me/my_cloudhost_bot

```sh
git push cloudhost main
```
