# Command reference

> Every okctl command group: deploy, logs, ssh, connect, alerts, environments, projects, marketplace, billing, usage, domains, clusters and aws.

Every command here accepts `-o json` or `-o yaml` for structured output and `--help` for its full flag list. Ids come from the matching `list` command, or from the id in a deployment's dashboard URL. Install and sign-in steps are on the [CLI page](/docs/cli).

## Session and setup

| Command | What it does |
|---|---|
| `okctl login` | Sign in through the browser and pick an organization |
| `okctl logout` | Forget the stored session |
| `okctl status` | Show who you are signed in as |
| `okctl link` / `okctl unlink` | Bind or unbind the current directory to a deployment. Flags: `--organization`, `--cluster`, `--environment`, `--service` |
| `okctl config view\|get\|set` | Read or change `apiUrl` and `outputFormat` |
| `okctl organizations list` | Organizations you belong to |
| `okctl regions list` | Regions you can deploy to, with their ids |
| `okctl boxes list [--kind web\|database\|cache]` | Box sizes and prices, with the ids a manifest takes |
| `okctl completion <shell>` | Shell completion script |
| `okctl version` | Print the version |

## up

`okctl up` builds and deploys the current directory, creating the app on first run. See [Deploy with okctl up](/docs/cli#deploy-with-okctl-up) for the defaults. Flags: `--service`, `--path`, `--note`, `--no-follow`, and for a new app `--name`, `--region`, `--port`, `--type`, `--public`, `--project`, `--environment`.

## deploy

The `deploy` group manages deployments of every kind: web apps, workers, jobs, databases and caches.

### Create and list

| Command | What it does |
|---|---|
| `okctl deploy create -f app.json --project <id>` | Create from a manifest (JSON or YAML, `-f -` reads stdin). The manifest is the full create body with a top-level `resourceType`. For a web app, `--name`, `--image`, `--tag`, `--port`, `--public`, `--registry` work instead of a file |
| `okctl deploy list [--environment <id>] [--cluster <id>]` | Deployments in the organization |
| `okctl deploy get <id>` | Full configuration and status |
| `okctl deploy status <id>` | Health, replicas and the current revision |
| `okctl deploy update <id> -f app.json [--note]` | Apply a changed manifest as a new revision |
| `okctl deploy rename <id> <display-name>` | Change the display name |
| `okctl deploy delete <id>` | Delete the deployment and its history |

Manifest shapes are on [Configuration](/docs/deployments/configuration), with worked examples on the [Postgres](/docs/data/postgres#create-a-database) and [Valkey](/docs/data/valkey#create-a-cache) pages.

### Rollouts and history

| Command | What it does |
|---|---|
| `okctl deploy revisions <id>` | Revision history |
| `okctl deploy rollback <id> <revision-id>` | Roll back to an earlier revision. See [Rollbacks](/docs/deployments/rollbacks) |
| `okctl deploy restart <id>` | Restart every replica |
| `okctl deploy rebuild <id>` | Rebuild the current source and roll it out |
| `okctl deploy resync <id>` | Re-apply the current settings to recover a stalled rollout |
| `okctl deploy auto-deploy <id> --enabled=false` | Pause or resume deploys on push |
| `okctl deploy maintenance <id> --enabled [--message]` | Show or hide the maintenance page |
| `okctl deploy promote <id> --to <deployment-id>` | Copy this deployment's configuration onto another, typically staging to production. See [Environments](/docs/deployments/environments#promote-between-environments) |
| `okctl deploy copy <id> --to-environment <id> [--to-cluster <id>]` | Clone the deployment into another environment |
| `okctl deploy move <id> --project <id>` | Re-file the deployment under a different project |

### Builds

| Command | What it does |
|---|---|
| `okctl deploy build-logs <id> <revision-id>` | Build output for a revision |
| `okctl deploy build-args <id> --arg KEY=VALUE` | Set Docker build arguments (pass none to clear) |
| `okctl deploy build-context <id> <context-path>` | Change the build context directory |
| `okctl deploy builder-size <id> small\|standard\|large` | Pick the builder. Large needs Team. See [Builds](/docs/deployments/builds) |

### Logs and telemetry

| Command | What it does |
|---|---|
| `okctl deploy logs <id> [--range <seconds>] [--limit <n>] [--filter <text>] [--tail <n>]` | Recent log lines. See [Logs](/docs/observability/logs) |
| `okctl deploy telemetry <id> [--range-seconds] [--step]` | CPU, memory, replicas and restarts over a window |
| `okctl deploy observability <id>` | The Overview numbers: status, replicas, request rate |

### Hostnames

| Command | What it does |
|---|---|
| `okctl deploy subdomain check <id> <subdomain>` | Is this `*.ownkube.app` label free? |
| `okctl deploy subdomain suggest <id> [--desired <label>] [--limit <n>]` | Suggest free labels |
| `okctl deploy subdomain set <id> <subdomain>` | Change the public hostname. See [Public hostnames](/docs/networking/public-hostnames) |

### Jobs

| Command | What it does |
|---|---|
| `okctl deploy trigger <id>` | Run a job now |
| `okctl deploy job-runs list <id>` | Recent runs with their status |
| `okctl deploy cancel <id> <job-name>` | Stop a running job |

See [Jobs](/docs/deployments/jobs).

### Datastores

| Command | What it does |
|---|---|
| `okctl deploy link <app-id> <datastore-id> [--env-var NAME]` | Inject a database or cache connection into an app, as `DATABASE_URL` or `REDIS_URL` by default |
| `okctl deploy connection-info <db-id>` | Postgres host, port, user, password and connection string |
| `okctl deploy cache-connection <cache-id>` | Valkey host, port and password |
| `okctl deploy reset-password <db-id>` | Rotate the database password |
| `okctl deploy restore <db-id> [--target-time <RFC3339>]` | Point-in-time recovery to the latest point or a timestamp |

See [Postgres](/docs/data/postgres) and [Valkey](/docs/data/valkey).

## ssh and connect

| Command | What it does |
|---|---|
| `okctl ssh [<id>] [-- command...]` | Open a shell on a running app, or run one command in it |
| `okctl ssh config [<id>...]` | Add your apps to `~/.ssh/config` so `ssh`, `scp` and `sftp` work |
| `okctl ssh keys list\|add [key-file]\|remove <key-id>\|github [username]` | Manage the SSH public keys on your account |
| `okctl connect [<id>] [--tunnel-only] [--port <n>] [--ssh]` | Open `psql` or `valkey-cli` against a datastore, or hold a local tunnel open. `--ssh` forces a private tunnel even when public access is on |

See [Shell and SSH](/docs/deployments/shell).

## environments

| Command | What it does |
|---|---|
| `okctl environments list` | Environments in the organization |
| `okctl environments create --name <name> [--description] [--color]` | Create one |
| `okctl environments get\|update\|delete <id>` | Inspect, rename or remove |
| `okctl environments set-env <id> --env KEY=VALUE --secret KEY=VALUE` | Replace the environment's shared variables; `-f vars.json` takes an array of `{name, value, secret}` |

See [Variables](/docs/deployments/variables#shared-variables-on-an-environment).

## projects

| Command | What it does |
|---|---|
| `okctl projects list` | Projects in the organization |
| `okctl projects create --name <name> --slug <slug> [--description] [--color]` | Create one |
| `okctl projects get\|update\|delete <id>` | Inspect, change or remove |

See [Projects](/docs/organizations/projects).

## alerts

| Command | What it does |
|---|---|
| `okctl alerts list <deployment-id>` | Rules on a deployment |
| `okctl alerts create <deployment-id> --name --metric cpu\|memory\|restarts --threshold --comparator gt\|lt --severity warning\|critical [--for <seconds>] [--window <seconds>]` | Add a rule |
| `okctl alerts update <rule-id> [...same flags] [--enabled]` | Change or pause a rule |
| `okctl alerts delete <rule-id>` | Remove it |
| `okctl alerts firings [--deployment <id>] [--limit <n>]` | Recent firings |

See [Alerts](/docs/observability/alerts).

## marketplace

| Command | What it does |
|---|---|
| `okctl marketplace list` | The catalog |
| `okctl marketplace get <slug>` | What an app installs and the inputs it takes |
| `okctl marketplace check <slug>` | Dry run: what would be created and what it costs |
| `okctl marketplace deploy <slug> [--region <id>] [--project <id>] [--environment <id>] [--name <prefix>] [--input KEY=VALUE] [--db-box <id>] [--cache-box <id>]` | Install the app with its database and cache; `--cluster` targets your own cluster instead of a region |
| `okctl marketplace delete <install-id>` | Remove an install as one unit |

See [Marketplace](/docs/deployments/marketplace).

## registries

`okctl registries list` and `okctl registries get <id>` show the container registries connected to the organization. Connect one from the dashboard; see [Use an existing image](/docs/deployments/builds#use-an-existing-image).

## billing and usage

| Command | What it does |
|---|---|
| `okctl billing wallet` | Prepaid wallet balance |
| `okctl billing credit` | Promo and plan credit status |
| `okctl billing top-up <amount-usd>` | Open a top-up checkout |
| `okctl billing subscribe personal\|team` | Start a plan |
| `okctl billing portal` | Payment methods and invoices |
| `okctl billing redeem <code>` | Apply a promo code |
| `okctl billing spend-controls get\|set [--budget] [--budget-action notify\|pause] [--alerts] [--alert-thresholds 50,80,100]` | Spend limits |
| `okctl usage current\|month-to-date\|projected\|history` | Live burn, month to date, projection and daily history |

Add `--no-browser` to a checkout command to print the URL instead. See [Usage](/docs/billing/usage) and [Cost control](/docs/billing/cost-control).

## Own cloud

These groups apply only when you run in your own AWS account.

| Command | What it does |
|---|---|
| `okctl aws connect [--deploy] [--no-wait] [--timeout]` | Connect an AWS account; `--deploy` creates the stack with the AWS CLI credentials in your shell. See [Connect AWS](/docs/own-cloud/connect-aws) |
| `okctl aws list\|get\|verify\|resync\|reconnect\|delete <account-id>` | Manage connected accounts |
| `okctl clusters create --name --account <id> --region --type starter\|production --kubernetes-version [--vcpu] [--memory] [--autoscaling] [--node-type]` | Create a cluster. See [Create a cluster](/docs/own-cloud/create-cluster) |
| `okctl clusters list\|get\|status\|cancel\|delete <id>` | Inspect, follow, cancel or destroy |
| `okctl domains list <deployment-id>` | Linked custom domains and the parent domains available on the cluster |
| `okctl domains add <deployment-id> <hostname>` | Link a hostname and print the DNS record to set |
| `okctl domains verify <domain-id>` | Re-check DNS and the certificate |
| `okctl domains delete <domain-id>` | Unlink it. See [Custom domains](/docs/own-cloud/custom-domains) |

- [CLI](/docs/cli)
- [MCP server](/docs/mcp)
- [Configuration](/docs/deployments/configuration)

---

**Don't see a feature you need?** Email [support@ownkube.io](mailto:support@ownkube.io?subject=Feature%20request). Ownkube is shaped by the teams using it and we ship what our users ask for.

## 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.
