Codex AI: Remote Control Your Mac & VPS from iPhone
Learn how Codex AI integrates with your iPhone to remotely control your Mac and VPS via SSH. This guide covers setup, plugin installation, and managing projects from your mobile device.
Introduction

Codex is an AI coding agent that offers robust remote control capabilities, allowing developers to manage their local machines (Mac) and remote servers (VPS) directly from a mobile application. This integration streamlines development workflows by enabling continuous interaction with coding projects and server environments from anywhere.
Configuration Checklist
| Element | Version / Link |
|---|---|
| Language / Runtime | Not specified (assumed general coding environment) |
| Main library | Codex Desktop App |
| Required APIs | OpenAI Codex API (implied) |
| Keys / credentials needed | OpenAI account credentials, SSH keys for VPS, NordVPN (optional for region-locked plugins) |
Step-by-Step Guide
Step 1 — Connect Your iPhone to Codex Desktop
To enable remote control of your local machine, you need to link your iPhone to the Codex desktop application. This allows the mobile app to mirror and interact with your desktop environment.
- Open the Codex Desktop App.
- Navigate to
Settings(bottom left corner). - Click on
Codex mobileto display a QR code. - Open the ChatGPT app on your iPhone.
- Scan the QR code to establish the connection.
- Once connected, your iPhone will display the Codex interface, mirroring your desktop projects and chats.
Step 2 — Set up SSH Connections to Your VPS

Codex allows you to manage your Virtual Private Servers (VPS) directly from the mobile app via SSH connections. This is crucial for server administration and remote development.
- In the Codex Desktop App, go to
Settings. - Select
Connectionsfrom the left sidebar. - Click on the
SSHtab. - Click
+ Add SSH connection. - Select an existing SSH connection from the list (e.g.,
coolify,steveclaw) or add one manually. - In the connection details, ensure
Allow Codex apps signed into your account to use this deviceis toggled on.
Once configured, you can select this SSH connection within the Codex mobile app to interact with your VPS. For example, to check Docker status:
# Example command to check Docker status on the connected VPS
Donne moi le status actuelle du docker Coolify si tout va bien et tout est bien connecter?
# Codex will then execute commands like:
# docker network ls --format "table {{.Name}} {{.ID}}"
# docker ps --format "table {{.Names}} {{.Image}}"
# docker compose ls
# docker logs -f coolify --since 30m --tail 200
Step 3 — Configure Sandbox Settings for SSH Connections
For more control over how Codex interacts with your SSH connections, you can adjust sandbox settings. This is important for security and defining permissions.
- In the Codex Desktop App, go to
Settings. - Select
Hostand then the specific SSH connection (e.g.,coolify). - Under
Configuration, you can set theApproval policy(e.g.,On request,Never) andSandbox settings(e.g.,Read only,Full access).
Step 4 — Install Computer Use and Chrome Plugins

To enable Codex to control your local Mac applications and browser, you need to install specific plugins. Note that some plugins might be region-locked.
- If you are in a region where plugins like "Computer Use" and "Chrome" are not visible (e.g., Europe), use a VPN (e.g., NordVPN) to connect to a region like the United States.
# Example: Connect to a VPN (e.g., NordVPN) to access region-locked plugins # [Editor's note: command/code to verify in the official documentation] - In the Codex Desktop App, go to
Plugins. - Search for
Computer Useand clickInstall Computer Use. - Search for
Chromeand clickInstall Chrome. - Follow the prompts to install the Chrome extension in your browser.
Once installed, you can use the Codex mobile app to control your Mac's browser and other applications. For example, to open YouTube Music:
# Example command to open YouTube Music and play music on your Mac
Ouvre YouTube music et play my music avec computer use
# Codex will then use the 'dev-browser' skill to pilot the local interface.
# It will check if YouTube Music is open and use a 'Click' action to play music.
⚠️ Common Mistakes & Pitfalls
- Region-locked Plugins: Users in certain regions (e.g., Europe) may not see the "Computer Use" or "Chrome" plugins. Fix: Use a VPN to connect to a region like the United States to access and install these plugins.
- VPN Interference: Activating a VPN can sometimes disrupt existing connections between Codex and your local machine or VPS, leading to slower performance or disconnections. Fix: Be mindful of when and where you activate your VPN. If issues arise, try temporarily disabling the VPN or restarting Codex and your connections.
- Synchronization Delays: There might be slight delays in synchronization between the desktop app and the mobile app, especially when dealing with complex tasks or network latency. Fix: Allow some time for changes to propagate. If a task status isn't updating, try refreshing the mobile app or checking the desktop interface directly.
- Permission Management: Not setting appropriate
Approval policyandSandbox settingsfor SSH connections can lead to either excessive prompts for approval or unintended actions on your server. Fix: Carefully configure these settings based on your trust level and the sensitivity of the tasks you're performing. For critical operations,On requestapproval is recommended.
Glossary
Codex: An AI coding agent developed by OpenAI, designed to understand and generate code, and interact with development environments and systems.
SSH: (Secure Shell) A cryptographic network protocol for operating network services securely over an unsecured network. It's commonly used for remote command-line login and remote command execution.
VPS: (Virtual Private Server) A virtual machine sold as a service by an Internet hosting service. It runs its own copy of an operating system, and customers may have superuser-level access to that operating system instance.
Key Takeaways
- Codex offers seamless integration between desktop and mobile apps, allowing remote control of development environments.
- You can manage both your local Mac and remote VPS instances directly from the Codex mobile app.
- SSH connections enable robust interaction with remote servers, including executing commands and monitoring services.
- The "Computer Use" and "Chrome" plugins extend Codex's capabilities to control local applications and browser activities on your Mac.
- Project and chat synchronization between desktop and mobile ensures continuity in your workflow.
- Customizable sandbox settings provide control over permissions and approval policies for executed commands.
- The ability to multitask across different projects and environments from a single mobile interface significantly enhances productivity.
Resources
- Codex Chrome Extension: https://developers.openai.com/codex-chrome-extension
- AI Coding Course: https://codelynx.dev
*)
*Editor's note: The video mentions mlv.sh/formation-ai which redirects to codelynx.dev.)