> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repocloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw

> AI-powered coding platform on a dedicated VPS using Claude models for code generation, testing, and iteration in persistent workspaces

## OpenClaw on RepoCloud

OpenClaw is an open-source AI coding platform that uses Anthropic's Claude models to generate, test, and iterate on software in persistent workspaces. On RepoCloud, OpenClaw runs on a dedicated VPS with full root access, SSH, a browser console, and all the management tools in the RepoCloud dashboard.

<CardGroup cols={2}>
  <Card title="Claude-Powered" icon="brain">
    Uses Anthropic's Claude models for code generation, testing, debugging, and natural-language-to-code translation
  </Card>

  <Card title="Multi-Provider" icon="plug">
    Supports Anthropic, OpenAI, OpenRouter, and custom endpoints — switch models without code changes
  </Card>

  <Card title="Gateway Architecture" icon="shield-halved">
    A secure gateway manages API credentials, token routing, and provider failover independently from your workspaces
  </Card>

  <Card title="Persistent Workspaces" icon="folder-open">
    Project files survive server reboots and sessions — pick up where you left off at any time
  </Card>

  <Card title="Full Root Access" icon="terminal">
    SSH into your server, install custom toolchains, and manage the entire environment at the OS level
  </Card>

  <Card title="Your Infrastructure" icon="lock">
    All code, prompts, and API keys stay on your own server — nothing leaves unless you push it
  </Card>
</CardGroup>

## Prerequisites

Before deploying OpenClaw on RepoCloud, you need an **Anthropic API key**:

