OpenAI Codex CLI · Always on · Root access

Codex VPS A server where Codex stays signed in and keeps working

A Linux VPS for the OpenAI Codex CLI. Install it with one command, sign in with a device code from the browser on your own device, and let it work inside tmux while your laptop is switched off. Private KVM server with full root, its own IP address and reserved memory. The 4 GB plan starts at $14.99₹1,389.27 a month, billed monthly.

Codex VPS plans

The install notes in the Codex repository list 4 GB of RAM as the minimum and 8 GB as recommended. Start at 4 GB for one session, or 8 GB if builds and tests run on the same server. Billed monthly, with no long contract.

Compute Region

Choose the deployment location
Currently out of stock

Codex VPS plans · Miami

Miami, Florida · AMD EPYC KVM VPS with full root access and a choice of 15 Linux builds
Plan vCPU Memory Storage Bandwidth Setup Price
4GB Plan Recommended 4 vCPU 4 GB 80 GB SSD 5 TB Instant $14.99/mo₹1,389.27/mo Buy Now
6GB Plan 4 vCPU 6 GB 100 GB SSD 5 TB Instant $19.99/mo₹1,852.67/mo Buy Now
8GB Plan 6 vCPU 8 GB 100 GB SSD 5 TB Instant $29.99/mo₹2,779.47/mo Buy Now
16GB Plan 8 vCPU 16 GB 100 GB SSD 5 TB Instant $59.99/mo₹5,559.87/mo Buy Now
Choose Ubuntu 24.04 on the order form. The Codex install notes list Ubuntu 20.04 and newer and Debian 10 and newer.

What a server gives Codex that a laptop cannot

Most people asking about Codex on a VPS want two things: a machine that stays on, and a sign-in that works without a screen. This covers both.

Work continues after you log off

Start Codex inside tmux and disconnect. The session stays open on the server, so a long refactor or test run is not cut short when your Wi-Fi drops or the laptop goes to sleep.

Sign in without a browser

A server has no browser to open. Codex has a device code login for that case, plus an SSH port-forward fallback. Both are shown step by step below.

Use it from the ChatGPT desktop app

The ChatGPT desktop app can connect to an SSH host. Once Codex is installed and signed in here, the app on your computer can run tasks on this server.

A separate machine for the agent

Codex runs commands and edits files. On a VPS it can reach only the repository and tools you put there, while your own documents and saved logins stay at home.

An address that does not change

Each server has its own IPv4 address. Add it to a database allow list, point a test domain at it, or open the app Codex just built at the same address tomorrow.

Start over in minutes

If the agent leaves the system in a mess, reinstall the operating system from the client area and begin again. Reboot is there too, and neither needs a support ticket.

Install Codex on a VPS and sign in, step by step

The part people get stuck on is step 5, signing in on a machine with no browser. The Codex commands below are the ones in OpenAI's documentation.

  1. 1

    Order a 4 GB or 8 GB plan with Ubuntu 24.04

    Press Buy Now on a plan above and pick Ubuntu 24.04 on the order form. The server is created automatically once the payment is confirmed. Its IP address and root password are sent to you by email.

  2. 2

    Connect by SSH and add a normal user

    Log in as root one time, make an everyday user for the agent and switch to it. OpenAI's advice for SSH hosts is least-privilege accounts, and this is the simple version of that. Put your own address in place of YOUR_SERVER_IP.

    ssh root@YOUR_SERVER_IP
    adduser dev
    usermod -aG sudo dev
    su - dev
  3. 3

    Install tmux, git and the sandbox helper

    tmux keeps the session alive when you disconnect. bubblewrap is the package Codex uses for its sandbox on Linux.

    sudo apt update && sudo apt install -y tmux git
    sudo apt install bubblewrap
  4. 4

    Install the Codex CLI

    This is the official installer from OpenAI.

    curl -fsSL https://chatgpt.com/codex/install.sh | sh

    If you already use Node.js, npm install -g @openai/codex installs the same tool.

  5. 5

    Sign in with a device code

    First, on your own computer, open the security settings of your ChatGPT account and enable device code login. Then run the command below on the server and approve the sign-in from the browser on your laptop or phone. OpenAI lists this login as beta.

    tmux new -s codex
    codex login --device-auth

    No device code option on your account? Use the port-forward method in the sign-in section further down this page.

  6. 6

    Clone a project and start Codex

    Bring a repository onto the server, enter its folder and start the agent. To leave it running, press Ctrl+B and then D to step out of tmux, and close the terminal.

    git clone https://github.com/you/your-project.git
    cd your-project
    codex
  7. 7

    Return to the same session later

    From any device with an SSH client, log in again and attach. Everything is where you left it.

    ssh dev@YOUR_SERVER_IP
    tmux attach -t codex

