---
title: "Deploying from AI coding agents — Claude Code, Codex, OpenCode and CI | Nodea"
description: "How to run an app built with a coding agent on Nodea: an instance with an SSH key and root, deployment over SSH, then restarts, firewall and DNS through API v1 and the MCP server."
url: "https://nodea.io/en/api-docs/ai-coding-agents"
lang: "en"
updated: "2026-11-13"
---

# Deploying from AI coding agents — Claude Code, Codex, OpenCode and CI | Nodea

> An app built with Claude Code, Codex, OpenCode or another agent runs on your own Nodea instance. You order the instance in the panel, the agent gets an SSH key and a token, deploys the app over SSH and manages the server through API v1 and the MCP server.

Nodea works with coding agents such as **Claude Code**, **Codex** and **OpenCode**, and with other popular harnesses (the tools that run an AI agent) and CI pipelines. The app you built with an agent is easy to run on our infrastructure, on your own instance with full root access: the agent deploys it over SSH and then manages the server through REST API v1 and the MCP server. This page walks through the whole path and says plainly what an agent cannot do.

## What you need

- An account in the [app.nodea.io](https://app.nodea.io/app) panel with your details and a billing method set up.
- An SSH key pair on the machine that runs the agent or CI. You add the public key in the panel or through the API.
- A personal token from the panel (Account → [API tokens](https://app.nodea.io/app/account/api-tokens)) with the scopes you need. The path on this page needs infra:read and infra:write; stopping an instance needs infra:delete, and a plan upgrade needs account:read and account:write.

## 1. Connect the agent to the MCP server

For Claude Code:

export NODEA\_TOKEN=… # token from the panel, do not commit it claude mcp add --transport http nodea https://app.nodea.io/mcp \\ --header 'Authorization: Bearer ${NODEA\_TOKEN}' claude mcp list # nodea: … ✔ Connected

The single quotes keep the variable name, not the token, in the Claude Code configuration. Claude Code substitutes the value at startup, so NODEA\_TOKEN must be set in the shell you start it from. Configurations for Codex, OpenCode and other clients are on the [MCP server](https://nodea.io/en/api-docs/mcp) page ("Coding agents" section). The agent gets exactly the permissions of the token. Irreversible actions need the confirm: true argument.

## 2. Order the instance in the panel

You order the instance in the panel, where you accept the terms and pay. The API does not create instances (POST /api/v1/servers answers 410). The order form: [app.nodea.io/app/compute/order](https://app.nodea.io/app/compute/order). Plans and prices are on the [CLOUD.NVMe](https://nodea.io/en/cloud-nvme), [CLOUD.SSD](https://nodea.io/en/cloud-ssd) and [CLOUD.HDD](https://nodea.io/en/cloud-hdd) pages.

In the form you choose the data centre, the OS image, the SSH key (from your profile or a pasted public key) and the billing: a subscription paid in advance, or hourly from the wallet with a 30% markup over the subscription. For hourly billing the wallet balance must cover 24 hours.

## 3. Read the instance address

Once created, the instance shows up in GET /api/v1/servers (the servers-list tool, details: server-get) with its IP address and SSH port. It boots with the SSH keys for the root user, so the agent logs in with the key right away.

## 4. Deploy the app over SSH

The instance does not take your own cloud-init, and a fresh system has no Docker. The agent or CI installs the runtime and the app over SSH. An example for an app with a compose.yaml file on Debian 13, Ubuntu 24.04 and Ubuntu 26.04:

# 1. Once, on a new instance: Docker with the Compose plugin, rsync and git ssh root@203.0.113.10 'apt-get update && apt-get install -y docker.io rsync git && { apt-get install -y docker-compose-v2 || apt-get install -y docker-compose; }' # 2. The app code, without git history, secrets and dependencies rsync -az --exclude .git --exclude .env --exclude node\_modules ./ root@203.0.113.10:/opt/app/ # 3. Start ssh root@203.0.113.10 'cd /opt/app && docker compose up -d --build'

Ubuntu ships the Compose plugin in the docker-compose-v2 package and Debian 13 in docker-compose; the first command installs whichever is available. Send the .env file with passwords separately, e.g. scp .env.production root@203.0.113.10:/opt/app/.env. The example does not use --delete: it would also remove files the app created on the server in /opt/app (e.g. uploads or data). Add it only if the app keeps its data outside that directory.

Instead of rsync you can fetch the code from a repository on the server:

ssh root@203.0.113.10 'git clone https://git.example.com/company/app.git /opt/app && cd /opt/app && docker compose up -d --build' # later deployments ssh root@203.0.113.10 'cd /opt/app && git pull && docker compose up -d --build'

A private repository needs a read-only deploy key on the server.

Components from the panel catalogue (web servers, PHP, databases) can also be installed with POST /api/v1/servers/{server}/components/{component}/install or the server-component-install tool. Docker is installed over SSH.

## 5. Protect the deployment with a snapshot

Before a risky change take a VM snapshot in the panel, on the instance page. You take and roll back snapshots in the panel; a rollback needs the account password and an e-mail confirmation.

## 6. Open ports and connect a domain

- If the instance runs the nodeaD agent firewall with a policy that drops incoming traffic, only SSH is open. Open the app ports (e.g. 80 and 443) with PUT /api/v1/servers/{server}/firewall and POST …/firewall/apply, or the server-firewall-update and server-firewall-apply tools (details on the [Servers](https://nodea.io/en/api-docs/servers) page).
- Add an A record for your domain through the DNS API or the dns-\* tools ([DNS](https://nodea.io/en/api-docs/dns) page). This works only when the domain zone is in Nodea DNS (panel: Domains → DNS zones). A zone hosted by another provider is changed there.

## 7. Manage the instance

- Start and restart: POST /api/v1/servers/{server}/vm/start and …/vm/reboot (infra:write); stop: …/vm/stop (infra:delete, in MCP with confirm: true).
- Upgrade to a higher plan: GET /api/v1/services/{service}/upgrade-options (the service-upgrade-options tool) lists the plans you can move to, with the surcharge for the rest of the period. POST /api/v1/services/{service}/upgrade with plan\_id (the service-upgrade tool) orders the change; with dry\_run: true it returns only the quote. {service} is the service number, not the server number. You find it in the panel under Services → All services: it is the number at the end of the service page address, e.g. app.nodea.io/app/account/services/123. The new plan applies once the surcharge is paid, and an administrator then increases the instance resources. Plan upgrades through the API work only for services billed by the new Nodea billing system. For a service billed by the old system the API answers 422 with the code billing\_v2\_required; in that case ask for the upgrade in a support ticket in the panel.
- SSH keys: POST /api/v1/ssh-keys (ssh-key-create). A key added to the profile is sent through the nodeaD agent to all your connected servers you manage; it cannot be limited to one instance.
- App monitoring: website monitors and heartbeats ([Websites](https://nodea.io/en/api-docs/websites) and [Heartbeats](https://nodea.io/en/api-docs/heartbeats) pages).

## What an agent cannot do

- Create or clone an instance. You order the instance in the panel.
- Pass its own cloud-init (user-data).
- Downgrade a plan.
- Take, roll back or delete a VM snapshot. You handle snapshots in the panel.
- Sign in through OAuth from a CLI client. Terminal clients use a personal token in a header.

There is no CLI, Terraform provider or OpenAPI specification either. The full endpoint reference is in this documentation, starting with the [API introduction](https://nodea.io/en/api-docs/overview).

### Does Nodea support Claude Code, Codex and OpenCode?

Yes. Each of them connects to the Nodea MCP server (https://app.nodea.io/mcp) with a personal token in the Authorization: Bearer header and deploys the app over SSH to your instance with root access. The same works with other harnesses (the tools that run an AI agent) that support MCP over HTTP and with CI pipelines.

### Can the agent create the instance itself?

No. You order the instance in the panel (app.nodea.io/app/compute/order), where you accept the terms and pay. The agent then reads its IP address through the API or MCP and takes over the deployment over SSH.

### How is an instance billed?

A subscription paid in advance, or hourly billing from the wallet with a 30% markup over the subscription. For hourly billing the wallet balance must cover 24 hours.

### Can I pass my own cloud-init (user-data)?

No. The instance boots with the SSH keys for root and an IP address. The rest (Docker, runtime, the app) is installed by the agent or CI over SSH after the first boot.

### How do I go back when a deployment fails?

Before deploying, take a VM snapshot in the panel, on the instance page. You roll a snapshot back in the panel too; it needs the account password and an e-mail confirmation.

## Related

- [Nodea MCP server — endpoint, authentication, OAuth discovery, tools | Nodea](https://nodea.io/en/api-docs/mcp)
- [Nodea API v1 — introduction: base URL, tokens, scopes, limits | Nodea](https://nodea.io/en/api-docs/overview)
- [Servers — API v1 and MCP | Nodea Documentation](https://nodea.io/en/api-docs/servers)
- [SSH Keys — API v1 and MCP | Nodea Documentation](https://nodea.io/en/api-docs/ssh-keys)
- [DNS — API v1 and MCP | Nodea Documentation](https://nodea.io/en/api-docs/dns)

---

Languages: [pl](https://nodea.pl/pl/dokumentacja-api/ai-coding-agents.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
