Skip to the page content

VPS App GuidesOpenClaw

VPS App Guides

OpenClaw

A personal AI assistant on your own VPS, installed by the DevOps AI Agent, with a web interface and chat-app channels, using the AI provider you choose

OpenClaw on RepoCloud

OpenClaw is an open-source personal AI assistant: one Gateway on your own server that answers in a web interface and in chat apps and can use the AI provider you choose. On RepoCloud you install it on your own VPS with AI Deploy: a plain Ubuntu 24.04 server is created and the DevOps AI Agent installs OpenClaw on it while you follow the chat. The server has root access, SSH, a browser-based serial console, and the manage page.

  • Your Choice of Provider

    Works with the AI provider you choose, with an API key that you give the agent when it asks for one

  • Multi-Provider

    Supports Anthropic, OpenAI, OpenRouter, and custom endpoints — switch models with /model in the chat or openclaw models set

  • One Gateway

    One Gateway holds the assistant’s settings, sessions, and channels and can fall back to other models

  • Files on Your Server

    The assistant’s files and settings are on your server’s disk, and Reboot on the manage page restarts the server without data loss

  • Full Root Access

    SSH into your server, install custom toolchains, and manage the entire environment at the OS level

  • Your Infrastructure

    The Gateway, its settings, and its files live on your own server; the messages you send go to the AI provider you chose

Before You Start

OpenClaw needs a model to talk to, so have an API key from the AI provider you want to use ready when the agent asks for it. For example, to use Anthropic’s Claude models:

  1. Create an Anthropic Account

    Go to console.anthropic.com (opens in a new tab) and sign up or log in.

  2. Generate an API Key

    Create an API key in the console. It starts with sk-ant-.

An AI provider’s API key is billed by use. The costs of the model calls are billed to your account with the provider, separate from your RepoCloud balance, which pays for the server by the hour. Anthropic’s documentation (opens in a new tab) explains how its API billing works.

Installing OpenClaw with AI Deploy

RepoCloud has no ready-made OpenClaw template. OpenClaw is installed on a blank Ubuntu server by the DevOps AI Agent, from OpenClaw’s public repository. You need a RepoCloud account with a balance above $3.

  1. Open AI Deploy

  2. Paste the Repository

    Enter OpenClaw’s repository, https://github.com/openclaw/openclaw, and a project name for your own reference.

  3. Choose a Tier

    Select a server tier; AI Deploy starts at Tier 2. A server can later move to a tier whose disk is the same size or larger, and a resize can be refused.

  4. Add Instructions (Optional)

    Custom instructions tell the agent what you expect. Example: “Install OpenClaw and ask me for my Anthropic API key when you need it. When you are done, tell me how to open the web interface.”

  5. Deploy and Follow the Chat

    Click Deploy. A dedicated IPv4 address is included with every VPS at no extra charge. The chat opens once the server is ready, and AI-assisted deployment typically takes 5–15 minutes. The agent is instructed to ask you for any key it needs, and to report the address of the web interface and any logins it created.

The agent is an AI and can make mistakes: read what it reports, steer it in the chat when something is off, and take a snapshot before a risky change. A key you paste into the chat reaches the AI model that runs the agent, like everything else you write there: Safety and Control explains who sees what.

First-Time Setup

  1. Open the Web Interface

    Open the address the agent reported. The page is OpenClaw’s Control interface: a chat with the assistant, its sessions, channels, automations, and settings. OpenClaw’s own way to get a link is openclaw dashboard, run on the server: it prints the Control UI address (--no-open prints it without launching a browser), and the link is a short-lived, one-time owner pairing link.

  2. Sign In

    Use the sign-in the agent reported. OpenClaw’s onboarding generates a Gateway secret and stores it as gateway.auth.token, which is the token the web interface can ask for.

  3. Check the Connection

    Send the assistant a message. To check from the server, run openclaw models status over SSH: it shows the model routes and the authentication state.

A web interface that is opened on a domain needs that browser origin to be allowed. If it refuses the address, add the address to OpenClaw’s allowed browser origins (gateway.controlUi.allowedOrigins; see OpenClaw’s gateway configuration (opens in a new tab)).

Configuring AI Models

Where the Provider and Its Key Live

The model in use is shown in the chat and by openclaw models status. Your provider key is on the server: the places OpenClaw’s own documentation names for provider keys are ~/.openclaw/.env and env.vars in ~/.openclaw/openclaw.json. To see which file holds a key without printing it, run (with the name of your provider’s variable, here Anthropic’s):

bash
grep -l ANTHROPIC_API_KEY ~/.openclaw/.env ~/.openclaw/openclaw.json

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

