From krypton
Sets up, hardens, audits, and explains a Linux VPS as a Codex App SSH host for remote agent workflows on Ubuntu 24.04.
How this skill is triggered — by the user, by Claude, or both
Slash command
/krypton:krypton-vps-codex-appThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn a Linux VPS into the machine that does the work while the operator's Mac
Turn a Linux VPS into the machine that does the work while the operator's Mac only displays and controls it. The target result is a working Codex App SSH project where commands, edits, builds, tests, tmux/cmux sessions, dev servers, and agent runs happen on the VPS.
Do not describe this as installing Codex App on the VPS. Codex App stays on the operator's Mac or Windows machine; the VPS needs the Codex CLI and repo toolchain so the app can start the remote Codex app server through SSH.
Use the current OpenAI Codex docs for Codex App specifics when facts may have changed. The durable setup facts this skill relies on are:
~/.ssh/config.codex command must be available on the remote user's login-shell
PATH.Codex can prepare commands, inspect SSH config, audit the VPS, bootstrap tools over SSH when it has access, clone the repo, run checks, and explain failures.
The operator must provide or complete these human steps:
~/.ssh/config, or add the SSH alias manually.Start by repeating the setup goal in plain English:
You want the VPS to be the actual development machine. Codex App on the Mac
connects to it over SSH, and the repo, tools, agent sessions, builds, tests,
and dev servers run there.
Then ask this setup-state question first:
Do you already have a VPS with SSH access, or are we starting before the VPS is
created?
If the VPS does not exist yet, give a short purchase/bootstrap checklist: Ubuntu 24.04 LTS unless the repo needs something else, enough CPU/RAM/swap for builds and agent runs, SSH-key access, a non-root daily user, no public dev ports, and GitHub as source of truth. Then ask for the VPS IP, initial username, and public-key path once the VPS is ready.
If the VPS exists, ask for only the missing inputs needed for the next step:
.env, ignored config,
MCP files, package registry auth, or provider credentials that the VPS needs.If the user already gave enough, proceed without more questions.
Treat this as a development host, not production.
root, use it only for bootstrap and move the Codex
SSH alias to a non-root user before day-to-day work.~/.codex/auth.json, API keys, deploy keys,
SSH private keys, or provider tokens.Create or provide a concrete SSH alias on the Mac that runs Codex App. Do not
edit ~/.ssh/config silently; show the snippet and ask before writing unless
the user already asked Codex to make the edit.
Host krypton-vps
HostName 203.0.113.10
User dev
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
ServerAliveInterval 30
ServerAliveCountMax 3
Verify from the Mac:
ssh krypton-vps
On the VPS, install the repo's real toolchain. For a typical Ubuntu 24.04 agent box this means:
gitghcurljqpython3ripgrep (rg)build-essentialtmuxunzipcmux when the workflow uses itnodecorepackpnpmDo not guess a repo's install commands. Read README.md, package manager files,
and repo docs first.
The remote shell must find codex:
command -v codex
codex --version
For headless login, prefer:
codex login --device-auth
If device auth is unavailable, use the official fallback options. If copying
~/.codex/auth.json, treat it like a password and never expose its contents.
For troubleshooting, use codex doctor on the VPS. Do not manually expose
codex app-server for a normal Codex App SSH project; the app starts the remote
app server over SSH.
Before copying code, ask:
Do you want GitHub to be the source of truth for this VPS checkout? That is the
recommended path. It keeps code transfer clean, repeatable, and reviewable.
If yes, ask which GitHub access method the operator wants:
rsync/archive from the Mac: fallback for code not in GitHub; do not present
this as the default for active codebases.Never ask the user to paste a GitHub token into the chat or put a token in a Git remote URL. If token auth is unavoidable, use the official GitHub CLI or provider flow and avoid printing the token.
For private repos with GitHub CLI:
ssh krypton-vps
gh auth login
gh auth status
gh repo clone ORG/REPO ~/src/REPO
For SSH Git access:
ssh krypton-vps
ssh-keygen -t ed25519 -C "krypton-vps" -f ~/.ssh/github-krypton-vps
cat ~/.ssh/github-krypton-vps.pub
The operator adds the printed public key to GitHub. Then verify and clone:
ssh -T [email protected]
mkdir -p ~/src
git clone [email protected]:ORG/REPO.git ~/src/REPO
cd ~/src/REPO
For a read-only deploy key, add the public key under the single GitHub repo's Deploy keys with write access disabled. Use this only when the VPS needs to clone or pull, not push.
After clone, set the normal project path:
mkdir -p ~/src
git clone [email protected]:ORG/REPO.git ~/src/REPO
cd ~/src/REPO
Install dependencies using the repo's own commands. If the repo uses checked-in skills, hooks, MCP config, or local environment actions, keep them in the repo so Codex App sees the same project guidance remotely.
Treat code and local configuration as separate moves.
Ask before touching local config:
Do you want to recreate local config on the VPS from examples, copy selected
ignored files from this machine, or skip local config for now?
Recommended order:
.env.example, README setup, or
project docs.Safe copy pattern for selected local files:
rsync -av --chmod=F600,D700 .env.local krypton-vps:~/src/REPO/.env.local
Do not bulk-copy the whole home directory, .ssh, .codex, browser profiles,
node_modules, build outputs, caches, or private key files. Do not commit copied
local config. After copying, verify permissions and keep secrets out of terminal
summaries.
Optional stronger CLI proof before the app UI:
ssh krypton-vps 'cd ~/src/REPO && codex exec --ephemeral --sandbox read-only -C "$PWD" "Run pwd, hostname, whoami, command -v codex, codex --version, git status --short, and do not modify files."'
This proves the remote Codex CLI can complete a read-only turn. It does not replace the final Codex App remote-thread proof.
In Codex App on the Mac:
~/src/REPO.This is a user-operated app step unless the current Codex session has explicit desktop/app-control tools and the operator asks to use them. Do not pretend SSH alone completes the Codex App connection.
Proof prompt for the first remote thread:
Run pwd, hostname, command -v codex, codex --version, git status --short, and
do not modify files.
The result should show the VPS hostname, the remote repo path, a working Codex binary, and a clean or understood Git state.
Use SSH forwarding for local browser proof:
ssh -L 3000:127.0.0.1:3000 krypton-vps
Run the dev server on the VPS bound to localhost or the documented dev-host
address. Browse from the Mac at http://127.0.0.1:3000.
Use tmux for persistence and cmux for managing multiple agent sessions when the operator wants that workflow:
tmux new -s krypton
Keep the rule simple: Mac displays, VPS works, GitHub stores source, production stays separate.
When an SSH alias exists, run:
.codex/skills/krypton/krypton-vps-codex-app/scripts/audit-vps-codex-app.sh \
--host krypton-vps \
--repo-url [email protected]:ORG/REPO.git \
--repo-path ~/src/REPO
The script is read-only. It checks SSH reachability, Linux/Ubuntu details,
required command availability, whether codex is on the login-shell PATH,
basic auth-cache presence without printing secrets, GitHub repo reachability
when --repo-url is supplied, Git repo state, root-user risk, and common
agent-workflow tools. It does not prove the Codex App UI connection by itself;
finish with a real remote project thread.
~/.ssh/config on the Mac and
confirm ssh <alias> works outside the app.codex
is installed and visible in the remote login shell.codex doctor on the VPS.gh auth login,
a GitHub account SSH key, or a single-repo deploy key. Do not switch methods
without asking.Read references/setup-runbook.md when the user needs complete copy/paste setup
steps, a public-post checklist, or deeper troubleshooting.
npx claudepluginhub jturntdev/krypton --plugin kryptonManages VPS for autonomous dev environments: checks status via Supabase queries and health endpoints, connects projects via SSH, provisions new VPS.
Run coding agents (Codex CLI, Claude Code, OpenCode, Pi) as background processes with PTY support for programmatic control and monitoring.
Provisions and secures a Hetzner Cloud VPS with Docker, Nginx/Caddy, SSL, and monitoring for application deployment.