Skip to content

OpenClaw

OpenClaw

OpenClaw is an open-source AI assistant that runs on your computer or server.

What OpenClaw can do

OpenClaw connects to your tools, applications, and online services. It can help developers write code, debug applications, automate tasks, and manage files.

It can also support everyday workflows:

  • Create and manage shopping lists.
  • Set reminders and recurring tasks.
  • Manage your calendar and schedule appointments.
  • Summarize and organize your emails.
  • Monitor product or flight prices and notify you of changes.
  • Research topics by browsing the web.
  • Read and summarize documents and PDFs.
  • Automate repetitive daily workflows.
  • Send messages through supported communication platforms including but not limited to WhatsApp, Discord, Telegram, Slack, iMessage.
  • Control compatible smart home devices.
  • Create custom automations tailored to your personal or professional needs.

Keep control of your data

OpenClaw runs on your own hardware. You choose which providers and services to connect. Your conversations, files, and data remain under your control.


Set Up OpenClaw on Linux

Set up OpenClaw on Linux

Install OpenClaw on a Linux VPS. Then use the onboarding wizard to connect a provider and channel.

Why run OpenClaw on Linux?

Linux VPS hosting gives OpenClaw a reliable, always-on environment. You retain control of the operating system, security settings, and integrations.

Some of the benefits of running OpenClaw on Linux include:

  • 24/7 availability from anywhere with an internet connection.
  • Full control over your server and data.
  • Excellent performance and resource efficiency.
  • Easy integration with development tools, automation platforms, and third-party services.
  • Ability to run background tasks and long-running workflows.
  • Enhanced privacy through self-hosting.
  • Simple updates and maintenance using standard Linux package management and command-line tools.

In this guide, you'll learn how to install the latest version of OpenClaw on an Ubuntu 24.04 LTS VPS using the official installation method. By the end of the tutorial, you'll have a fully functional OpenClaw installation ready to help with software development, automation, research, and everyday productivity tasks.

Before you begin

Before installing OpenClaw, ensure you have:

  • A VPS running Linux. This guide uses Ubuntu 24.04 LTS.
  • SSH access to your server.
  • A user account with sudo privileges.
  • An active internet connection.

For the best experience, we recommend:

  • 2 vCPU
  • 4 GB RAM
  • 20 GB of available disk space

Using Anthropic Claude CLI

If you plan to use Anthropic Claude CLI, set up Claude Code first.

Follow Connect OpenClaw to Anthropic (Claude CLI). Then return here to set up OpenClaw.

Using OpenAI with ChatGPT

If you plan to use OpenAI with ChatGPT, continue with this guide.

Install OpenClaw

1

Connect to your VPS

Connect to your Ubuntu server using SSH.

ssh username@your-server-ip

Replace:

  • username with your Linux username.
  • your-server-ip with your VPS's public IP address.

Password authentication

Enter your password if you have not configured an SSH key.

2

Update your system

Before installing any software, update your system packages.

sudo apt update && sudo apt upgrade -y

This ensures your server has the latest security patches and package updates.

3

Install OpenClaw

Run the Official OpenClaw Installer:

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

The installer automatically:

  • Detects your operating system.
  • Installs Node.js if it isn't already installed.
  • Downloads and installs the latest version of OpenClaw.
  • Launches the onboarding wizard to help you configure your installation.

The installation may take a few minutes depending on your internet connection and server performance.

OpenClaw installation

Complete onboarding

Follow the prompts to finish the installation.

1

Confirm the installation

Choose Yes, then press Enter.

Confirm OpenClaw installation
2

Choose QuickStart

Choose QuickStart, then press Enter.

Choose QuickStart
3

Choose an AI provider

Choose an AI provider.

Choose an AI provider

Use these guides to connect OpenAI or Anthropic:

4

Select a channel

Select the channel for your OpenClaw assistant.

Select an OpenClaw channel

Use these guides to connect Telegram or Discord:

5

Choose a search provider

Choose a search provider, then press Enter.

Choose a search provider
6

Configure optional skills

Choose Yes to configure optional skills.

Configure optional skills

Select the skills with Space. Press Enter when you finish.

Select OpenClaw skills
7

Configure optional settings

Configure any remaining optional settings.

Configure optional settings Configure OpenClaw settings Review optional settings
8

Configure hooks

Select hooks with Space, then press Enter.

Select OpenClaw hooks
9

Choose where to start the assistant

Choose where to start the assistant. Hatch in Terminal is recommended.

Choose where to start OpenClaw

Your assistant is ready. You can speak to it directly in the terminal.

OpenClaw ready in the terminal

You've successfully installed and configured OpenClaw on Linux. To talk with the AI assistant on your desired channels, follow the last set of instructions in these subpages:


Connect OpenClaw to OpenAI

Connect OpenClaw to OpenAI with your ChatGPT account.

Use this guide during the OpenClaw onboarding wizard. It uses ChatGPT Login to authenticate your OpenAI account.

Sensitive callback URL

Treat the callback URL as sensitive. It may contain temporary authorization details.

Connect your account

1

Select OpenAI

Select OpenAI as the AI provider. Then press Enter.

Select OpenAI
2

Choose an authentication method

Select ChatGPT Login. Then press Enter.

Choose ChatGPT Login
3

Open the sign-in link

Copy the URL shown in the terminal. Open it in a browser.

Open the OpenAI sign-in link
4

Complete OpenAI sign-in

