# Deploy this repo on Ownkube

These are the official setup instructions from Ownkube, served at
`https://ownkube.io/prompt.md`. If you are a coding agent, do the steps below
yourself. Stop only where a step needs the human: approving a browser sign in,
connecting GitHub, adding wallet credit, or confirming before you create
something that costs money.

Ownkube runs web apps, background workers, scheduled jobs, managed Postgres,
and Valkey caches on Ownkube Compute. There is no cloud account to set up and
no cluster to create: pick a region and deploy. Usage is billed per minute from
a prepaid wallet.

## 0. Check the fit

Read the repository before you set anything up. Ownkube is a fit when the repo
has something that runs as a service: a web server, an API, a worker, or a
script that should run on a schedule, optionally with a Postgres database or a
Redis-compatible cache. One container per service; a compose file whose other
services are Postgres or Redis maps to managed databases and caches here.

Say so and stop when:

| Not a fit | Why |
| --- | --- |
| GPU training or model inference | Ownkube does not offer GPUs |
| A library or CLI with no server | there is nothing to put behind a URL |
| MySQL or MongoDB as the primary datastore | managed databases are Postgres; caches are Valkey |
| Several containers that must share one machine at runtime | each service runs as its own container |

## 1. Connect the Ownkube MCP server

Endpoint: `https://app.ownkube.io/api/mcp` (Streamable HTTP). Sign in happens in the browser
with OAuth; there is no API key to paste. Add the server for the client you are
running in:

### Claude Code

Config: `terminal`

```bash
claude mcp add --transport http ownkube https://app.ownkube.io/api/mcp
```

Run /mcp inside Claude Code and choose "ownkube" to authenticate. A browser tab opens for you to sign in and pick an organization, then control returns to your terminal.

### Cursor

Config: `~/.cursor/mcp.json`

```json
{
  "mcpServers": {
    "ownkube": {
      "url": "https://app.ownkube.io/api/mcp"
    }
  }
}
```

Open Settings, MCP and toggle the ownkube server on. Cursor opens a browser tab to sign in and pick an organization, then shows the server as connected.

### GitHub Copilot

Config: `.vscode/mcp.json`

```json
{
  "servers": {
    "ownkube": {
      "type": "http",
      "url": "https://app.ownkube.io/api/mcp"
    }
  }
}
```

Start the ownkube server from the MCP view. VS Code opens a browser tab for you to sign in and choose an organization, then marks the server running. Switch Copilot Chat to Agent mode to use the tools.

### Windsurf

Config: `~/.codeium/windsurf/mcp_config.json`

```json
{
  "mcpServers": {
    "ownkube": {
      "serverUrl": "https://app.ownkube.io/api/mcp"
    }
  }
}
```

Refresh the server list in Cascade's MCP settings. Windsurf opens a browser tab to sign in and pick an organization, then shows ownkube as available.

### Codex

Config: `~/.codex/config.toml`

```toml
[mcp_servers.ownkube]
command = "npx"
args = ["-y", "mcp-remote", "https://app.ownkube.io/api/mcp"]
```

The first time Codex starts the ownkube server, mcp-remote opens a browser tab for you to sign in and choose an organization. After that it reuses the saved token.

### Zed

Config: `settings.json`

```json
{
  "context_servers": {
    "ownkube": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.ownkube.io/api/mcp"]
    }
  }
}
```

Save the settings and open the agent panel. mcp-remote opens a browser tab for you to sign in and pick an organization, then Zed lists the ownkube tools.

### Claude Desktop

Config: `claude_desktop_config.json`

```json
{
  "mcpServers": {
    "ownkube": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.ownkube.io/api/mcp"]
    }
  }
}
```

Restart Claude Desktop after saving. On first use mcp-remote opens a browser tab for you to sign in and pick an organization, then the ownkube tools appear in the chat.

The first connection opens a browser tab. Tell the human to sign in and pick
an organization, then wait. Confirm it worked by calling `get_user_info`.

