How to Install OpenClaw and Switch to GPT‑5.4 in Minutes

This step‑by‑step guide shows how to install OpenClaw using the official script or npm, verify the installation, configure the OpenAI provider and API key, choose between terminal or web UI, and manually switch the default model to GPT‑5.4 for immediate use.

AI Software Product Manager
AI Software Product Manager
AI Software Product Manager
How to Install OpenClaw and Switch to GPT‑5.4 in Minutes

Step 1: Install Prerequisites

Before initializing OpenClaw, install the core software. The official installation script is the easiest method.

Node.js 22+

macOS, Linux, or WSL2 (or an equivalent environment)

If building from source, also install pnpm Windows users are advised to run OpenClaw inside WSL2 for better stability of development tools and dependencies.

Installation prerequisites illustration
Installation prerequisites illustration

Step 2: Recommended Installation via Official Script

Run the official script; it automatically checks dependencies and starts the onboarding flow.

curl -fsSL https://openclaw.ai/install.sh | bash

For Windows PowerShell: iwr -useb https://openclaw.ai/install.ps1 | iex If you want to install without immediately entering the onboarding process, add the --no-onboard flag.

Step 3: Alternative npm Global Installation

If you already have a suitable Node.js environment, you can install OpenClaw globally with npm:

npm install -g openclaw@latest
openclaw onboard --install-daemon

This method is convenient for developers who already have Node installed.

Step 4: Post‑Installation Checks

After installation, run the following commands to confirm OpenClaw is usable:

openclaw doctor
openclaw status
openclaw dashboard

At minimum, execute openclaw doctor to ensure the basic environment has no missing components.

Step 5: Troubleshooting Missing Commands

If the openclaw command is not found, check these items:

Node.js version (must be 22+)

Global installation directory is in PATH Restart the terminal

On Windows, consider switching to WSL2

Step 6: Initialization Configuration

When you launch OpenClaw for the first time, it asks whether you are using it personally or for a shared team. Keep the default for personal use.

Select “Quick Start” to let OpenClaw generate a default configuration automatically.

Choose the model provider – select OpenAI .

Provider selection illustration
Provider selection illustration

Enter your OpenAI API key (format sk-xxxxxxxxxxxxxxxx). Keep the key private and never expose it in public repositories.

Step 7: Choose Model and Interaction Interface

Select an initial model; the guide uses gpt-5.3-codex. Later you will switch to openai-codex/gpt-5.4 because the default list does not yet include GPT‑5.4. gpt-5.3-codex You can skip optional message‑notification and skill‑configuration steps.

Note the location of the configuration file: ~/.openclaw/openclaw.json Choose the interaction UI. Options are: TUI: terminal UI, ideal for developers who work in the command line. Web UI: browser UI, accessed at http://127.0.0.1:18789/.

The guide proceeds with the TUI because it aligns with typical developer workflows.

When navigating the TUI, selections are made with the space bar , not the Enter key.

Step 8: Verify Initialization

After completing the above steps, OpenClaw enters chat mode. Send a simple query to confirm that the API key, provider, and basic communication chain are functional.

Step 9: Manually Switch to GPT‑5.4

Run the following command to re‑authenticate with the OpenAI Codex provider: openclaw onboard --auth-choice openai-codex After the login flow finishes, set the default model to GPT‑5.4:

openclaw config set agents.defaults.model.primary "openai-codex/gpt-5.4"

Restart OpenClaw and ask “What model are you?”. The response should be gpt-5.4, confirming the switch.

Step 10: Optional Web UI Usage

If you prefer a graphical interface, open http://127.0.0.1:18789/ in a browser.

If the UI asks for a gateway token, locate gateway.auth.token in the configuration file and paste it into the input field.

After connecting, you can chat via the web interface, which is more intuitive for non‑technical users or demo scenarios.

Conclusion

By completing the standard OpenClaw initialization with the OpenAI provider and then updating the default model to openai-codex/gpt-5.4, you can use the newest model immediately without waiting for an official update, enabling rapid experimentation with GPT‑5.4 capabilities.

CLIConfigurationAI modelInstallationWeb UIOpenClawGPT-5.4
AI Software Product Manager
Written by

AI Software Product Manager

Daily updates of Xiaomi's latest AI internal materials

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.