Sign in to your OpenAI account and approve the request.

After the browser redirects, copy the complete address-bar URL. Paste it into the terminal and press Enter.

Complete OpenAI sign-in
5

Select a model

Select the model that OpenClaw should use. Then press Enter.

Select an OpenClaw model

OpenClaw is now connected to OpenAI. Return to Set up OpenClaw on Linux to configure the next option.


Connect OpenClaw to Anthropic (Claude CLI)

Connect OpenClaw to Anthropic Claude CLI.

Use this guide during the OpenClaw onboarding wizard. It uses Anthropic (Claude CLI) to authenticate your Anthropic account.

Connect your account

1

Select Anthropic

Select Anthropic as the AI provider. Then press Enter.

Select Anthropic
2

Choose an authentication method

Select Anthropic Claude CLI. Then press Enter.

Choose Anthropic Claude CLI
3

Select a model

Select the model that OpenClaw should use. Then press Enter.

OpenClaw is now connected to Claude CLI. Return to Set up OpenClaw on Linux to configure the next option.


Connecting to Telegram

Connect OpenClaw to a Telegram bot and approve your account.

Connect OpenClaw to Telegram

Connect OpenClaw to a Telegram bot during onboarding. Then approve your Telegram account.

Keep your bot token private

A bot token grants control of your bot. Keep it private. Reset it if exposed.

Create and connect the Telegram bot

1

Select Telegram in OpenClaw

In Select Channel, choose Telegram. Select Enter Telegram bot token and press Enter.

Select Telegram in OpenClaw
2

Create a bot with BotFather

Open @BotFather in Telegram. Select Open App.

Open BotFather

Select Create a New Bot.

Create a new Telegram bot

Choose a name and username. The username must end in bot. Then select Create Bot.

Choose a Telegram bot name and username

Select the bot you created.

Select the created Telegram bot

Select Copy to copy the bot token.

Copy the Telegram bot token
3

Enter the bot token

Return to your VPS. Paste the token and press Enter.

Enter the Telegram bot token in OpenClaw

OpenClaw is now connected to Telegram. Return to Set up OpenClaw on Linux to configure the next option.

Below steps are done after you finish configuring OpenClaw

Approve your Telegram account

Message your bot in Telegram. OpenClaw displays an approval command. Copy it exactly.

Telegram approval command

If the OpenClaw terminal interface is active, exit it with:

Ctrl+C

Return to your normal Linux prompt:

root@your-vps:~#

Then run:

openclaw pairing approve telegram <code>

Ask OpenClaw for help

You can ask OpenClaw to complete the Telegram setup. Provide the Telegram approval code.

Approve the Telegram account

Your Telegram account can now message the OpenClaw assistant. Open your bot, send a message, and confirm it responds as expected.


Connecting to Discord

Connect OpenClaw to a Discord bot and approve your account.

Connect OpenClaw to Discord

Connect OpenClaw to a Discord bot during onboarding. Then approve your Discord account to start chatting.

Before you begin

You need:

  • An OpenClaw installation with the onboarding wizard open.
  • A Discord account that can add apps to your server.
  • A Discord server for the bot.

Keep your bot token private

A bot token grants control of your bot. Keep it private. Reset it immediately if exposed.

Create and invite the Discord bot

1

Select Discord in OpenClaw

In Select Channel, choose Discord.

Select Discord in OpenClaw

Choose Enter Discord bot token. Keep the terminal open while you create the bot.

Enter Discord bot token
2

Create an application

Open the Discord Developer Portal. Sign in or create a Discord account.

Discord Developer Portal

Select Applications → New Application.

Create a new Discord application

Enter a name, accept the terms, and select Create.

Name the Discord application
3

Enable gateway intents

Open Bot. Under Privileged Gateway Intents, enable:

  • Message Content Intent (required)
  • Server Members Intent (recommended; required for role allowlists, name-to-ID matching, and channel-audience access groups)
  • Presence Intent (optional; only for presence updates)
Configure Discord gateway intents
4

Generate an invite URL

Open OAuth2 → URL Generator. Enable these scopes:

  • bot
  • applications.commands

Under Bot Permissions, enable at least:

  • View Channels
  • Send Messages
  • Read Message History
  • Embed Links
  • Attach Files

You can also enable Add Reactions. Grant extra permissions only when required.

Generate the Discord bot invite URL
5

Add the bot to your server

Copy the generated URL and open it in a browser. Select your server, then select Continue.

The bot now appears in that server.

Add the Discord bot to your server

Connect the bot to OpenClaw

Return to Bot in the Developer Portal. Select Reset Token, then copy the new token.

Reset the Discord bot token

Copy the Discord bot token

Paste the token into the OpenClaw terminal prompt. Press Enter to continue.

Enter the Discord bot token in OpenClaw

Restrict where the bot responds

Optionally, choose the servers and channels where the bot can respond. Limit access to channels you trust.

Restrict Discord server access

Restrict Discord channel access

Review Discord access restrictions

OpenClaw is now connected to Discord. Return to Set up OpenClaw on Linux to configure the next option.

Below steps are done after you finish configuring OpenClaw

Approve your Discord account

Send the bot a direct message in Discord.

Send the Discord bot a direct message

OpenClaw displays an approval command. Copy that exact command and run it in the terminal.

Discord approval command

Your account can now message the OpenClaw assistant through Discord.

Chat with OpenClaw through Discord