Remote OpenClaw Blog
OpenClaw Tutorial for Beginners: Your First AI Agent in 30 Minutes
What changed
This post was reviewed and updated to reflect current deployment, security hardening, and operations guidance.
What should operators know about OpenClaw Tutorial for Beginners: Your First AI Agent in 30 Minutes?
Answer: Before you begin, make sure you have: This guide covers practical deployment decisions, security controls, and operations steps to run OpenClaw, ClawDBot, or MOLTBot reliably in production on your own VPS.
Complete OpenClaw tutorial for beginners. Go from zero to a running AI agent in 30 minutes. Install, configure, connect Telegram, first conversation, and first scheduled task. Step-by-step guide.
Marketplace
Free skills and AI personas for OpenClaw — deploy a pre-built agent in 15 minutes.
Browse the Marketplace →Join the Community
Join 500+ OpenClaw operators sharing deployment guides, security configs, and workflow automations.
What You Need Before Starting
Before you begin, make sure you have:
- A computer (Mac, Windows, or Linux) or a VPS for always-on operation
- An internet connection
- A Telegram account (free to create if you do not have one)
- 30 minutes of uninterrupted time
You do not need any coding experience. You do not need to pay for anything — we will use free tools and free AI model tiers throughout this tutorial.
By the end of this tutorial, you will have an AI agent running on your machine, connected to Telegram, that you can chat with and that can run scheduled tasks on your behalf.
Step 1: Install Docker (5 minutes)
Docker is the container platform that runs OpenClaw. Think of it as a lightweight virtual machine that keeps OpenClaw and its dependencies neatly isolated from the rest of your system.
On Mac:
- Go to docker.com/products/docker-desktop
- Download Docker Desktop for Mac (choose Apple Silicon or Intel based on your chip)
- Open the downloaded .dmg file and drag Docker to Applications
- Open Docker Desktop from Applications and wait for it to start (you will see the Docker icon in your menu bar)
On Windows:
- Go to docker.com/products/docker-desktop
- Download Docker Desktop for Windows
- Run the installer and follow the prompts
- Restart your computer if prompted
- Open Docker Desktop and wait for it to start
On Linux (Ubuntu/Debian):
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
# Log out and log back in for group changes to take effect
To verify Docker is working, open your terminal (Terminal on Mac, Command Prompt or PowerShell on Windows) and run:
docker --version
You should see something like Docker version 27.x.x. If you get an error, Docker is not running — open Docker Desktop and wait for it to start.
Step 2: Create Your Project Files (5 minutes)
Create a folder for your OpenClaw project. Open your terminal and run:
mkdir ~/openclaw
cd ~/openclaw
Now create the Docker Compose file. This tells Docker how to run OpenClaw. Create a file called docker-compose.yml with this content:
version: '3.8'
services:
openclaw:
image: openclaw/openclaw:latest
container_name: openclaw
ports:
- "3000:3000"
volumes:
- ./data:/data
env_file:
- .env
restart: unless-stopped
Next, create a .env file for your configuration. This file stores your API keys and settings:
# .env file
# AI Model Configuration
MODEL_PROVIDER=google
GOOGLE_API_KEY=your-gemini-api-key-here
# Gateway Token (change this to a random string)
GATEWAY_TOKEN=my-secret-token-change-me
# Telegram Configuration
TELEGRAM_BOT_TOKEN=your-telegram-bot-token-here
TELEGRAM_ALLOWED_USERS=your-telegram-user-id
Do not fill in the real values yet — we will get those in the next steps.
Finally, create the data directory:
mkdir -p data
Step 3: Get Your AI Model API Key (3 minutes)
We will use Google Gemini 2.0 Flash because it is free and requires no credit card.
- Go to Google AI Studio
- Sign in with your Google account
- Click "Create API Key"
- Copy the key (it starts with "AIza...")
Open your .env file and replace your-gemini-api-key-here with your actual key:
GOOGLE_API_KEY=AIzaSyB...
While you are editing the .env file, generate a random gateway token. You can use any random string — the longer and more random, the better. This token protects your OpenClaw dashboard from unauthorized access.
Step 4: Connect Telegram (5 minutes)
Telegram is how you will talk to your agent. Here is how to set it up:
Create a Telegram bot:
- Open Telegram and search for @BotFather
- Send the command
/newbot - Choose a name for your bot (e.g., "My OpenClaw Agent")
- Choose a username for your bot (must end in "bot", e.g., "my_openclaw_bot")
- BotFather will give you a token. Copy it.
Update your .env file with the bot token:
TELEGRAM_BOT_TOKEN=7123456789:AAH...
Get your Telegram user ID:
- Search for @userinfobot on Telegram
- Send it any message
- It will reply with your user ID (a number like 123456789)
Update your .env file with your user ID:
TELEGRAM_ALLOWED_USERS=123456789
This setting ensures only you can talk to your bot. Without it, anyone who finds your bot can use it (and your API key).
Step 5: Start OpenClaw (2 minutes)
Everything is configured. Time to launch. In your terminal, make sure you are in the ~/openclaw directory and run:
docker compose up -d
Docker will download the OpenClaw image (about 200MB — this takes a minute or two on the first run) and start the container.
Check that it is running:
docker compose logs -f
You should see log messages indicating OpenClaw is starting up. Look for lines like:
OpenClaw v3.23.1 starting...
Telegram bot connected
Gateway listening on port 3000
Ready.
If you see errors, check your .env file for typos. The most common issue is a missing or incorrect API key.
Press Ctrl+C to stop watching the logs (the container keeps running in the background).
Step 6: Your First Conversation (3 minutes)
Open Telegram and find your bot (search for the username you created in Step 4). Send it a message:
Hello! What can you do?
Your agent should reply within a few seconds. The reply comes from the AI model (Gemini) through OpenClaw. Try a few more messages:
- "What time is it?" — Tests basic conversation
- "Summarize the latest news about AI agents" — Tests the agent's knowledge
- "Help me draft an email to a client about a project delay" — Tests practical utility
Congratulations — you have a working AI agent. Everything from here is about making it more useful.
You can also access the OpenClaw web UI by opening http://localhost:3000 in your browser. Enter your gateway token when prompted. The web UI shows conversation logs, settings, and system status.
Step 7: Your First Scheduled Task (7 minutes)
An agent that only responds when you message it is just a chatbot. The real power of OpenClaw is scheduled tasks — things the agent does automatically on a timer.
Let us set up a morning briefing that runs every day at 7:00 AM.
Option A: Through the web UI
- Open
http://localhost:3000in your browser - Navigate to Settings then Scheduled Tasks
- Click "Add Task"
- Set the schedule to "0 7 * * *" (this is cron syntax for every day at 7:00 AM)
- Set the message to: "Give me a morning briefing. List today's date, day of the week, and 3 interesting things happening in the AI industry today. Keep it concise."
- Save the task
Option B: Through Telegram
Send this message to your bot:
/schedule 0 7 * * * Give me a morning briefing. List today's date, day of the week, and 3 interesting things happening in the AI industry today. Keep it concise.
The agent will confirm the scheduled task was created.
To test it immediately without waiting until 7 AM, you can trigger it manually by sending the briefing prompt as a regular message. The scheduled version will run automatically every morning.
This is the foundation that everything else builds on. From here, you can add more scheduled tasks, install skills from ClawHub, connect additional integrations, and build increasingly sophisticated workflows.
Next Steps
You now have a working AI agent. Here is what to do next, in order of priority:
- Use it daily for a week. Chat with it. Ask it to help with real tasks. Learn what it does well and where it falls short. This hands-on experience is invaluable.
- Add more scheduled tasks. Set up an inbox summary, a daily to-do reminder, or an end-of-day recap. See our 50 Automation Ideas for inspiration.
- Secure your deployment. If you plan to keep OpenClaw running long-term, follow our Safety Best Practices guide. At minimum, set up HTTPS and enable sandbox mode.
- Install skills from ClawHub. Browse the marketplace and install skills that match your use case. Each skill extends what your agent can do.
- Move to a server for 24/7 operation. If you want your agent running all the time (not just when your computer is on), deploy to a VPS. Our Beginner Setup Guide covers VPS deployment.
- Join the community. The Remote OpenClaw community has 500+ operators sharing configurations, troubleshooting help, and workflow ideas. You will learn faster with the community than alone.
The most important thing is to start using it. Every operator's journey is different because every person's workflow is different. The agent becomes more valuable the more you customize it to your specific needs.
