Skip to content

OpenClaw

OpenClaw is a self-hosted agent gateway with a terminal UI and optional messaging channels. It is best run on a Linux VPS or macOS machine that stays available while the agent works.

Install

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

Start its onboarding flow after installation:

bash
openclaw onboard

QuickStart

In the onboarding wizard:

  1. Choose QuickStart.
  2. Choose the custom provider type that matches the route you want: openai for the OpenAI-compatible shape or anthropic for the Anthropic-compatible shape.
  3. Set base_url to https://api.nexoai.ma and enter sk-your-nexoai-key as the API key.
  4. Select an exact NexoAI model ID, such as claude-opus-4-8.
  5. Optionally connect a Telegram bot, or skip channels and use the terminal UI first.

When a version of the wizard asks for a versioned OpenAI API base rather than the gateway root, enter https://api.nexoai.ma/v1.

One transport per provider entry

NexoAI supports both API shapes, but each OpenClaw provider entry uses one transport. Start with openai-completions for models carrying the openai badge; add a second Anthropic-shaped entry only when you specifically need that wire format.

Manual configuration

OpenClaw reads JSON5 from ~/.openclaw/openclaw.json. Export your named NexoAI key in the environment used to start the gateway:

bash
export NEXOAI_API_KEY="sk-your-nexoai-key"

Merge this provider and agent selection into ~/.openclaw/openclaw.json:

json5
{
  agents: {
    defaults: {
      model: { primary: "nexoai/claude-opus-4-8" },
      models: {
        "nexoai/claude-opus-4-8": { alias: "NexoAI Opus" },
      },
    },
  },
  models: {
    mode: "merge",
    providers: {
      nexoai: {
        baseUrl: "https://api.nexoai.ma/v1",
        apiKey: "${NEXOAI_API_KEY}",
        api: "openai-completions",
        models: [
          {
            id: "claude-opus-4-8",
            name: "Claude Opus 4.8 via NexoAI",
          },
        ],
      },
    },
  },
}

The provider ID is nexoai, so OpenClaw refers to its models as nexoai/<model-id>. Add more entries to the provider's models array using exact IDs from the catalog.

Preserve the rest of your config

Merge the blocks above with existing agents, channels, and gateway settings. OpenClaw validates the complete schema and can refuse to start when unknown fields or malformed JSON5 are present.

Restart and verify

Apply the provider change and open the terminal UI:

bash
openclaw gateway restart
openclaw tui

Select nexoai/claude-opus-4-8, send a small prompt, and confirm usage on the named key in the NexoAI dashboard.

Browser access

Keep the Control UI on localhost for local use. On a server, put it behind nginx with SSL, restrict access, and use wss:// for its gateway connection. Do not expose an unauthenticated plain-HTTP dashboard to the internet.

allowInsecureAuth is local only

Use gateway.controlUi.allowInsecureAuth only for localhost compatibility. It is not a substitute for HTTPS or remote device authentication; use nginx plus SSL for remote browser access.

Next: configure OpenCode ->

Built for developers across MENA.