F
Fireship
#OpenClaw#AI agent#Hostinger

OpenClaw AI Agent: Setup, Configuration, and Voice Automation

Learn to deploy and configure OpenClaw, an open-source AI agent platform, on Hostinger VPS. This guide covers setting up a Telegram bot, integrating ElevenLabs for voice responses, and automating IT support with a sarcastic AI persona.

5 min readAI Guide

Introduction

Introduction
OpenClaw is an open-source AI agent platform designed to automate complex tasks by integrating with various APIs and services. It allows users to create personalized AI assistants capable of handling diverse workflows, from managing emails to providing technical support with custom personalities and voice responses.

Configuration Checklist

Element Version / Link
Language / Runtime Python (for custom scripts)
Main library OpenClaw (open-source AI agent platform)
Required APIs Anthropic API, OpenAI API, Gemini API, X (Twitter) API, Nexos AI API, Oxylabs AI Studio API, ElevenLabs API, Telegram Bot API
Keys / credentials needed Anthropic API Key, OpenAI API Key, Gemini API Key, X API Key, Nexos AI API Key, Oxylabs AI Studio API Key, ElevenLabs API Key, ElevenLabs Voice ID, Telegram Bot Token, WhatsApp number (optional)

Step-by-Step Guide

Step-by-Step Guide

Step 1 — Choose an AI-managed VPS Hosting Plan

To host OpenClaw, a Virtual Private Server (VPS) is recommended for its flexibility and control. Hostinger offers AI-managed VPS plans, including one-click OpenClaw deployment options, making setup straightforward.

# Example Hostinger VPS plan selection (KVM 2 plan chosen in video)
# Price: $8.99/mo for 24-month period (with discount)
# OpenClaw auto-deploys with your VPS: $5.99 (recommended)

Step 2 — Configure OpenClaw on Hostinger

After selecting a plan, Hostinger provides a control panel to configure OpenClaw. This involves entering various API keys for different AI models and services that OpenClaw can leverage.

# Hostinger OpenClaw Configuration Options
# Gateway authentication token for accessing the OpenClaw web interface
Anthropic API Key: [Your Anthropic API Key]
OpenAI API Key: [Your OpenAI API Key]
Gemini API Key: [Your Google API Key for Gemini AI models]
X API Key: [Your X API Key for Grok AI models]
Nexos AI API Key: [Your Nexos AI API Key]
Oxylabs AI Studio API Key: [Your Oxylabs AI Studio API Key for web browsing capabilities]
WhatsApp number: [Your WhatsApp phone number with country code]
Telegram bot token: [Your Telegram bot token]

Step 3 — Create a Telegram Bot

To integrate OpenClaw with Telegram, you need to create a bot using Telegram's BotFather. This bot will act as the interface for your OpenClaw agent.

# Interaction with BotFather on Telegram
/newbot
BotFather: Alright, a new bot. How are we going to call it? Please choose a name for your bot.
Jeff Delaney: Family IT Support
BotFather: Good. Now let's choose a username for your bot. It must end in 'bot'. Like this, for example: TetrisBot or tetris_bot.
Jeff Delaney: family_it_support_bot
BotFather: Done! Congratulations on your new bot. You will find it at t.me/family_it_support_bot. You can now add a description, about section and profile picture for your bot, see /help for your bot, see /help for your bot, see /help for commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.

Use this token to access the HTTP API:
[Your Telegram Bot Token - copy this]
Keep your token secure and store it safely. It can be used by anyone to control your bot.

Step 4 — Define Bot Personality and Purpose

OpenClaw agents have a SOUL.md file in their workspace that defines their purpose, core behavior, tone, and personality. This allows you to customize how your bot interacts.

# SOUL.md

You are Family IT Support.

Your entire purpose is to help non-technical people with everyday tech problems.

Every incoming message should be treated as a support request by default, even if it is vague, confused, or missing context.

## Core Behavior

- Assume the sender needs tech help.
- If an image is attached, inspect it automatically.
- Diagnose the most likely real-world issue from the message and any attached image.
- Prefer obvious explanations over complicated ones.
- Ask a short follow-up question only when the issue is genuinely unclear.
- Keep responses short enough to sound natural as a voice memo.
- When possible, produce a final answer that can be converted directly into speech.

For the tone and personality, let's go with dry, deadpan and slightly sarcastic.

Emoji: 🔥

## Examples of Good Tone

- "Your monitor is off. Press the power button and let's all act surprised."
- "A mouse ate the internet cable. So the internet is taking some time off."
- "Your printer is not plugged in. A bold choice, but not a productive one."

Step 5 — Integrate ElevenLabs for Voice Responses

To enable voice responses, integrate ElevenLabs by providing your API key and a specific voice ID. This allows OpenClaw to generate speech in your desired voice.

# In the OpenClaw workspace, create an .env file in the agent's directory (e.g., it-support/.env)
ELEVENLABS_API_KEY=[Your ElevenLabs API Key]
VOICE_ID=[Your ElevenLabs Voice ID]

Step 6 — Install FFmpeg

FFmpeg is required to convert the MP3 audio generated by ElevenLabs into the .ogg format suitable for Telegram voice memos.

sudo apt update
sudo apt install -y ffmpeg

Step 7 — Create Voice Note Conversion Script

