Set Up OpenAI Codex
Genie uses OpenAI Codex as its AI provider. This guide walks you through the onboarding flow to connect your OpenAI account to your Genie server.
Prerequisites
A Genie account with a running server
An OpenAI account with a ChatGPT subscription
Step 1: Start the Onboarding
Open the terminal in your Genie dashboard and run:
openclaw onboard --auth-choice openai-codex
Step 2: Accept the Security Notice
The onboarding wizard shows a security baseline notice. Read through the recommendations — pairing/allowlists, sandbox configuration, secrets management — then confirm with Yes to continue.

Step 3: Choose Onboarding Mode
Select QuickStart to use sensible defaults (you can fine-tune settings later with openclaw configure), or Manual for full control over every option.

Step 4: Handle Existing Config
If an existing configuration is detected, you will be asked how to proceed:
Use existing values — keep your current settings
Update values — modify specific fields
Reset — start fresh

Step 5: Authenticate with OpenAI
The wizard generates an OAuth URL. Since your server runs in a remote/VPS environment, you need to:
Copy the URL displayed in the terminal
Open it in your local browser (on your own machine, not the server)

Step 6: Consent in Browser
In your browser, you will see the OpenAI consent page. Review the details — Codex will be linked to your ChatGPT account and use your plan's rate limits. Click Continue.

Step 7: Copy the Redirect URL
After consenting, your browser redirects to a localhost URL. On a remote server, this will show a connection error — this is expected.
Copy the full URL from your browser's address bar (it contains the authorization code).

Step 8: Paste the Redirect URL
Go back to the Genie terminal. At the "Paste the redirect URL" prompt, paste the URL you copied and press Enter.

Step 9: Select Channel (Optional)
You will be asked to select a messaging channel for OpenClaw (Telegram, Discord, Slack, etc.). You can choose one now or select Skip for now — channels can be added later with openclaw channels add.

Step 10: Complete Onboarding
The wizard saves your configuration and runs through final checks:
Config is written to
~/.openclaw/openclaw.jsonWorkspace and sessions are verified
Skills status is displayed

You will see "Onboarding complete" and the OpenClaw gateway will start automatically.

Step 11: Set the Model
Run the following command to set OpenAI Codex as your active model:

Verifying the Connection
Go to Chat in your Genie dashboard
Send a prompt to Genie
If you receive a valid response, OpenAI Codex is connected and ready to use
Tips
The localhost connection error in Step 7 is expected on remote/VPS environments — just copy the URL from the address bar
You can reconfigure settings at any time with
openclaw configureChannel setup can be done separately via
openclaw channels addYour OpenAI plan's rate limits apply to all interactions through Genie
Last updated