Skip to content
Projects built with AI tools3 min read

Codex hosting: run it on the server and deploy what it builds

Short answer

Codex runs on a hosting account with SSH, with no need for a VPS. You install Codex CLI in your home folder with an npm command, sign in with codex login --device-auth, then run it inside your project. The Codex app on your computer connects to the same server over SSH from its connection settings. What it builds runs in place: PHP, Node.js and Python on the AI and developer plans.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. What does Codex need to run on a server?
  2. Which plan do you need?
  3. How it runs on ArabyHost
  4. Deploying what it builds
  5. When do you really need a VPS?
  6. A short safety list
  7. On ArabyHost

OpenAI’s Codex is a coding agent that works from the terminal and from an app on your computer. To run it directly on your site, without your computer staying on and without moving files every time, a hosting account with SSH is enough.

What does Codex need to run on a server?

Requirement Why Here
SSH Codex CLI is a terminal program, and the app connects over SSH AI and developer plans
Node.js The npm install Node.js 24 is on the PATH
Write access inside your folder It installs into ~/.local without root Available
Outgoing HTTPS The model runs at OpenAI Available
A ChatGPT account or an API key To sign in From your own account

Which plan do you need?

The AI and developer plans, because they are the ones with SSH. The other plans have no SSH.

How it runs on ArabyHost

Codex CLI on the server

  1. Connect over SSH. If you have not set up your key yet, follow the SSH keys guide.
  2. Install: npm install -g @openai/codex@latest --prefix ~/.local
  3. Sign in: codex login --device-auth. It shows a link and a code to enter in your own browser.
  4. Check: codex login status, then run codex inside the project folder.
  5. Set permissions with /permissions. On a live site choose a mode that asks before running commands.

The Codex app over SSH

From Settings, then Connections, in the app, add an SSH connection: user and server, port, and your key file. The app runs the Codex installed on the server, so the first way must be complete and signed in.

Full commands and troubleshooting are in the guide to running Codex on the server.

Deploying what it builds

The project already sits where it will run, so nothing is moved:

  • PHP and Laravel: they run straight from the site folder.
  • Node.js and Python: you create the app once from Setup Node.js App or Setup Python App in cPanel, and Codex restarts it after each change.
  • Static sites and React: they are built, and the output goes into public_html.
  • One task without a session: codex exec "..." to run tests or summarise failures.

When do you really need a VPS?

  • Your project runs on Docker or needs root.
  • You want several agents and heavy builds running together. Your account has a memory and process limit.
  • You need PostgreSQL or Redis on the same server. What we offer is MySQL/MariaDB.
  • You need a direct connection to an external database port. Our outgoing connections are HTTPS only.

In those cases choose a VPS from a provider that offers one.

A short safety list

  • Do not put secrets in the conversation or in the code. They belong in .env and environment variables.
  • Try things on a test copy before the live site.
  • Only widen Codex’s permissions on a copy you can restore.

On ArabyHost

Codex runs over SSH on the AI and developer plans, and every account is isolated inside CageFS. Node.js 24 and Python 3.12 are ready on the path, and npm install -g installs inside your account, so EACCES errors do not appear. Backups are daily, and Claude Code works the same way if you want both.

Prices are fixed and shown in your currency on the pricing page, and the renewal price is the price you signed up at. Other tools are covered in vibe coding hosting.

FAQ

Do I need a VPS to run Codex on a server?

No. Codex CLI needs SSH, Node.js and write access inside your own folder, which a hosting account with SSH provides. A VPS is needed if you want Docker, root access or heavy resources.

Why does the Codex app connect to the server and drop within a second?

Because the codex command, or the node that runs it, is not on the path of the server's non-interactive shell. The command ssh myhosting 'command -v codex' must print a path. If it prints nothing, add the ~/.local/bin folder to PATH in ~/.bashrc.

Where is the sign-in stored?

In the file ~/.codex/auth.json on the server. Treat it like a password: do not copy it into a project or push it to Git. The Codex app uses the server's sign-in, not your computer's.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.