Reaching Codex on the server: what works and what does not

There are three ways people try to reach a remote Codex. Two of them work with a Linux VPS. One does not, and it is better to know that before you order.

Based on OpenAI's remote connections documentation as of November 2026.
Way to reach CodexLinux VPSWhat it needs
SSH and tmux from a laptop, tablet or phoneAny SSH client. You type in the real Codex terminal, and tmux holds the session between visits.
ChatGPT desktop app, "Connect to an SSH host"The app on your own computer. On the server, codex must be installed, signed in and on the PATH.
Phone control with QR pairingA host that runs the ChatGPT desktop app on macOS or Windows. OpenAI states that you cannot set it up from the Codex CLI.
Keep the server private. For SSH hosts, OpenAI recommends trusted keys, least-privilege accounts and no unauthenticated public listeners. In plain words: switch to SSH key login once the server is set up, do not run the agent as root, and do not leave an open port on the internet that anyone can talk to.

Which plan for which kind of Codex work

The 4 GB and 8 GB rows follow the install notes in the openai/codex repository as of November 2026. The 16 GB row is VPSLake's suggestion.
What you runPlan to pickWhy
One Codex session on a script, API or small web project4 GBThe minimum in the Codex install notes. Room for the agent, git and a light test run.
Daily work with builds, a dev server and tests beside the agent8 GBThe recommended figure in the same notes. Compilers and test runners take memory of their own.
Several sessions, Docker containers and a database16 GBOur own suggestion for a full stack that stays up all day next to the agents.
Bots, cron jobs and small scripts with no coding agent1 GB or 2 GBFine for light programs. Below the 4 GB minimum listed for Codex.

What a Codex VPS is

A Codex VPS is a rented Linux computer in a datacenter with the OpenAI Codex CLI installed on it by you. Your code, your tools and the agent sit on that computer. You reach it over SSH, give Codex a task and leave. Each VPSLake plan is a private KVM virtual machine with reserved memory, SSD storage, full root access and one dedicated IPv4 address.

It is a good fit if you give Codex jobs that take longer than you want to sit and watch, if you work from more than one device, or if you would rather not let an agent run commands on your personal computer. It is not for everyone. If you only use Codex in short bursts at your desk, your laptop does the job and a server is money you do not need to spend. And if what you want most is OpenAI's phone control, that needs a Mac or Windows computer running the ChatGPT desktop app, not a Linux server.

What we set up and what you do yourself

We hand over a clean server with the operating system you chose, a root password and a fixed IP. Codex is not preinstalled and there is no one-click installer. That is on purpose: you run OpenAI's installer and get the current release. We do not sell ChatGPT plans or API credit. For anything on the server side, such as SSH access, a reboot or a reinstall, support answers by ticket, WhatsApp and Telegram seven days a week.

Signing in without a browser: all four ways

Codex normally signs in through a browser window, and a VPS does not have one. OpenAI documents four ways around that.

1. Device code login. Enable device code login in your ChatGPT security settings, then run this on the server. It is the method used in the setup steps, and OpenAI marks it as beta.

codex login --device-auth

2. SSH port forward. Open the SSH connection from your laptop with port 1455 forwarded, then run the normal login in that session and finish it in the browser on your laptop. Replace user@remote with your own user and server address.

ssh -L 1455:localhost:1455 user@remote
codex login

3. Copy the login file. If Codex is already signed in on another machine, copy ~/.codex/auth.json from there to the same path on the server. Treat that file like a password.

4. API key. To pay per use with an OpenAI API key instead of a ChatGPT plan, put the key in the OPENAI_API_KEY variable and pass it in:

printenv OPENAI_API_KEY | codex login --with-api-key

Accounts, limits and what the server does not do

