Basic Usage ✅ Beginner

First Launch of OpenClaw: Set Up Your API Key and Hear AI's First Words

Installation done — now let's bring OpenClaw to life. Follow the setup wizard to initialize everything and get AI to respond within 3 minutes.

📝 建立:2026年2月25日 ✅ 最後驗證:2026年2月25日
鴨編 卡住很正常——點段落旁的 😵 卡關 讓我們知道,或直接往下滾到問答區發問。 也可以用 👍 看懂 / 😢 看不懂 告訴我們哪裡寫得好、哪裡要改。

Your Progress So Far

Congrats on making it this far! This LaunchDock tutorial walks you through OpenClaw’s first launch — entering your API Key and hearing AI’s first words.

By this point, you should have completed:

What you need to do now is simple: Enter your API Key and hear AI’s first response.


Step 1: Launch the Setup Wizard

Open your terminal (Terminal on macOS, WSL or PowerShell on Windows) and type:

openclaw onboard --install-daemon

You’ll see an interactive setup screen. Don’t worry — just follow along and make your selections.

1.1 Security Warning

The wizard will first remind you that OpenClaw is a powerful tool that can perform actions on your behalf.

  • Use the arrow keys to select Yes
  • Press Enter to confirm

1.2 Choose Installation Mode

Select QuickStart (recommended for beginners).

It will use safe default settings, all of which can be changed later.


Step 2: Configure the LLM Provider

2.1 Choose Your Provider

The wizard will ask which LLM you want to use. Select based on the Key you obtained in the previous step:

Your Key starts withChoose
AIzaSy...Google (Gemini)
sk-or-...OpenRouter
sk-... (without ant)OpenAI
sk-ant-...Anthropic

2.2 Paste Your API Key

Copy the API Key you saved earlier and paste it into the terminal.

Duck Editor You might not see any characters after pasting — this is normal! The terminal hides password-type input for security. Just press Enter.

2.3 Choose a Model

The wizard will list the models supported by your chosen Provider. Recommendations for beginners:

ProviderRecommended ModelReason
Googlegemini-2.0-flashFree, fast
OpenRouteranthropic/claude-3.5-sonnetGood quality, reasonable price
OpenAIgpt-4o-miniCheap, fast
Anthropicclaude-sonnet-4-5Balance of quality and speed

Duck Editor Don’t overthink it — you can always change this later in the config file.

2.4 Confirm Settings

The wizard will show a summary of your settings. If everything looks good, press Enter.

You should see:

✅ Configuration saved successfully

If you see a red error, the most common cause is the Key was pasted incorrectly. Use the arrow keys to go back and re-enter it.


Step 3: Set Up a Messaging Platform (Telegram)

Next, the wizard will ask which platform you want to use to chat with OpenClaw.

Telegram is recommended for beginners — it’s the simplest, free, and works on both mobile and desktop.

Duck Editor If you don’t want to set up a platform yet, you can skip this step and use the Web interface (http://localhost:18789) to chat with OpenClaw instead.

3.1 Create a Telegram Bot

  1. Open Telegram (mobile or desktop)
  2. Search for @BotFather and start a conversation
  3. Send /newbot
  4. Enter a name (e.g., My OpenClaw)
  5. Enter a username (must end with bot, e.g., my_openclaw_bot)
  1. BotFather will reply with a Token in this format:
123456789:ABCdefGHIjklMNOpqrSTUvwxyz
  1. Copy this Token

3.2 Paste the Token into the Wizard

Go back to the terminal, paste the Token, and press Enter.

3.3 Pair Your Account

  1. Find the bot you just created in Telegram → Click “Start
  2. Send any message (e.g., hello)
  3. The terminal will display a pairing code
# Follow the displayed command:
openclaw pairing approve telegram <pairing-code>

Step 4: Start the Gateway

The Gateway is OpenClaw’s core service that ties everything together.

If you selected --install-daemon in the wizard, it’s already started automatically. Verify it:

openclaw gateway status

You should see:

✅ Gateway is running on port 18789

If it didn’t start automatically, start it manually:

# Foreground start (shows real-time logs)
openclaw gateway start

# Or background start (recommended for daily use)
openclaw gateway start --daemon

Verify the Web Interface

Open your browser and go to http://localhost:18789

You should see the OpenClaw dashboard.


Step 5: Your First Message 🎉

Now, the most exciting moment —

Option A: Using Telegram

In your Telegram bot, send:

Hello, please briefly introduce yourself

Wait 5–10 seconds (it may be slower the first time), and you should receive a reply from AI!

Option B: Using the Web Interface

  1. Open http://localhost:18789
  2. Type a message in the chat box
  3. Click send

🎉 Congratulations! If you see AI’s response, everything is set up correctly!

Your OpenClaw is now up and running. Next, let’s try something more powerful —

👉 First Skill: Complete Your First Automation Task Duck Editor Duck Editor says: How does it feel hearing AI respond for the first time? It’s like building a PC from scratch and pressing the power button — the screen lights up, and it was all worth it. Next, we’ll teach you to put it to work, not just chat.


🚨 Common Troubleshooting

Gateway Failed to Start

“Port 18789 already in use”

# Find the process using the port
sudo lsof -i :18789
# Kill it, then restart
openclaw gateway start

“Gateway failed to start”

# Use the doctor command to diagnose
openclaw doctor

It will check all settings and tell you what’s wrong.

API Key Issues

“Invalid API Key”

  • The Key may not have been copied completely — go back to the provider’s website and copy it again
  • Make sure there are no extra spaces in the Key
  • If it’s OpenAI, confirm that your account has been funded

“Connection timeout”

  • Check your internet connection
  • Confirm your chosen Provider is not under maintenance

Telegram Issues

“The bot isn’t responding”

  1. Confirm the Gateway is running: openclaw gateway status
  2. Confirm pairing was completed: Did you send the pairing code?
  3. Confirm the Bot Token is correct: Go back to BotFather and retrieve it again

“It takes a very long time to respond”

The first response usually takes 10–30 seconds because the model needs to “warm up.” Subsequent responses will be much faster. If every response takes over 1 minute:

  • Switch to a faster model (e.g., gemini-2.0-flash)
  • Check your internet speed

Where Are the Config Files?

If you need to manually edit settings later:

~/.openclaw/
├── openclaw.json    ← Main config file
├── workspace/       ← Working directory
│   ├── USER.md      ← AI's understanding of you (editable)
│   └── ...
└── logs/            ← Error logs

Duck Editor For advanced settings (model routing, fallback mechanisms), see Model Configuration & Switching.


這篇文章對你有幫助嗎?

💬 問答區

卡關了?直接在這裡問,其他讀者和作者都能幫忙解答。

載入中...