Develop a Python script, for example make_voice_note.py, to handle the audio conversion process. This script will be called by OpenClaw to prepare voice responses.

from pathlib import Path
# [Editor's note: import subprocess or similar for executing external commands]

def convert_to_voice_note(src: Path, out_path: Path):
    ffmpeg = "ffmpeg"
    cmd = [
        ffmpeg,
        "-y",
        "-i", str(src),
        "-vn",
        "-ac:a", "1",
        "-c:a", "libopus",
        "-b:a", "32k",
        "-vbr", "on",
        "-application", "voip",
        str(out_path)
    ]
    # [Editor's note: Add subprocess.run(cmd, check=True) or similar to execute the ffmpeg command]

# [Editor's note: Add logic to call ElevenLabs API, save MP3, then call convert_to_voice_note]

Step 8 — Provide Tools Context

Create a TOOLS.md file in the OpenClaw workspace to inform the agent about the available scripts and their functionalities. This helps OpenClaw understand how to use the voice note conversion script.

# TOOLS.md

---
summary: "Workspace template for TOOLS.md"
read_when:
  - Bootstrapping a workspace manually
---

## Voice Script

Primary helper script:

- `make_voice_note.py`

It does the following:

1.  send text to ElevenLabs
2.  save the returned MP3
3.  convert MP3 to mono OGG/Opus with ffmpeg

## ffmpeg requirement

The host machine needs `ffmpeg` installed and available in `PATH`.

Ubuntu/Debian:

```bash
sudo apt update
sudo apt install -y ffmpeg

Output files:

  • out/speech.mp3
  • out/voice-note.ogg

For Telegram demos, prefer sending voice-note.ogg with no caption text.
That produces the native voice memo UI with waveform.

MP3 is still useful for Slack or general playback.

The bot should send audio-only replies when doing the voice memo workflow.

The diagnosis/tone logic belongs in the bot prompt/persona, not in the voice script.


### Step 9 — Test the IT Support Bot
Once configured, you can forward messages to your Telegram bot. OpenClaw will process the request, generate a text response, convert it to a voice memo using ElevenLabs and FFmpeg, and send it back to you. You can then forward this voice memo to the original sender.

```text
# Example interaction flow

# 1. User sends message to you (e.g., Uncle Frank: "Hey Jeff! The internet is not working again at the house. Any idea?")
# 2. You forward the message to your "Family IT Support" Telegram bot.
# 3. OpenClaw processes the message and image, generates a response, and converts it to a voice memo.
# 4. OpenClaw sends the voice memo back to your chat with the bot.
# 5. You forward the voice memo from the bot to the original user (e.g., Uncle Frank).

# Example voice memo response:
# "Yeah, the internet is down because that router port is cooked. Unplug it and replace the router, unless electrical fire was the plan."

Comparison Tables

OpenClaw Security Advisories vs. Curl

Project Security Advisories (Total) Rate (per day)
OpenClaw 1,142 16.6
Curl ~600 (over entire lifetime) N/A

OpenClaw Frontier Model Costs (Predicted)

Timeframe Cost (per day) Cost (per month)
Today $300 - $1,000 N/A
Heading to $10,000 N/A
Future shape N/A $20

⚠️ Common Mistakes & Pitfalls

  1. Security Vulnerabilities: OpenClaw has received numerous security advisories. Ensure proper sandboxing and restrict permissions to prevent potential data leaks or unauthorized access, especially when integrating with sensitive accounts. Always review and understand the security implications of any AI agent.
  2. "Slop" Issues (AI-generated reports): Many reported vulnerabilities might be "slop" or AI-generated reports that lack genuine human verification. Focus on critical, high-severity issues and reports that include clear, human-verified details.
  3. High Operational Costs: Running frontier AI models can be expensive. Monitor token usage and explore cost-effective hosting solutions or local models to manage expenses, as daily costs can quickly escalate.
  4. Data Privacy: OpenClaw agents can access and process personal data. Ensure that your deployment runs in a private vault or secure environment to prevent accidental leakage of sensitive information, especially when handling personal communications or medical data.

Glossary

OpenClaw: An open-source AI agent platform designed to automate tasks and interact with various services through natural language.
Token (AI context): A unit of text or code processed by an AI model, used to measure input/output and often associated with computational cost.
FFmpeg: A free and open-source project consisting of a vast suite of libraries and programs for handling video, audio, and other multimedia files and streams.
VPS (Virtual Private Server): A virtual machine sold as a service by an Internet hosting service, offering users dedicated resources and root access within a shared physical server environment.

Key Takeaways

  • OpenClaw enables the creation of AI agents that can automate complex tasks and interact with users via platforms like Telegram.
  • Customizing an OpenClaw agent's SOUL.md file allows for detailed personality and behavioral definitions, such as a dry, sarcastic IT support persona.
  • Integrating ElevenLabs provides realistic voice responses, enhancing the user experience and making interactions more natural.
  • FFmpeg is crucial for converting ElevenLabs' MP3 output into Telegram-compatible OGG voice memos.
  • Hostinger offers convenient one-click deployment for OpenClaw on VPS, simplifying the setup process for developers.
  • Despite its utility, OpenClaw has faced significant security criticisms, highlighting the importance of careful deployment and vulnerability management.
  • The cost of running AI agents, especially with frontier models, can be substantial, necessitating cost-awareness and optimization strategies.

Resources