Installation & Setup
Install OpenClaw, configure your workspace, set up API keys, run your first conversation.
Time to get OpenClaw running on your machine. The installation is straightforward, but the configuration is where most people either set themselves up for success or create problems they'll fight for weeks. We're going to do it right.
OpenClaw installs globally via bun (or npm, but we use bun). The installation creates a workspace at ~/.openclaw/workspace/ โ this is where your agents live, where their memory files go, and where all their work happens. Think of it as your agent's office.
The configuration lives in openclaw.json at the root of your workspace. This is the control panel. It defines which AI provider you're using (Anthropic, OpenAI, etc.), your API keys, which tools are enabled, and how your agent behaves. Get this right and everything flows. Get it wrong and you'll be debugging mysterious failures.
API keys are the one thing that trips up newcomers. You need an API key from your AI provider โ Anthropic's Claude is the recommended default. This key goes in your config file or your environment variables. Never commit API keys to git. Never share them. Treat them like passwords, because that's what they are โ keys to a service that charges per use.
Your first conversation is going to feel different from ChatGPT. When you start OpenClaw for the first time and ask it to create a file, it will actually create that file on your filesystem. When you ask it to list your directory contents, it will run ls and show you the real output. This is not a simulation. Your agent is doing real work in a real environment.
Walkthrough
- 1Install OpenClaw globally:
bun install -g openclaw - 2Verify installation:
openclaw --version - 3Navigate to the workspace directory:
cd ~/.openclaw/workspace/ - 4Open
openclaw.jsonand set your AI provider (e.g., anthropic) and model (e.g., claude-sonnet-4-20250514) - 5Set your API key: either in
openclaw.jsonunderapiKeyor as an environment variableANTHROPIC_API_KEY - 6Start your first conversation:
openclaw chat - 7Ask your agent to create a test file: 'Create a file called hello.txt with the text Hello from OpenClaw'
- 8Verify the file was created:
cat ~/.openclaw/workspace/hello.txt
Checkpoint
OpenClaw is installed, configured with your API key, and you've had your first conversation where the agent created a real file on your filesystem.