logo
icon

Codex

OpenAI Codex CLI - an AI coding agent that runs in your terminal. Deploy as a persistent cloud workstation with Zeabur Terminal access.

PlatformZeabur
Deployed1
PublisherzeaburZeabur
Deployed1 times
PublisherzeaburZeabur
Created2026-03-30
Services
service icon
Minimum1 Core2 GB
Recommended2 Cores4 GB
Tags
AIDeveloper Tools

OpenAI Codex CLI

Codex is OpenAI's open-source AI coding agent that runs in your terminal. It can understand your codebase, propose changes, execute commands, and help you build software faster — all through natural language conversation.

This template deploys Codex as a persistent cloud workstation on Zeabur with a web-based terminal (ttyd) accessible from your browser.

Getting Started

  1. Deploy the template and wait for the service to start. Wait until the health check turns green before proceeding.
  2. Open the service URL in your browser (the domain bound to your service).
  3. Log in with username user and the password from the Instructions tab on the Zeabur dashboard.
  4. Sign in — run codex, then open https://auth.openai.com/codex/device in your browser and enter the one-time code shown in the terminal. See Codex Auth Docs.

Using API Key (Optional)

Instead of device code sign-in, you can set OPENAI_API_KEY in the Zeabur dashboard. Optionally set OPENAI_BASE_URL to use Zeabur AI Hub (e.g., https://hub.zeabur.com/v1).

Persistent Storage

All data under /home/node/ is persisted across restarts and redeployments.

Common Commands

CommandDescription
codexStart interactive Codex session
codex "describe task"Run Codex with a specific prompt
codex exec "task"Run non-interactively (for automation)
codex resumeResume a previous session
codex --versionCheck installed Codex version

Environment Variables

VariableRequiredDescription
OPENAI_API_KEYNoOpenAI API key (only needed if not using device auth)
OPENAI_BASE_URLNoCustom API endpoint (for Zeabur AI Hub)
WEB_TERMINAL_PASSWORDAutoPassword for web terminal login (auto-generated)
  • Minimum: 1 vCPU / 2 GB RAM
  • Recommended: 2 vCPU / 4 GB RAM

Changelog

2026-03-31 -- Initial Release

  • ttyd web terminal with password auth and device code sign-in
  • Homebrew and npm global packages persisted in volume
  • Resource requirements and domain binding