---
title: "Quickstart"
description: "Install oc-workers from an empty directory to a working Control UI with ochost init."
---

> Documentation Index
> Fetch the complete documentation index at: https://oc-workers.mdick85.workers.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

The first install takes 4 to 5 minutes, most of it the image push.

## Before you start

Check [Requirements](https://oc-workers.mdick85.workers.dev/docs/requirements/). You need:

- Node 22.18 or later.
- Docker, running.
- A Cloudflare account on Workers Paid.
- A terminal.

## Install

1. **Get the CLI**

   ```sh
   npm install -g oc-workers
   ```

   This puts `ochost` on your PATH. If root owns your global npm folder, it can need `sudo`. Check with `ochost --version`.
2. **Log in to Cloudflare**

   ```sh
   npx wrangler login
   ```

   Select Allow in the browser that opens. On a machine with no browser, wrangler prints a URL: open it on another machine, then select Allow.
3. **Run init**

   ```sh
   mkdir ~/my-oc && cd ~/my-oc
   ochost init
   ```

   `init` asks for no AI token, because the model runs on your account through the Worker's Workers AI binding.

   Once the install is up, `init` asks two questions. Press Enter to skip either one:

   - Telegram: paste the bot token from @BotFather (see [Add Telegram](#add-telegram)).
   - Cloudflare Access: a hostname on your zone, such as `oc.example.com`.

   Alerts to your phone are optional; `ochost alerts setup` adds them later.

   For a script or a rerun, the same answers work as flags: `ochost init --telegram-owner <id> --telegram-token-file <file> --sandbox on --alerts ntfy --access-domain oc.example.com`.
4. **Open the Control UI**

   At the end, `init` prints a summary:

   ```text
   UI     https://oc-host.<your-subdomain>.workers.dev
   Login  https://oc-host.<your-subdomain>.workers.dev/_ochost/login/…  (single use, 5 min; ochost open makes another)
   Bot    none yet
   Model  @cf/deepseek-ai/deepseek-v4.1-flash-1017 via gateway default
   Mode   sleeps after 5 min idle, wakes on a message
   Cost   about $7-14/month at light use (up to $25 if snapshot storage is priced high); always-on would be $50-69
   ```

   Open the Login link. It sets the owner cookie, which tells the install that this browser is yours, and shows the owner console. Select **Open Control UI** to reach the OpenClaw Control UI.

   The link works once and expires after 5 minutes. If it has expired, run `ochost open` for a new one.

## The owner console

The owner console is the page at your install URL. A state card at the top shows the state, the last activity, the next wake, the projected cost for the month and the check count, with one state button: **Wake now**, **Sleep now**, **Start** or **Retry now**. Below it, three tabs hold Overview (cost, alerts, budgets, checks and backups), Alerts and log, and Setup (things to connect). See [How it works](https://oc-workers.mdick85.workers.dev/docs/how-it-works/#the-owner-console).

## Prompts from init

Most runs show one prompt or none.

| Prompt | When | Do this |
|---|---|---|
| `Cloudflare account [1-N]` | Your login has several accounts. | Type a number, or pass `--account-id`. |
| `Press Enter when R2 is on` | R2 is off. | Enable R2 at the dashboard link, then press Enter. |
| workers.dev subdomain name | The account has no workers.dev subdomain. | Type a name. |

With `--non-interactive`, or with no terminal, `init` asks nothing. When it needs an answer, it stops with a fix line.

## The model

The container holds no Cloudflare credential: the Worker calls Workers AI through a binding (see [Models](https://oc-workers.mdick85.workers.dev/docs/models/)), and it sends model calls through the AI Gateway `default`. Cloudflare makes `default` on the first request, so `init` makes no API call for it. After the deploy, `init` sends one test message to the model.

- To use a gateway you made, run `ochost init --gateway <id>`. The gateway must exist.
- To use no gateway, run `ochost init --gateway none`. Model calls still work, but with no logs and no spend limit.

## What init does

`init` prints one line for each of its 14 steps: preflight, account, subdomain, files, AI model, secrets, R2 bucket, deploy, health, model hop, config, start, self-test and login. The deploy step takes longest.

## If init stops

Rerun `ochost init` in the same directory. A rerun is safe: it skips what is already current.

If a stop leaves the deploy part-way done, you see a `Failed:` line with a fix and no summary, and a rerun finishes the deploy. If the image push keeps failing, run `ochost deploy`; the CLI keeps the layers it already pushed. See [Troubleshooting](https://oc-workers.mdick85.workers.dev/docs/troubleshooting/).

A rerun can wake a sleeping install, and it redeploys when the deploy hash changed.

## Add Telegram

1. In Telegram, open a chat with @BotFather, Telegram's own bot for making bots.
2. Send `/newbot` and follow the steps. BotFather gives you a bot token.
3. Run `ochost channels add telegram` and paste the token. The input is hidden. (`init` offers this step; if you took it, skip to 4.)
4. In Telegram, open your bot and send it a text message.
5. The bot replies with a pairing code. Run `ochost pairing approve telegram <code>`.

A webhook channel lets the install sleep. A socket channel keeps it awake and costs about five times more. See [Channels](https://oc-workers.mdick85.workers.dev/docs/channels/).

## Next

- Run `ochost status` to see the sleep state, the next wake and the cost.
- Run `ochost doctor` to run health checks. Each check comes with a fix.
- Run `ochost alerts setup` to choose where alerts go. Alerts are off by default.
- Read [Channels](https://oc-workers.mdick85.workers.dev/docs/channels/) next.

Source: https://oc-workers.mdick85.workers.dev/docs/quickstart/index.mdx
