# OpenClaw Installation and Configuration on Ubuntu instance

**OpenClaw** is an open-source AI automation platform used to run and manage **AI agents** that can interact with users, execute tasks, and integrate with different tools and services. It works as a **gateway between AI models, automation tools, and communication channels**.

OpenClaw supports multiple AI providers such as **Anthropic, OpenAI, and others**, allowing agents to process prompts and perform automated workflows. It provides both a **Command Line Interface (CLI)** and a **Web Control Dashboard** for managing agents, monitoring sessions, and configuring integrations.

OpenClaw is commonly used for **AI assistants, DevOps automation, workflow automation, and chatbot integrations**.

**Prerequisites**

* Ubuntu 22.04 / Ubuntu 24.04
* Minimum 4 GB RAM
* At least 20 GB free disk space

Recommended system environment:

* Ubuntu Linux server or virtual machine
* Internet connectivity
* Terminal access to the server
* Basic knowledge of Linux command-line operations

Before installing OpenClaw, the following prerequisites must be satisfied:

***

\
**1. Install OpenClaw**

First, install OpenClaw using the official installation script.

```
curl -fsSL https://openclaw.ai/install.sh | bash
```

**Purpose**

This script automatically:

* Installs Node.js
* Installs required build tools
* Installs the OpenClaw CLI using npm
* Sets up the OpenClaw environment<br>

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FnJW6o63KqzKXHEiuIBaC%2Fimage.png?alt=media&#x26;token=d73046f2-cdb7-4be8-b3c8-0f1cf419f2a1" alt=""><figcaption></figcaption></figure>

***

**2. OpenClaw Onboarding Configuration**

After installing OpenClaw and running the application for the first time, the **Onboarding Wizard starts automatically**. This interactive wizard helps configure the initial environment and settings required for the OpenClaw agent.

The onboarding process guides the user through several configuration options including security confirmation, model provider configuration, channel setup, and additional features.

***

**Step 1 — Security Confirmation**

The onboarding wizard first displays a **security notice** explaining that OpenClaw operates as a personal AI agent and may execute actions depending on enabled tools.

The user must confirm the message to proceed.

Selection:

```
Security confirmation → Yes
```

This confirms that the user understands the security considerations.

***

**Step 3 — Select Onboarding Mode**

OpenClaw provides multiple setup modes for configuration.

For initial setup, **QuickStart mode** is selected because it automatically configures the gateway and default parameters.

Example configuration:

```
Onboarding Mode → QuickStart
Gateway Port → 18789
Gateway Bind → 127.0.0.1
Gateway Authentication → Token (Default)
```

This creates a secure local communication gateway for the OpenClaw agent.

***

**Step 4 — Model Provider Configuration**

OpenClaw allows users to select different AI model providers depending on their requirements.

Supported providers include:

* OpenAI
* Anthropic
* Local models
* Other supported APIs

Users can configure the provider and specify the required API credentials.

Example:

```
Model Provider → Select desired provider
Default Model → Choose preferred model
```

***

**Step 5 — Channel Integration**

OpenClaw supports multiple messaging platforms for communication with the agent.

Users can configure their preferred platform.

Examples include:

* Telegram
* WhatsApp
* Discord
* Slack
* Google Chat
* Microsoft Teams
* Signal
* Matrix
* IRC

Example configuration:

```
Channel → Select preferred messaging platform
Authentication → Provide required API token
```

***

**Step 6 — Configure Web Search**

OpenClaw provides optional web search capability that allows the agent to retrieve information from the internet.

Users can select a search provider and configure the required API key.

Example:

```
Search Provider → Select provider
API Key → Enter authentication key
```

***

**Step 7 — Skills and Hooks Configuration**

The onboarding wizard also allows users to configure optional features such as:

* Skills (additional capabilities for the agent)
* Hooks (automation triggers for commands)

These features can be enabled based on user requirements.

Example:

```
Skills → Configure selected skills
Hooks → Enable automation hooks
```

***

**Step 8 — Start the Agent**

After completing onboarding, OpenClaw starts the agent session.

Example command generated by the system:

```
openclaw tui --ws://127.0.0.1:18789 --agent main --session main
```

This launches the OpenClaw terminal interface for interacting with the agent.

***

**3. Check Gateway Status**

Verify that the OpenClaw gateway service is running.

```
openclaw gateway status
```

Expected output:

```
Runtime: running
Listening: 127.0.0.1:18789
RPC probe: ok
```

This confirms the gateway is active.<br>

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FhAEx5iN1ghy7Bwj7FPGc%2Fimage.png?alt=media&#x26;token=2e887cc3-9b31-4b9f-9011-236245f5e365" alt=""><figcaption></figcaption></figure>

***

**4. Configure Gateway for LAN Access**

Edit the OpenClaw configuration file.

```
nano ~/.openclaw/openclaw.json
```

Modify the gateway section:

```
"gateway": {
  "port": 18789,
  "mode": "local",
  "bind": "lan"
}
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FDtCDDLMJfvFS2YOnGfiO%2Fimage.png?alt=media&#x26;token=dd1a5ed1-2f4a-41ba-a92b-ee29e21897fb" alt=""><figcaption></figcaption></figure>

Restart the gateway:

```
openclaw gateway restart
```

Verify:

```
ss -tulnp | grep 18789
```

Expected:

```
0.0.0.0:18789 LISTEN
```

Check status again:

```
openclaw gateway status
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FYRU9zeVu12PUrMM8g1rK%2Fimage.png?alt=media&#x26;token=0bf2729e-2494-44bc-9d89-c5080afb2700" alt=""><figcaption></figcaption></figure>

***

**8. Launch OpenClaw Terminal Interface**

Run the OpenClaw TUI.

```
openclaw tui
```

This allows interaction with the configured AI agent.

***

**9. Access OpenClaw Dashboard**

Generate the dashboard URL:

```
openclaw dashboard
```

Example output:

```
http://127.0.0.1:18789/#token=YOUR_TOKEN
```

***

**10. Access Dashboard Remotely (SSH Tunnel)**

If running on a remote server:

```
ssh -N -L 18789:127.0.0.1:18789 ubuntu@SERVER_IP
```

Open in browser:

```
http://localhost:18789
```

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FiXnuhkiAt11EM7UZYfs2%2Fimage.png?alt=media&#x26;token=7b0824f1-9619-466a-9358-cacb18256be2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1876135298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEC5NwtFshv6EATOemuUn%2Fuploads%2FFRoQwnydE2BnXSBks6os%2Fimage.png?alt=media&#x26;token=2493d807-b2d2-4735-b8dc-1a2b0dc1484e" alt=""><figcaption></figcaption></figure>