<Steps>
  <Step title="Create an Anthropic Account">
    Go to [console.anthropic.com](https://console.anthropic.com) and sign up or log in.
  </Step>

  <Step title="Add a Payment Method">
    Navigate to **Billing** and add a credit card. New accounts need a payment method before API keys will work.
  </Step>

  <Step title="Generate an API Key">
    Go to **Settings > API Keys**, click **Create Key**, and give it a name (e.g., "openclaw"). Copy the key immediately — it starts with `sk-ant-` and is shown only once.
  </Step>
</Steps>

<Note>
  OpenClaw uses pay-per-use Anthropic billing. The API key you provide powers all Claude calls; token costs are billed to your Anthropic account, separate from your RepoCloud subscription.
</Note>

## Deploying OpenClaw on RepoCloud

<Steps>
  <Step title="Find OpenClaw in the Marketplace">
    Go to the RepoCloud marketplace and search for "OpenClaw". Click on the OpenClaw VPS listing.
  </Step>

  <Step title="Enter a Project Name">
    Choose a friendly name for your project (e.g., "my-openclaw").
  </Step>

  <Step title="Enter Your Admin Email">
    Provide the email address for the OpenClaw admin account.
  </Step>

  <Step title="Enter Your Anthropic API Key">
    Paste your `sk-ant-...` API key. This is stored securely on the VPS and used by the OpenClaw gateway to authenticate with Anthropic's API.
  </Step>

  <Step title="Choose Resource Settings">
    Select a tier for your server. Tiers below 2 GB RAM are greyed out because OpenClaw's installation requires at least 2 GB. Servers can be upgraded to a higher tier but not downsized.
  </Step>

  <Step title="Deploy">
    A dedicated IPv4 address is included with every VPS at no extra charge. Click **Deploy OpenClaw** and wait 5–10 minutes.
  </Step>

  <Step title="Check Your Email">
    Once deployment finishes, you receive an email with:

    * **Dashboard URL** — the HTTPS link to your OpenClaw interface
    * **App Credentials** — gateway token for API access
    * **SSH command** — `ssh root@<your-ip>`
    * **SSH Private Key** — save it to a file, `chmod 600`, and use it to connect
  </Step>
</Steps>

## First-Time Setup

<Steps>
  <Step title="Open the Dashboard">
    Open the dashboard URL from your deployment email. OpenClaw serves a web interface where you can interact with the AI assistant and manage workspaces.
  </Step>

  <Step title="Authenticate">
    Use the gateway token from your deployment email (also visible in the RepoCloud manage page under **Access > App Credentials**) to authenticate.
  </Step>

  <Step title="Verify Your API Connection">
    OpenClaw is pre-configured with the Anthropic API key you provided during deployment. You can verify the connection by starting a conversation — if the model responds, the key is working.
  </Step>
</Steps>

## Configuring AI Models

### Default Configuration

OpenClaw is deployed with Anthropic as the default provider. Your API key is stored in `~/.openclaw/.env` on the server:

```bash theme={null}
ANTHROPIC_API_KEY=sk-ant-your-key-here
```

The default model configuration lives in `~/.openclaw/openclaw.json`:

```json5 theme={null}
{
  "env": { "ANTHROPIC_API_KEY": "sk-ant-..." },
  "agents": {
    "defaults": {
      "model": { "primary": "anthropic/claude-sonnet-4-6" }
    }
  }
}
```

### Adding Additional Providers

You can add more AI providers by SSH-ing into the server and editing the configuration:

**OpenRouter** (access to 400+ models with one key):

```bash theme={null}
ssh root@<your-ip>
openclaw config set OPENROUTER_API_KEY sk-or-your-key-here
```

**OpenAI**:

```bash theme={null}
openclaw config set OPENAI_API_KEY sk-your-key-here
```

### Switching Models

Change the active model at any time:

```bash theme={null}
openclaw config set model anthropic/claude-opus-4-8
```

Or use the interactive model selector:

```bash theme={null}
openclaw model
```

This presents a menu of available providers and their supported models. The change takes effect immediately for new conversations.

## Using OpenClaw

### Code Generation

Start a conversation with a natural-language description of what you want to build. OpenClaw will:

1. **Scaffold the project** — create directory structure, config files, and boilerplate
2. **Write implementation code** — generate functions, classes, and modules based on your description
3. **Create tests** — write unit tests and integration tests alongside the implementation
4. **Iterate on feedback** — refine the code based on your review, error messages, or new requirements

The web interface shows diffs, terminal output, and the file tree in real time as the AI works.

### Working with Existing Code

You can also point OpenClaw at existing projects:

1. Clone your repository onto the VPS via SSH
2. Open the project in OpenClaw
3. Ask the AI to refactor, add features, fix bugs, or write tests for existing code

### Terminal and File Access

OpenClaw has direct access to the server's file system and terminal. It can:

* Run build commands (`npm install`, `pip install`, `cargo build`)
* Execute tests and report results
* Read and modify files across the entire project
* Install system packages via `apt`

## Security Considerations

<Warning>
  Your Anthropic API key is stored on the VPS in `~/.openclaw/.env`. Anyone with SSH access to the server can read it. Manage SSH keys carefully and remove keys for users who should no longer have access.
</Warning>

OpenClaw's security model:

* **API keys stay on your server** — they are never sent to RepoCloud or any third party
* **Code stays on your server** — generated files live in the VPS file system; nothing is uploaded unless you push to a remote Git repository
* **Network isolation** — the gateway process communicates only with the configured AI provider APIs (e.g., `api.anthropic.com`)
* **File permissions** — `~/.openclaw/.env` should be `chmod 600` (this is the default)

To rotate your API key:

```bash theme={null}
ssh root@<your-ip>
openclaw config set ANTHROPIC_API_KEY sk-ant-new-key-here
openclaw gateway restart
```

## RepoCloud Manage Page

Your OpenClaw VPS has a dedicated manage page in the RepoCloud dashboard with these sections:

<AccordionGroup>
  <Accordion title="Access">
    View your server's default domain (HTTPS link to OpenClaw), dedicated IPv4 address, SSH connection command, and app credentials (gateway token).
  </Accordion>

  <Accordion title="Power">
    **Power Off**, **Power On**, and **Reboot** controls.
  </Accordion>

  <Accordion title="Console">
    Browser-based serial console for emergency access.
  </Accordion>

  <Accordion title="SSH Keys">
    Manage SSH public keys for root access.
  </Accordion>

  <Accordion title="Resize">
    Switch between tiers. Disk cannot be shrunk after an upgrade.
  </Accordion>

  <Accordion title="Snapshots">
    Create up to 5 point-in-time snapshots before making changes. To restore, click **Restore** next to the target snapshot. If newer snapshots exist, a warning lists which ones will be permanently destroyed. The server restarts during restore (\~10–25 seconds) and the page refreshes automatically when complete.
  </Accordion>

  <Accordion title="Custom Domain">
    Point your own domain to the VPS by creating an A record to your IPv4.
  </Accordion>

  <Accordion title="Danger Zone">
    Permanently delete the server and all data.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="'No credentials found' error">
    The Anthropic API key is not configured or the gateway cannot read it. SSH into the server and check: `cat ~/.openclaw/.env | grep ANTHROPIC`. If the key is missing, re-add it with `openclaw config set ANTHROPIC_API_KEY sk-ant-...` and restart the gateway.
  </Accordion>

  <Accordion title="Model responses are slow or timing out">
    Large prompts or complex code generation tasks can take 30–60 seconds. If responses consistently time out, check your Anthropic account for rate limits or billing issues. You can also try a faster model (e.g., `anthropic/claude-sonnet-4-6` instead of `anthropic/claude-opus-4-8`).
  </Accordion>

  <Accordion title="Installation fails with out-of-memory">
    OpenClaw requires at least 2 GB RAM. The installation process pulls Docker images and compiles dependencies; on 1 GB servers, this causes OOM kills. Resize to 2 GB or larger from the RepoCloud manage page.
  </Accordion>

  <Accordion title="Cannot access the dashboard">
    Wait 10–15 minutes after deployment for the installation to complete. If it remains unreachable, use the browser console from the RepoCloud manage page to check service status. Verify that the gateway process is running.
  </Accordion>

  <Accordion title="API key charges seem high">
    OpenClaw sends your code context to Claude on each interaction. Large codebases increase token usage. Use the Anthropic console to monitor usage and set spend limits. Consider using a smaller model for routine tasks and reserving larger models for complex problems.
  </Accordion>
</AccordionGroup>

## Use Cases

OpenClaw is ideal for:

* **Solo developers** who want an AI pair programmer on their own infrastructure with no data leaving their server
* **Teams** that need a shared AI coding environment with persistent workspaces and centralized API key management
* **Security-conscious organizations** that require all code and prompts to stay on controlled infrastructure
* **Developers exploring AI coding** who want a self-hosted alternative to cloud-based AI editors

## Next Steps

<CardGroup>
  <Card title="Deploy OpenClaw" icon="rocket" href="https://repocloud.io/details/OpenClaw%20VPS">
    Launch your OpenClaw VPS from the RepoCloud marketplace
  </Card>

  <Card title="OpenClaw Documentation" icon="book" href="https://docs.openclaw.ai">
    Read the official OpenClaw documentation
  </Card>

  <Card title="Hermes Agent" icon="robot" href="/platforms/hermes-agent">
    Explore Hermes Agent for autonomous multi-model AI workflows
  </Card>

  <Card title="VPS Apps Overview" icon="server" href="/platforms/introduction">
    Learn about all VPS Apps and the RepoCloud manage page
  </Card>
</CardGroup>
