Skip to content

OpenAI Codex
on Linux

OpenAI's coding agent for your terminal: open Bash scripts, official sources only

Codex CLI reads, edits and runs code in your project from the terminal, using your ChatGPT plan or an OpenAI API key.

Run this command on your server

$curl -fsSL https://infrawire.sh/i/codex | bash
  • Tested on 10 distributions
  • Official installer
  • x86_64 and arm64

What the script does

  • Node.js 24 LTS (official build from nodejs.org, SHA-256 verified) if missing or older than 20
  • The official @openai/codex package from npm, in ~/.local (no global root install)
  • The codex command on your PATH
  • Optional: sign-in with your API key (--api-key)

After installation

# Reload your shell
$ source ~/.bashrc
# Start Codex in a project
$ cd ~/my-project && codex
# Sign in with ChatGPT from a headless server
$ codex login --device-auth

Options

Pass options after bash -s --, for example:

$ curl -fsSL https://infrawire.sh/i/codex | bash -s -- --api-key sk-...
--api-key sk-...Sign in with an OpenAI API key right away
--version x.y.zPin a specific Codex version (default: latest)
--user NAMEInstall for another Linux user (as root)
--yesFully non-interactive

Review before running

The script is plain Bash. Download it, read it, then run it:

$ curl -fsSL https://infrawire.sh/i/codex -o install.sh
$ less install.sh
$ bash install.sh

On Alpine, run apk add bash curl first.

Other apps

Every app comes with a tested installer, a step-by-step guide and the commands to get started.

AI Agents

OpenClaw

Open-source personal AI assistant

Your own AI assistant running 24/7 on your server. Chat with it from WhatsApp, Telegram, Discord, Slack and more, with the model of your choice.

infrawire.sh/i/openclaw Installation guide
AI Agents

Hermes Agent

Self-improving AI agent by Nous Research

An autonomous agent that learns from its tasks, keeps memory across sessions and runs 24/7 on your server, reachable from Telegram, Discord, Slack and more.

infrawire.sh/i/hermes-agent Installation guide
AI AgentsDeveloper Tools

Claude Code

Anthropic's agentic coding tool for your terminal

Claude Code reads your codebase, edits files, runs commands and handles git workflows from the terminal. Ideal on a remote development server.

infrawire.sh/i/claude-code Installation guide
AI AgentsDeveloper Tools

Gemini CLI

Google's open-source AI agent for the terminal

Gemini CLI brings Gemini models to your terminal: code, search, file and shell tools, with a generous free tier using a Google account or an API key.

infrawire.sh/i/gemini-cli Installation guide
AI AgentsDeveloper Tools

OpenCode

Open-source AI coding agent, any model

OpenCode is a terminal coding agent that works with Claude, GPT, Gemini, local models and 75+ providers. Bring your own keys or subscription.

infrawire.sh/i/opencode Installation guide
Self-hostedAI Agents

n8n

Workflow automation with AI, self-hosted

Connect 400+ apps and build AI agents with a visual editor. Your own n8n with HTTPS, persistent data and webhooks ready to use.

infrawire.sh/i/n8n Installation guide
Self-hosted

Vaultwarden

Lightweight Bitwarden-compatible password manager

Host your own password vault and use it from the official Bitwarden apps and browser extensions. Light enough for the smallest VPS.

infrawire.sh/i/vaultwarden Installation guide
Self-hosted

Nextcloud

Your own cloud: files, calendar, contacts

Sync files across your devices, share them, and keep calendars and contacts on a server you control. Production setup with MariaDB, Redis and cron.

infrawire.sh/i/nextcloud Installation guide

Need a server?

Linux VPS and dedicated servers, ready for these installers in minutes, with full root access.

See VPS plans

Frequently asked questions

Everything you need to know before running an installer.

Yes. The scripts are free and open: you can read them at any time. Some apps may require their own account or subscription, for example an API key for your AI model.

The scripts are served over HTTPS and only download software from official sources. If you prefer, download the script first, read it, then run it: each app page shows how.

Ubuntu 22.04 and 24.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9, Fedora, Arch Linux, openSUSE and Alpine, on x86_64 and arm64. On Alpine, install bash and curl first.

You need root or sudo to install system packages. Run the command with sudo and the app is installed for your own user, not for root.

It installs the missing prerequisites with your package manager, then the app itself, and adds its command to your shell's PATH. Everything is written to a log file in /tmp.

Yes, they work on any Linux server. If you need one, Infrawire offers Linux VPS and dedicated servers ready in minutes.

Custom install · OpenAI Codex

Fill in only what you need: empty fields keep the default. The command updates as you type.

From platform.openai.com/api-keys.

Leave empty for the default.

Install for this user instead of you (requires root).

Your command

$curl -fsSL https://infrawire.sh/i/codex | bash

Values never leave your browser. Passwords and keys you add here end up in your shell history: run the command with a leading space, or use the generated value from the installer's output instead.

Linux VPS and dedicated servers on 3 continents, with 24/7 expert support.

View VPS plans