Pular para o conteúdo
← Back to Skalablog

Published article

OpenClaw Tutorial: Run Your Own AI Agent

Software EngineeringClaudeChatGPTGemini

You want an assistant that sends emails, manages files, and scrapes the web while you sleep, but ChatGPT and Claude only chat. OpenClaw, a free open-source AI agent, actually takes action, and this OpenClaw tutorial shows how to set it up on a cheap VPS.

What Is OpenClaw and Why Use It?

OpenClaw is a free, open-source AI agent that runs on a server and takes actions on your behalf: managing files, drafting and sending email, calling APIs, and automating workflows. Unlike ChatGPT or Claude, which are chat interfaces, an agent connects to your tools and executes tasks. You control it by messaging it like a person.

The agent connects to messaging channels such as Telegram, WhatsApp, Signal, Discord, and Slack, so the interface is the chat app already on your phone. You choose which large language model powers it, including Claude, GPT models, Gemini, or cheaper open-source models, connected through an API.

Because OpenClaw has broad access to whatever machine it runs on, security matters. The video's creator, Charlie Chang, recommends isolating it on a server rather than a daily-driver computer, and completing the pairing steps so strangers cannot talk to your agent. As of the video's publication in April 2026, the software itself is free; the running costs are hosting and model API usage.

Where Should You Host OpenClaw?

A virtual private server is the recommended home for OpenClaw because the agent needs to run 24/7 and respond to messages while you sleep or travel. A laptop sleeps, loses Wi-Fi, and hosts your personal files; a VPS stays on and is disposable if something goes wrong.

The OpenClaw project is distributed as a Docker container, which makes a VPS with a Docker manager the straightforward path. The video walks through Hostinger VPS plans, and the speaker reports the following specifications (vendor pricing, verify before buying):

Step-by-Step OpenClaw Setup on a VPS

The full setup, from buying a server to a running agent, takes about 15 to 20 minutes according to the video walkthrough. The order below follows the video and works on any VPS with Docker, not just one provider.

  1. Buy a VPS plan. The speaker uses the entry KVM 1 tier (1 vCPU, 4 GB RAM, 50 GB disk) and reports paying about $75 for 12 months. He says this is enough unless you run local models with Ollama.
  2. Deploy OpenClaw. Open the Docker manager, find OpenClaw in the catalog, and deploy. Wait for the status to change from created to running, then note the port number and gateway token.
  3. Run the onboarding wizard. From the web terminal, exec into the container and run the onboard command. Accept the security notice, choose update, then pick your model provider.
  4. Add an API key. Create an account at OpenRouter, generate a key, save it (it is shown once), and load balance, which the speaker suggests at $20 to $50 to start.
  5. Install skills. During onboarding, install the Google Workspace skill (called GOG) so you can connect Gmail, Calendar, Drive, and Contacts later.
  6. Access the dashboard. The dashboard is not exposed publicly by default, which is good. Create an SSH tunnel from your local machine (ssh -N -L with your port, username, and server address), then open localhost in your browser and connect using the auto-filled gateway token.
  7. Introduce yourself. On first message the agent starts with no memory or identity. Tell it your name, what to call it, and what you need. It writes this into persistent memory, which is what separates it from a stateless chatbot.

How to Connect Telegram and WhatsApp

Messaging apps are how you talk to your agent, and Telegram is the most common channel. Setup uses Telegram's official BotFather: send /newbot, choose a name and a username ending in _bot, and copy the token BotFather gives you. Paste the token to your agent in chat; it installs the Telegram channel and the gateway restarts. Then hit Start on your bot, and give the pairing code it shows back to your agent along with the bot username. The speaker stresses this pairing step, because skipping it lets other people talk to your agent.

WhatsApp works differently. Instead of a bot token, the channel setup generates a QR code in the terminal, and you scan it from your phone under linked devices, the same flow as WhatsApp Web. You then confirm your phone number so the agent allowlists you as owner, and restart the gateway. One cosmetic difference the video points out: WhatsApp messages all come from your own account, so the conversation looks like you are messaging yourself. For that reason the demo continues in Telegram.

Connecting Google Workspace to Your Agent

The Google Workspace skill gives the agent access to Gmail, Calendar, Drive, Contacts, Sheets, and Docs, so you can ask it to check your inbox, draft replies, or manage events directly from Telegram. You install it during onboarding, but it needs Google credentials to actually connect.

In Google Cloud Console, create a project, then enable the APIs you need: Gmail, Drive, Sheets, Calendar, and Contacts. Set up the OAuth consent screen with yourself as a test user, then create an OAuth client ID of type desktop app and download the client secret JSON file.

The neat part of the walkthrough: you send that JSON file to your agent as a document attachment in Telegram. It saves the credentials, generates an OAuth URL, you approve permissions in your browser, and paste the callback URL back to the agent. Authentication is then complete. The video suggests a secondary Google account if you have files you cannot afford to lose, since the agent can delete email and files, not just read them. In the demo, drafting an email produced a clean message that waited for approval before sending.

Choosing Models and Controlling API Costs

Model choice is the main cost lever after hosting. Frontier models from Anthropic OpenAI are the strongest reasoners but cost the most per token. The video's cost strategy is simple: use frontier models for tasks that require heavy thinking, and cheaper models for routine actions where the difference barely shows.

Through OpenRouter you add several models to the picker and switch on the fly with the /model command in chat. The speaker adds open-source models GLM and MiniMax as cheap alternatives, and reports that a quick task run on MiniMax worked fine at a fraction of the price. Because all models share one OpenRouter key, switching does not mean new accounts or new billing.

One habit saves real money: start a new session with /new after finishing a task. Every message resends the conversation history, so long sessions burn tokens on stale context. Frequent fresh sessions keep the agent accurate and the bill lower.

What Can OpenClaw Actually Do? Three Use Cases

Once running, the agent's value shows in multi-step tasks across your tools. The video demonstrates three, all executed from a phone chat.

Frequently Asked Questions

  • Is OpenClaw really free? The software is free and open source. You pay for hosting (the video reports $5 to $10 per month for a small VPS) and for model API usage, which depends on which models you pick and how much you use them.
  • Do I need coding skills to follow an OpenClaw tutorial? Basic ones. You will paste terminal commands, create an SSH tunnel, and configure API keys, but the video targets beginners and every command is shown step by step. Provider one-click installs skip most terminal work.
  • Is it safe to give OpenClaw my Google account? The agent can read, draft, and delete across Gmail, Drive, and Calendar, so mistakes are possible. The video suggests a secondary Google account for valuable files and completing the Telegram pairing steps so only you can message the agent.
  • Why run OpenClaw on a VPS instead of my own computer? A VPS stays online 24/7, is isolated from your personal files, and costs a few dollars a month. A personal laptop sleeps, drops connections, and gives the agent access to everything you care about.
  • Can I use models other than Claude or GPT? Yes. Through OpenRouter you can use Claude, GPT, Gemini, GLM, MiniMax, and others with one API key, and switch between them per task to control cost.

Turn Your Own Video Walkthroughs Into Articles

This guide exists because a 35-minute video contains a complete, reproducible setup that many people would rather read than scrub through. If you have the same kind of knowledge sitting in your own YouTube videos (tutorials, interviews, breakdowns), that content can become a written article without starting from a blank page. Visit Skala Blog, paste a YouTube URL, and turn the transcript into a structured, publishable article.

Source video