If your client defers tool definitions, search for tools by name or task
keyword (for example "deployment logs" or "top up wallet").

## 2. Install the CLI and its skill

The okctl CLI covers what the MCP server deliberately does not: deploying the
local working tree (code not on GitHub, or uncommitted changes) and reading
live database credentials.

```bash
brew install ownkube/tap/okctl          # macOS and Linux
# or: go install github.com/ownkube/okctl@latest
npx skills add ownkube/ownkube-cli       # the okctl skill for your agent
okctl login                              # browser sign in
okctl status                             # confirm who is signed in
```

## 3. Check the wallet

Call `get_wallet`. Compute usage draws down a prepaid balance. If it is
empty, call `top_up_wallet` (top ups start at $5) and give the human the URL
it returns. You never handle card details. Wait until the balance shows before
deploying.

## 4. Deploy

1. Call `list_regions` and pick the region closest to the human's users
   (Mumbai or Germany today). Ask if it is not obvious.
2. Pick the source:
   - **The repo is on GitHub.** GitHub must be connected to the organization
     once, at https://app.ownkube.io/dashboard/settings?tab=version-control.
     Ask the human to do that if it is not done. Then call
     `create_deployment` with `resourceType` `web` (or `worker` /
     `job`), the `region`, no `clusterId`, and
     `github: { owner, repo, branch }`. Set `config.repository` and
     `config.tag` to `"pending"`; the first build fills in the real image.
     Ownkube builds from the Dockerfile,
     or detects the build automatically when there is none, and redeploys on
     every push to that branch.
   - **A prebuilt container image.** Call `create_deployment` with the
     image `repository` and `tag` in `config`.
   - **Code in this directory that is not on GitHub.** Run
     `okctl up --name <name> --region <region-id> --port <port>` from the
     repo root (add `--type worker` for a worker). It creates the app, links
     the directory to it, uploads the working tree (files ignored by
     .gitignore never leave the machine), builds, and follows the rollout
     until it is live.
   - **Local changes to an app that already exists.** Link the directory
     with `okctl link` if it is not linked yet, then run `okctl up`. It
     uploads the working tree, uncommitted changes included, and redeploys.
3. Set the port the app listens on (`config.port`, or `--port` for
   okctl) and make it public (`config.public: true`, the okctl default)
   for anything that should have a URL.
4. Confirm the plan with the human before you create anything.

## 5. Add a database or cache (only if the code needs one)

1. Call `list_boxes` and pick a size.
2. Call `create_deployment` with `resourceType` `database` (Postgres) or
   `cache` (Valkey), the same `region` and environment as the app, the
   box id as `skuId`, and `billingMode: "reserved"`.
3. Call `link_datastore` with the app and the datastore. It writes the
   connection string into the app as a secret variable (`DATABASE_URL` or
   `REDIS_URL`) and redeploys. Do not paste credentials into code.

## 6. Verify and hand over

1. Poll `get_deployment_status` until it is healthy. If the build fails,
   read `get_build_logs`; if it crashes after starting, read
   `get_deployment_logs`. Fix the cause in the repo and redeploy.
2. Give the human the live URL from `get_deployment` and the projected
   monthly cost from `get_projected_month_cost`.
3. If the human wants the app on their own domain (Personal and Team only),
   call `link_custom_domain` with the host. Give them the two DNS records it
   returns to set at their DNS provider, then call `verify_custom_domain`
   once they have.

## What stays with the human

Rotating a database password and point-in-time database recovery are not
available to agents by design. They live in the dashboard and in okctl.

## Links

- Dashboard: https://app.ownkube.io
- Docs: https://ownkube.io/docs
- Agent setup per client: https://ownkube.io/agents
- Pricing: https://ownkube.io/pricing.md

## Search

This site has a search endpoint: https://context7.com/api/v2/ask?siteKey=ask_c64dfe8ffaa8d3ad19576838&query=<URL-encoded question>. It returns documentation that answers the question, with a source link for each part. No API key is needed. If nothing matches, it says so.