json5
{
  "env": { "vars": { "ANTHROPIC_API_KEY": "sk-ant-..." } },
  "agents": {
    "defaults": {
      "model": { "primary": "<provider/model>" }
    }
  }
}

Adding Additional Providers

SSH in, add the provider’s key to ~/.openclaw/.env, run openclaw gateway restart, then choose the model with openclaw models set <provider/model> or /model in the chat.

OpenRouter (many models behind one API and one key). Connect over SSH:

bash
ssh root@<your-ip>

Add this line to ~/.openclaw/.env:

bash
OPENROUTER_API_KEY=sk-or-...

Then restart the Gateway and choose a model:

bash
openclaw gateway restart
openclaw models set openrouter/<provider>/<model>

OpenAI: add OPENAI_API_KEY=sk-... to ~/.openclaw/.env, then:

bash
openclaw gateway restart
openclaw models set openai/<model>

Switching Models

Change the active model at any time:

bash
openclaw models set anthropic/claude-sonnet-4-6

Or switch in the chat: /model shows the current model, /model list browses the providers, and /model <provider/model> switches it. For an interactive setup over SSH, run openclaw configure. A change applies to the next run.

Using OpenClaw

Chat and Channels

Talk to the assistant in the web interface. Its Channels settings list chat apps such as Telegram, Discord, Slack, WhatsApp, Signal, and iMessage.

Terminal and File Access

With the default coding tool profile the assistant can read, write, and edit files and run commands on the server.

Security Considerations

Anyone who can log in as root on the server can read your provider API key. Manage login keys carefully: to revoke one, delete its line from ~/.ssh/authorized_keys on the server. That stops new logins with that key and leaves sessions that are already open running. A key you gave the agent in the chat may also be written in a configuration file on the server, and it stays in the saved conversation.

Things to know:

  • Where your key goes — you give it to the agent in the chat, or put it on the server yourself over SSH; it is stored on the server, and the AI provider receives it with every request
  • Where your files are — files the assistant creates are on your server’s disk; what it reads, together with your messages and tool results, is sent to the AI provider as model input
  • The Gateway port — OpenClaw’s Gateway listens on port 18789 by default, and OpenClaw advises against exposing that port directly to the public internet. Ask the agent which address it set the web interface up on
  • Checks — run openclaw security audit --deep and openclaw doctor; openclaw doctor checks the permissions of the configuration file

To rotate your API key:

  1. Create a new key at the provider.
  2. Replace the line of the old key in the file that holds it (find it with the grep -l command above).
  3. Run openclaw gateway restart, then openclaw models status.
  4. Revoke the old key at the provider.

Managing the Server

Your server has its own manage page in the RepoCloud dashboard: its address and SSH command, power controls, the browser console, SSH keys, resizing, snapshots, usage charts, a custom domain on a server that has that section, and the option to delete it. Managing VPS Apps describes each part, and Resume Chat on the same page reopens the chat with the DevOps AI Agent. Take a snapshot before you make risky changes, so you can roll back.

Troubleshooting

‘No credentials found’ error

The AI provider’s API key is not configured on the Gateway host, or the Gateway cannot read it. SSH into the server and run openclaw models status. To see which file holds the key without printing it, run grep -l ANTHROPIC_API_KEY ~/.openclaw/.env ~/.openclaw/openclaw.json (with your provider’s variable name). If the key is missing, add it to that file and run openclaw gateway restart.

Model responses are slow or timing out

If responses consistently time out, check your account with the provider for rate limits or billing issues. You can also choose another model with /model.

The web interface does not open

Start with Troubleshooting the Chat, which covers an address that does not open, and tell the agent what you see after Resume Chat on the manage page. If the server is Online and the page does not load, open the browser console from the RepoCloud manage page, or SSH in, and run openclaw gateway status, openclaw logs, and openclaw doctor.

The deployment failed or the agent seems stuck

Troubleshooting the Chat covers a deployment that failed, an agent that seems stuck or asks for something, a server that does not answer, and a missing Resume Chat button.

API key charges seem high

Everything the model receives counts toward the tokens: OpenClaw’s system prompt, the conversation history, tool calls and results, and attachments. /status in the chat shows the context usage and the tokens of the last response, and /usage tokens adds a usage footer to every reply. Check your usage in your provider’s console, and choose a smaller model for routine work with /model.

Use Cases

OpenClaw is ideal for:

  • People who want a personal assistant on their own server
  • Small teams whose members trust each other and share one assistant

Next Steps

Search the documentation

Type to search the documentation.

Get started for free

Sign up and get free credit for your first 30 days at RepoCloud

Get Started

This offer applies to new customers