Buiding Your Own Chatbot in Feishu with Openclaw-lite
๐ Quick Start
1. SSH Connection to Container
Use the following command to connect to your OpenClaw container:
ssh user@<container-address> -p <port> -i <private-key-path>๐ฏ First-Time Setup
Step 1: Run Initial Configuration
After connecting to the container, first-time users need to run the configuration wizard:
openclaw onboardKey Options During Configuration:
Security Warning - Read and select
Yesto continueConfiguration Mode - Select
QuickStart(for quick setup)Model Provider - Choose your AI model provider (e.g.,
Qwen)Authentication Method - Complete OAuth authentication as prompted
Channel Configuration - First-time users can select
Skills Configuration - Recommended to select
Yesto configure skillsDependency Installation - Can select
Skip for now(install as needed)
Important Information to Record:
After configuration is complete, the system will display:
Web UI Address:
http://127.0.0.1:18789/Access Token:
http://127.0.0.1:18789/#token=<your-token>
โ ๏ธ Please save this Token securely! It's your credential for accessing the Web interface.
Step 2: Run Health Check
After initialization, it's recommended to run a health check:
If issues are detected that need fixing, run:
โถ๏ธ Starting Services
Start OpenClaw Gateway
Run in the container:
Signs of Successful Startup:
โ ๏ธ Important Notes:
Do not close this SSH session after startup; the gateway needs to keep running
For background execution, press
Ctrl+Cto exit
๐ Accessing Web Interface
Method 1: SSH Port Forwarding (Recommended)
1. Open a new terminal window and execute the SSH command with port forwarding:
Example:
2. Open your browser and visit:
๐ง Common Commands
Basic Commands
openclaw onboard
Initial configuration wizard
openclaw gateway
Start gateway service (foreground)
openclaw doctor
Health check
openclaw doctor --fix
Auto-fix issues
openclaw security audit
Security audit
openclaw security audit --fix
Auto-fix security issues
openclaw --help
View all available commands
Service Management
Configuration Management
๐ Troubleshooting
Issue 1: Cannot Access Web Interface
Symptoms: Browser shows connection failed or ERR_CONNECTION_REFUSED
Solutions:
Confirm gateway service is running:
Verify SSH port forwarding is correct:
Check firewall settings
Issue 2: Token Verification Failed
Symptoms: Web interface shows unauthorized: gateway token mismatch
Solutions:
Retrieve Token again:
Re-enter the correct Token in Web interface settings
Issue 3: Gateway Won't Start
Symptoms: Error when running openclaw gateway
Solutions:
Run health check:
Check port usage:
Check logs:
Issue 4: UI Assets Missing
Symptoms: Message shows Control UI assets not found
Solutions:
UI assets are automatically built when the container starts. If you encounter issues:
Manually build UI:
Check build logs:
๐ Additional Resources
Official Documentation
Homepage: https://openclaw.ai/
Documentation: https://docs.openclaw.ai/
Security Guide: https://docs.openclaw.ai/gateway/security
Control UI: https://docs.openclaw.ai/web/control-ui
Important Configuration File Locations
~/.openclaw/openclaw.json
Main configuration file
~/.openclaw/credentials/
OAuth credentials directory
~/.openclaw/workspace/
Workspace directory
~/.openclaw/agents/main/sessions/
Session data
/tmp/openclaw/openclaw-*.log
Runtime logs
/workspace/clawbot.log
Container initialization logs
/opt/openclaw/
OpenClaw installation directory
Security Recommendations
Run Security Audits Regularly:
Protect Token Security:
Do not share Token in public places
Rotate Token regularly
Configure Access Control:
Enable pairing mechanism
Set up allowlist
Enable mention gating
Principle of Least Privilege:
Only enable necessary tools and skills
Use sandbox environment
Keep secrets files in locations inaccessible to agent
๐ฆLet's start building a Feishu bot with openclaw now!
1. Create the Application
Visit the Feishu Open Platform.
Log in and click
Create Custom App.Fill in the App Name and Description.
Upload an App Icon.

2. Obtain Credentials
Navigate to the
Credentials & Basic Info page.Copy the
App ID(format:cli_xxx).Copy the
App Secret(keep this secure and do not leak it!).
3. Configure Permissions

Navigate to the Permission Management page and import the following configuration:
4. Enable Bot Capabilities
Go to
App Capabilities>Bot.Toggle on
Add Bot -> Enable.Configure the Bot Name.

5. Configure Event Subscription

Navigate to the
Event Subscriptionpage.Select Receive events via
persistent connection(WebSocket mode).

If you cannot connect in persistent connection mode for the first time,see this following tip:
6. Publish the Application

Go to the
Version Management & Releasepage.Createa version and fill in the details.Submit for Audit and Release.
Wait for administrator approval (Custom apps for internal use are often approved automatically).
7. OpenClaw Backend Configuration
Initialize configuration for
Channels -> FeishuStart the Gateway service:
Verify the connection:
Last updated
Was this helpful?