Codex works with a ChatGPT plan or with an API key billed at API rates. OpenAI's pricing page lists the plans as Free, Go, Plus, Pro, Business and Enterprise/Edu, as of November 2026. How much you can use Codex is decided by that account. A bigger server does not raise it.

The VPS has no GPU. Codex sends its requests to OpenAI's models over the internet, and the server runs the agent, your builds and your tests. It cannot run a large AI model locally, and it does not need to for this job.

Desktop apps, Windows and other agents

The desktop app for Codex is now called the ChatGPT desktop app. With a Linux VPS you keep the app on your own computer and use its "Connect to an SSH host" feature. OpenAI also has a Linux build of the app in preview for Ubuntu 24.04 and 26.04 LTS, Debian 13, Fedora 43 and 44, and Arch. That build needs a graphical desktop, which a plain VPS does not have. Our Ubuntu RDP gives you an Ubuntu desktop you open with Remote Desktop. Phone control still needs macOS or Windows, and we have not tested it on our Windows RDP for AI coding plans, so do not order one for that reason alone.

The same server suits other terminal agents. See Claude Code VPS for Anthropic's tool and OpenCode VPS for the open source one.

Where the servers are

Pick the location in the plans table: Miami, Florida, Frankfurt, Germany or Amsterdam, The Netherlands. Codex does its work on the server and only text comes back to your screen, so distance matters little. Choose the place nearest to you for a snappier terminal, or nearest to your users if the app will also be hosted there. If you move up a plan later, your files stay and the server needs one reboot.

Codex and ChatGPT are products of OpenAI. VPSLake is an independent hosting provider and is not affiliated with OpenAI.

Pay the way you already pay

  • USDT, BTC & 20+ coinsvia Cryptomus
  • UPI / PhonePe / PaytmINR via Razorpay
  • Visa / Mastercardvia Paddle
  • Net banking & walletsIndia

Frequently Asked Questions

Yes. The Codex CLI is a terminal program, and the install notes in its repository list Ubuntu 20.04 and newer and Debian 10 and newer. You connect by SSH, run the official install command and sign in. It does not need a desktop or a screen.
Run codex login --device-auth on the server. Device code login means the approval happens in the browser on your own laptop or phone, not on the server. OpenAI marks it as beta, and you have to enable device code login in your ChatGPT security settings before the command will work.
OpenAI documents three other routes. Forward the login port from your laptop with ssh -L 1455:localhost:1455 user@remote and then run codex login, copy the file ~/.codex/auth.json from a machine where you are already signed in, or sign in with an API key using printenv OPENAI_API_KEY | codex login --with-api-key.
The install notes in the Codex repository say 4 GB minimum and 8 GB recommended. The 4 GB plan is the smallest one we suggest and fits one session on a normal project. Take 8 GB if builds, tests or Docker containers run on the same server.
No. You receive a clean Ubuntu or Debian server with root access and run OpenAI's own install command yourself. It is one line, and it gives you the version OpenAI ships today instead of an old copy baked into an image.
No. We rent you the server only. Codex needs your own ChatGPT plan or an OpenAI API key, and API keys are billed by OpenAI at API rates. Any usage limits belong to your OpenAI account, not to the server.
Not with OpenAI's phone control feature. That feature works only for hosts running the ChatGPT desktop app on macOS and Windows, and it cannot be set up from the Codex CLI. On a Linux VPS, use an SSH app on the phone and attach to your tmux session, or drive the server from the ChatGPT desktop app on your computer.
Yes. The ChatGPT desktop app has a "Connect to an SSH host" feature. The server needs codex installed, signed in and on the PATH, which is exactly what the setup steps on this page leave you with. The app runs on your computer and the work happens on the server.
Yes, if you start it inside tmux. tmux is a small program that keeps a terminal session alive on the server when your SSH connection ends. Log in again later, run tmux attach -t codex, and you are back in the same session.
Yes. Use the currency button in the menu to switch the prices to INR, then pay by UPI, PhonePe or net banking. Crypto and cards are accepted too. The servers are in the USA and Europe, and billing is monthly with no long contract.

Give Codex a server of its own

Order a 4 GB or 8 GB VPS, run one install command, sign in with a device code and leave the agent working. Billed monthly, cancel when you like.

Related solutions