OpenClaw Setup
This guide explains how to install and configure the OpenClaw agent on your RoqueOS Server.
Prerequisites
PREREQUISITES
- RoqueOS Server installed and running (see installation)
- Docker with access to the socket (
/var/run/docker.sock) - API key from an AI provider (OpenAI or Anthropic)
- Minimum of 4 GB of RAM on the server (8 GB recommended)
1. Download the OpenClaw Image
OpenClaw runs as a separate Docker container. Download the official image:
bash
docker pull roqueribeiro1988/roqueos-openclaw:latestThe image includes:
- Ubuntu 22.04
- XFCE Desktop
- TigerVNC + noVNC
- Chromium Browser
- Node.js 20
- OpenClaw Agent
2. Configure the API Key
In your RoqueOS Server's docker-compose.yml file, add the environment variables for your AI key:
yaml
services:
roqueos-server:
image: roqueribeiro1988/roqueos-server:latest
environment:
- TZ=America/Sao_Paulo
- OPENAI_API_KEY=sk-your-key-hereyaml
services:
roqueos-server:
image: roqueribeiro1988/roqueos-server:latest
environment:
- TZ=America/Sao_Paulo
- ANTHROPIC_API_KEY=sk-ant-your-key-hereSECURITY
Never commit your API keys in public repositories. Use a .env file to store secrets and reference it with env_file: .env in the compose file.
Example with .env file:
bash
# .env (do not commit to git!)
OPENAI_API_KEY=sk-your-key-hereyaml
# docker-compose.yml
services:
roqueos-server:
env_file:
- .env3. Verify Configuration
After restarting the server with docker compose down && docker compose up -d, verify that the agent module is accessible:
bash
curl http://localhost:27021/agent/sessionsExpected response:
json
[]4. Access the Agent in the Frontend
- Open RoqueOS and make sure you are connected to the server.
- In the Launchpad, look for the AI Agent app (OpenClaw icon).
- The app will open with the chat interface and the desktop preview panel.
Used Ports
| Port | Protocol | Description |
|---|---|---|
27021 | HTTP/WS | RoqueOS Server API and WebSocket |
5901 | VNC | Desktop VNC of the OpenClaw container |
6080 | HTTP | noVNC (web access to desktop) |
Ports 5901 and 6080 are managed internally by the server and do not need to be exposed externally.
Available Environment Variables
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY | OpenAI API Key | — |
ANTHROPIC_API_KEY | Anthropic API Key | — |
AGENT_MAX_SESSIONS | Maximum concurrent sessions | 3 |
AGENT_TIMEOUT | Session timeout in minutes | 30 |
Next Steps
- How to Use OpenClaw — Practical guide and examples