Sign up and create a workspace
- Go to the Sign up page and create your account.
- Add your organization name and confirm your email.
- Create your first workspace and project.
NEXUS AI docs for deploying full-stack apps: CLI, databases, workers, volumes, buckets, backups, restores, secrets, and cloud providers.
Create a workspace and ship your first deployment.
Generate code once, review it, then deploy it as a container.
Chat with an AI to build an app, watch it render live, edit it, and deploy — all in one dashboard flow.
A persistent chat session with a live local preview, distinct from one-shot "Deploy from Prompt."
Preview is fully local. No code is sent to a third-party sandbox or CDN.
The AI sees attached images and uses them to build or fix the design.
Bring existing source files into a builder project, or start a new project from them. Every file is type-detected and syntax-checked before it is added.
The builder can generate Next.js + Prisma apps in addition to React single-page apps.
MCP tools bridge chat-based coding and the builder preview, so you can see the app running before any deploy.
"Push this app to my NEXUS AI builder so I can preview it"
# -> nexusai_builder_push { projectId, files, note }
# <- https://nexusai.run/projects/<projectId>/builder"Pull the current files from my builder session"
# -> nexusai_builder_pull { projectId }"Deploy from Prompt" generates code once and deploys it in a single pass. The AI App Builder is a persistent session: you iterate conversationally, review a live preview after every turn, edit code directly, revert to earlier versions, and deploy only when you are ready.
Not yet in v1. React single-page apps preview live; Next.js + Prisma apps get a mock-data preview plus a real managed database at deploy time. Other frameworks are a planned follow-up.
Yes. Deploying does not end the session. Continue chatting to make changes, then redeploy to update the live app.
Creating a brand-new repository requires the GitHub App to have Administration:write, and pushing requires Contents:write on the target repo. Creating a repo under a personal GitHub account is not supported by installation tokens; push to an existing repo, or install the app on an organization.
On the Free plan, generated Next.js apps include a small "Powered by NEXUS AI" badge linked back to NEXUS AI. Paid plans do not have a badge.
The database is preserved. "Fix with AI" redeploys with the same managed database attached, so you are not charged for or left with a duplicate database.
It sees them. Attachments are sent to the model as vision inputs, so it reads layout, colors, spacing, and text from the image itself. That is why "make it look like this" with a pasted mockup works.
No. Clicking an element captures a short description (tag, classes, visible text, a trimmed HTML snippet, and ancestor path) that is added to your message. The preview itself stays local in a sandboxed iframe.
Builder sessions are backed by an AI provider so you can continue iterating in the builder UI. Add a provider in the dashboard under AI Providers, then retry the push.
No. The preview runs entirely in the browser of whoever opens the builder link. Nothing deploys and no infrastructure is provisioned until you explicitly deploy.
Yes. Upload up to 20 text source files at a time (500 KB each, 2 MB per upload) into an existing project, or start a new project from them. Each file is type-detected and syntax-checked in your browser before it is added, and an HTML site previews instantly.
JavaScript, JSX, TypeScript, TSX, CSS, JSON, HTML, SVG, XML, and YAML. HTML checks cover inline scripts and styles and stray, misnested, or unclosed tags. Other text files are accepted without a check, and binary files such as images are rejected.
Yes. Choose "Add and fix with AI" in the upload dialog. The AI fixes only the reported syntax errors in the uploaded files, then the builder checks those files again and marks anything that remains in the Code tab.
Comprehensive REST API guide for end users, including authentication, deployment flows, and practical examples.
Use `/api` as the base path and choose the auth type based on the endpoint family.
export NEXUS_API_BASE="https://nexusai.run/api"
export NEXUS_JWT="YOUR_JWT_FROM_LOGIN"
export NEXUS_TOKEN="nxk_YOUR_ACCESS_TOKEN"curl -s "$NEXUS_API_BASE/projects" \
-H "Authorization: Bearer $NEXUS_JWT"curl -s "$NEXUS_API_BASE/gpt/providers" \
-H "Authorization: Bearer $NEXUS_TOKEN"{
"success": true,
"data": { ... }
}curl -s "$NEXUS_API_BASE/openapi.yaml"Register or login, then reuse the JWT for project, deployment, secrets, GitHub, and database APIs.
curl -s -X POST "$NEXUS_API_BASE/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "your-password"
}'curl -s "$NEXUS_API_BASE/auth/verify" \
-H "Authorization: Bearer $NEXUS_JWT"const api = async (path, options = {}) => {
const res = await fetch(`${NEXUS_API_BASE}${path}`, {
...options,
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${NEXUS_JWT}`,
...(options.headers || {}),
},
});
return res.json();
};
const projects = await api('/projects');Create scoped access tokens for machine workflows such as GPT actions and runtime secret retrieval.
GPT automation:
deployments:create, deployments:read, deployments:logs, deployments:delete
Runtime secrets fetch:
secrets:read (or secrets:read:values if values are required)curl -s "$NEXUS_API_BASE/gpt/deployments" \
-H "Authorization: Bearer $NEXUS_TOKEN"curl -s "$NEXUS_API_BASE/secrets/runtime?includeValues=false" \
-H "Authorization: Bearer $NEXUS_TOKEN"Use OAuth for NexusAI as a ChatGPT App so each user connects with tenant-scoped identity.
Authorization URL: https://nexusai.run/oauth/authorize
Token URL: https://nexusai.run/api/oauth/token
User info URL: https://nexusai.run/api/oauth/meOAUTH_CLIENT_ID=<chatgpt_client_id>
OAUTH_CLIENT_SECRET=<chatgpt_client_secret_optional_for_public_client>
OAUTH_REDIRECT_URIS=<comma-separated-allowed-callback-urls>
OAUTH_ISSUER=https://nexusai.run
OAUTH_SIGNING_SECRET=<strong-random-secret>curl -s -X POST "https://nexusai.run/api/oauth/token" \
-H "Content-Type: application/json" \
-d '{
"grant_type":"authorization_code",
"client_id":"<client_id>",
"code":"<authorization_code>",
"redirect_uri":"<redirect_uri>",
"code_verifier":"<pkce_verifier_if_used>"
}'curl -s "https://nexusai.run/api/oauth/me" \
-H "Authorization: Bearer <oauth_access_token>"Create and manage projects, then use the projectId for deployment APIs.
curl -s -X POST "$NEXUS_API_BASE/projects" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "my-api",
"description": "Customer API",
"framework": "Express",
"vaultEnvironment": "Development",
"repoUrl": "https://github.com/acme/my-api",
"gitBranch": "main"
}'curl -s "$NEXUS_API_BASE/projects" -H "Authorization: Bearer $NEXUS_JWT"
curl -s "$NEXUS_API_BASE/projects/<projectId>" -H "Authorization: Bearer $NEXUS_JWT"curl -s -X PUT "$NEXUS_API_BASE/projects/<projectId>" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"gitBranch":"main","vaultEnvironment":"Staging"}'Use simple deploy, full deploy, logs, lifecycle actions, and redeploy templates.
Yes. Open the deployment details page, use CLI nexus deploy auto-destroy, call REST PATCH /api/deployments/:id/auto-destroy, or use MCP tool nexusai_deploy_auto_destroy. Updating auto-destroy changes the cleanup timestamp only and does not restart, rebuild, or redeploy the app.
Yes. You can extend or reduce the auto-destroy timestamp as long as the new time is at least 5 minutes in the future. To remove the schedule entirely, set autoDestroyAt to null.
Yes. Stop performs a soft stop: containers, attached volumes, and network configuration are preserved. Start rehydrates the same configuration without rebuilding the image. The same recovery runs automatically if the host reboots. Delete is the only action that removes volumes and reserved ports.
Connect the GitHub App, list repos, create bindings, and trigger manual deployments.
curl -s "$NEXUS_API_BASE/github/install/start?format=json&redirectPath=/github" \
-H "Authorization: Bearer $NEXUS_JWT"curl -s "$NEXUS_API_BASE/github/repos?installationId=<installationId>" \
-H "Authorization: Bearer $NEXUS_JWT"curl -s -X POST "$NEXUS_API_BASE/github/bindings" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{
"installationId":"<installationId>",
"repoId":"123456789",
"owner":"acme",
"name":"my-api",
"fullName":"acme/my-api",
"defaultBranch":"main",
"allowedBranches":["main","prod"],
"autoDeploy":true,
"runtimeTarget":"cloudrun",
"servicePort":3000,
"buildMode":"auto"
}'curl -s -X POST "$NEXUS_API_BASE/github/bindings/<bindingId>/deploy" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"branch":"main"}'
curl -s "$NEXUS_API_BASE/github/deployments?page=1&limit=30" -H "Authorization: Bearer $NEXUS_JWT"
curl -s "$NEXUS_API_BASE/github/webhook-deliveries?page=1&limit=50" -H "Authorization: Bearer $NEXUS_JWT"Query and manage deployment-attached databases from the Databases tab APIs.
curl -s "$NEXUS_API_BASE/deployments/<deploymentId>/databases" \
-H "Authorization: Bearer $NEXUS_JWT"
curl -s -X POST "$NEXUS_API_BASE/deployments/<deploymentId>/databases/<serviceId>/connection" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"format":"uri"}'curl -s "$NEXUS_API_BASE/deployments/<deploymentId>/databases/<serviceId>/browse/schema" \
-H "Authorization: Bearer $NEXUS_JWT"
curl -s -X POST "$NEXUS_API_BASE/deployments/<deploymentId>/databases/<serviceId>/browse/query" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{
"query":"SELECT * FROM users ORDER BY created_at DESC LIMIT 10",
"params":[]
}'curl -s -X POST "$NEXUS_API_BASE/deployments/<deploymentId>/databases/<serviceId>/restart" -H "Authorization: Bearer $NEXUS_JWT"
curl -s -X POST "$NEXUS_API_BASE/deployments/<deploymentId>/databases/<serviceId>/rotate-credentials" -H "Authorization: Bearer $NEXUS_JWT"
curl -s "$NEXUS_API_BASE/deployments/<deploymentId>/databases/<serviceId>/metrics" -H "Authorization: Bearer $NEXUS_JWT"200/201/202: Request succeeded. 400: Invalid input or missing required fields. 401: Missing/invalid token. 403: Permission/scope blocked or account setup required. 404: Resource not found. 409: Duplicate/conflict (for example existing resource). 429: Rate limit reached. 500: Unexpected server error.
Some authenticated endpoints require verified email and payment setup. Example 403 payloads include: - code: EMAIL_NOT_VERIFIED - code: PAYMENT_METHOD_REQUIRED
Use this checklist: 1. Confirm base URL includes /api. 2. Confirm token type matches endpoint family (JWT vs nxk access token). 3. Confirm your role or token scopes allow the action. 4. Validate required fields exactly as expected by the endpoint. 5. Retry with curl -v to inspect headers and response body.
curl -v -X POST "$NEXUS_API_BASE/deployments" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"projectId":"...","name":"...","code":"..."}'Connect the GitHub App, bind repositories, and monitor automated deployments.
Install the NEXUS AI GitHub App and grant repository permissions.
Create deployment rules for a repository in your tenant.
Push events to allowed branches create deployments automatically.
Let anyone deploy your public GitHub repository to their own NEXUS AI account in one click, with the databases, worker, and settings it needs.
[](https://nexusai.run/deploy?repo=https://github.com/owner/repo){
"name": "Shop",
"description": "Next.js store with Postgres",
"services": ["postgres", "redis"],
"worker": { "command": "node worker.js" },
"rootDir": "backend",
"startCommand": "npm start",
"env": {
"SESSION_SECRET": { "generator": "secret" },
"STRIPE_SECRET_KEY": { "description": "Your Stripe secret key", "required": true },
"NODE_ENV": { "value": "production" }
}
}The backend is missing GitHub App slug configuration. Fix: set GITHUB_APP_SLUG in backend environment variables (or set GITHUB_APP_NAME so the slug can be derived), then restart the backend.
This usually means the app slug or account access is wrong. Fix: verify the app exists at https://github.com/apps/<your-app-slug> and confirm you are signed into a GitHub account allowed to install that app.
Your GitHub App setup callback URL may be incorrect. Fix: set the GitHub App Setup URL to your backend callback endpoint, for example https://nexusai.run/api/github/install/callback. Do not use the OAuth login callback for app installation flow.
Most often, one of these conditions failed: repository not bound, branch not allowlisted, or auto-deploy disabled. Fix: review the Repo Binding and Webhook Deliveries tabs to confirm the exact ignore reason.
Tenant Owner and Admin roles can install the GitHub App, create bindings, and change deployment rules.
Developers can view deployment status and logs for bound repositories, and can trigger manual redeploy if enabled by your organization policy.
Deploy MySQL, PostgreSQL, MongoDB, and Redis alongside your app and manage them from Deployment Details.
mysql:3306
postgresql:5432
mongodb:27017
redis:6379MYSQL_HOST=mysql
POSTGRES_HOST=postgresql
MONGO_HOST=mongodb
REDIS_HOST=redisNEXUS AI injects these variables into the app container, and into worker sidecars deployed with the same app.
App container -> PostgreSQL: postgresql:5432
App container -> MySQL: mysql:3306
App container -> MongoDB: mongodb:27017
App container -> Redis: redis:6379POSTGRES_HOST=postgresql
POSTGRES_PORT=5432
POSTGRES_DB=appdb
POSTGRES_USER=appuser
POSTGRES_PASSWORD=<auto-generated>
DATABASE_URL=postgresql://appuser:<auto-generated>@postgresql:5432/appdbMYSQL_HOST=mysql
MYSQL_PORT=3306
MYSQL_DATABASE=appdb
MYSQL_USER=appuser
MYSQL_PASSWORD=<auto-generated>
MYSQL_ROOT_PASSWORD=<auto-generated>_root
DATABASE_URL=mysql://appuser:<auto-generated>@mysql:3306/appdbMONGO_HOST=mongodb
MONGO_PORT=27017
MONGO_DATABASE=appdb
MONGO_USERNAME=root
MONGO_PASSWORD=<auto-generated>
MONGO_URI=mongodb://root:<auto-generated>@mongodb:27017/appdb?authSource=adminREDIS_HOST=redis
REDIS_PORT=6379
REDIS_URL=redis://redis:6379/0This deployment was created without Additional Services enabled. Fix: create a new deployment and select MySQL, PostgreSQL, MongoDB, or Redis before deploying.
Additional Services are disabled for Cloud Run, App Runner, and Container Apps providers. Fix: use a managed external database for those providers, or use Local Docker provider for compose-based sidecar services.
Most connection issues are host/port mismatches or service startup timing. Fix: use the internal service hostname (for example mysql/postgresql/mongodb/redis) and default internal port, then confirm the deployment status is RUNNING.
NEXUS AI rotates credentials and recreates the service container with the new values. Fix: update your application credentials immediately and redeploy if your app caches old values.
Persistent filesystem mounts and S3-compatible buckets attached to your deployments. No data lock-in.
NEXUS AI offers two distinct storage types. Pick based on how your app reads and writes data.
Use these commands for terminal-first storage management.
nexus volume list
nexus volume create app-data --display-name "App data"
nexus volume attach <volume-id> <deployment-id> --mount /data
nexus deploy redeploy <deployment-id> --wait
nexus volume refresh-usage <volume-id>
nexus volume detach <volume-id>
nexus volume delete <volume-id> --yesnexus bucket list
nexus bucket create user-uploads --display-name "User uploads"
nexus bucket attach <bucket-id> <deployment-id>
nexus deploy redeploy <deployment-id> --wait
nexus bucket files <bucket-id> --prefix uploads/
nexus bucket upload <bucket-id> ./report.pdf --key reports/report.pdf
nexus bucket download <bucket-id> reports/report.pdf --out ./report.pdf
nexus bucket download <bucket-id> reports/report.pdf --share --ttl 900
nexus bucket credentials <bucket-id>
nexus bucket rotate-credentials <bucket-id> --yes
nexus bucket rm <bucket-id> reports/report.pdf --yes
nexus bucket detach <bucket-id> <deployment-id>
nexus bucket delete <bucket-id> --yesThere are two correct sequences. Picking the wrong order is the #1 source of "/data: No such file or directory" errors.
# 1. Create the volume
nexus volume create app-data --display-name "User uploads"
# 2. Deploy the app (or use an existing one), then attach the volume:
nexus deploy source --repo https://github.com/you/your-app.git --name myapp --provider docker --wait
nexus volume attach <volume-id> <deployment-id> --mount /data
# 3. Redeploy so the new compose file includes the mount:
nexus deploy redeploy <deployment-id> --wait
# 4. Verify the mount inside the container:
docker exec <container-id> ls -la /datanexus deploy list # find the deployment id
nexus volume create app-data
nexus volume attach <volume-id> <deployment-id> --mount /data
nexus deploy redeploy <deployment-id> --wait # required
docker exec <new-container-id> ls -la /dataVolumes are shared across replicas. This is a Docker constraint and changes how you should design the app.
nexus deploy scale <deployment-id> 3
# All three containers now mount nexus-vol-<volumeId>:/data
# A file written by replica 1 is visible to replicas 2 and 3 immediately.nexus volume detach <volume-id>
nexus deploy redeploy <old-deployment-id> --wait # mount removed
nexus volume attach <volume-id> <new-deployment-id> --mount /data
nexus deploy redeploy <new-deployment-id> --wait # mount addedBuckets work over the S3 API, so they avoid most of the volume scaling caveats.
nexus bucket create user-uploads
nexus bucket attach <bucket-id> <deployment-id>
nexus deploy redeploy <deployment-id> --waitS3_ENDPOINT=http://host.docker.internal:9000
S3_REGION=us-east-1
S3_BUCKET=org-<orgIdShort>-<bucketName>
S3_ACCESS_KEY=<scoped to this bucket only>
S3_SECRET_KEY=<scoped to this bucket only>
# Plus per-bucket aliases when multiple buckets are attached:
S3_BUCKET_USER_UPLOADS=org-...-user-uploads
S3_BUCKET_USER_UPLOADS_ACCESS_KEY=...
S3_BUCKET_USER_UPLOADS_SECRET_KEY=...import os, boto3
s3 = boto3.client(
"s3",
endpoint_url=os.environ["S3_ENDPOINT"],
aws_access_key_id=os.environ["S3_ACCESS_KEY"],
aws_secret_access_key=os.environ["S3_SECRET_KEY"],
region_name=os.environ["S3_REGION"],
)
s3.put_object(Bucket=os.environ["S3_BUCKET"], Key="hello.txt", Body=b"hi")nexus bucket files <bucket-id> # list
nexus bucket files <bucket-id> --prefix uploads/ # filter by prefix
nexus bucket upload <bucket-id> ./report.pdf
nexus bucket download <bucket-id> report.pdf --out /tmp/report.pdf
nexus bucket download <bucket-id> report.pdf --share --ttl 600 # signed URL valid 10min
nexus bucket rm <bucket-id> report.pdfnexus bucket rotate-credentials <bucket-id>
nexus deploy redeploy <deployment-id> --wait # required for new S3_* env vars to take effectUse a logged-in user JWT and the /api base path for dashboard-grade storage operations.
GET /api/volumes
POST /api/volumes
POST /api/volumes/:id/attach
POST /api/volumes/:id/detach
POST /api/volumes/:id/refresh-usage
DELETE /api/volumes/:idGET /api/buckets
POST /api/buckets
POST /api/buckets/:id/attach
POST /api/buckets/:id/detach
POST /api/buckets/:id/refresh-usage
POST /api/buckets/:id/rotate-credentials
GET /api/buckets/:id/credentials
GET /api/buckets/:id/files
PUT /api/buckets/:id/files/:key
GET /api/buckets/:id/files/:key/download
POST /api/buckets/:id/files/:key/download-url
DELETE /api/buckets/:id/files/:key
GET /api/bucket-downloads/:tokencurl -s -X POST "$NEXUS_API_BASE/volumes/<volume-id>/attach" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"deploymentId":"<deployment-id>","mountPath":"/data"}'curl -s -X POST "$NEXUS_API_BASE/buckets/<bucket-id>/attach" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"deploymentId":"<deployment-id>"}'AI clients can manage storage through scoped MCP tools.
nexusai_volume_list # deployments:read
nexusai_volume_create # deployments:create
nexusai_volume_attach # deployments:create
nexusai_volume_detach # deployments:create
nexusai_volume_delete # deployments:deletenexusai_bucket_list # deployments:read
nexusai_bucket_create # deployments:create
nexusai_bucket_attach # deployments:create
nexusai_bucket_detach # deployments:create
nexusai_bucket_rotate_credentials # deployments:create
nexusai_bucket_files_list # deployments:read
nexusai_bucket_file_download # deployments:read
nexusai_bucket_file_delete # deployments:delete
nexusai_bucket_delete # deployments:deleteThe container was created before the volume was attached. Docker bakes mounts at container creation; you cannot add a mount to a running container. Fix: redeploy the deployment after attach. nexus deploy redeploy <deployment-id> --wait. The new container will have the mount.
No. Volumes are single-attach. To share data between deployments, use a Bucket instead. Buckets are multi-attach and the S3 API handles concurrent access safely.
Nothing. Deleting a deployment does not delete attached volumes. The volume becomes "available" status and can be attached to a new deployment. To destroy the data: nexus volume detach <id> && nexus volume delete <id>
No. All 3 replicas mount the SAME named volume at the same path. They share the underlying filesystem. This is a Docker constraint. If your app cannot tolerate concurrent writes from multiple replicas, either: (1) keep the deployment at 1 replica, (2) split state into separate deployments each with their own volume, or (3) move state into a Bucket where the S3 API handles concurrency.
Volume data persists. Scaling down (or stopping) only removes container processes; the named volume on the host filesystem is untouched. Scale up later and the new container sees the same files.
Yes. Buckets are multi-attach. Every deployment with the bucket attached gets the same S3_* env vars. Each deployment makes independent calls to MinIO using the shared per-bucket service account.
The previous container is still alive and the new one is trying to claim the same name. Fix: nexus deploy stop <deployment-id>; if that leaves a container around, docker rm -f <container-id>; then re-run the redeploy. This is a known issue in the redeploy flow on Local Docker provider, separate from the storage feature itself.
The web upload buffers each file in browser memory before sending. Browsers struggle with multi-hundred-megabyte buffers. Fix: use the CLI for large uploads: nexus bucket upload <bucket-id> ./big-file.zip. The CLI streams directly from disk to MinIO with no full-file buffering. There is no fixed size cap on the CLI path.
The platform has no built-in copy command. Use docker cp or rsync inside the container that has the source volume mounted, then copy to a path the destination volume will mount. Worked example: docker exec <src-container> tar czf - /data | docker exec -i <dst-container> tar xzf - -C /destination
Not in v1. Storage volumes are Local Docker only because they are backed by Docker named volumes. Each managed cloud provider has its own filesystem mounting model (Cloud Run + Cloud Storage FUSE, App Runner has no persistent filesystem, Container Apps + Azure Files). Cross-provider volumes are on the roadmap. For cloud providers today: use Buckets (which work everywhere via the S3 API), or use a managed external database connected via Secrets Vault.
Run a database independently of any app: on NEXUS AI (PostgreSQL or Redis) or as a native cloud instance (AWS RDS, GCP Cloud SQL, Azure Database). Attach them to deployments, deploy an app and database in one command, and back them up with snapshots.
Two different ways to run a database on NEXUS AI.
Which database engines run as managed cloud databases vs container sidecars.
Pick the cloud provider when creating the database; the rest of the workflow is identical.
nexus managed-db create prod-db --provider GCP_CLOUD_SQL --engine POSTGRES --engine-version 17Connectivity depends on where the app runs.
Provisioning is asynchronous and takes a few minutes.
nexus managed-db create shop --local --engine postgres --db-name shop_db --username shop_user
nexus managed-db create cache --local --engine redis
nexus managed-db create prod-db --engine POSTGRES --engine-version 17.10
nexus managed-db listRun SQL against PostgreSQL or MySQL databases without leaving the terminal.
nexus managed-db query shop "SELECT id, email FROM users LIMIT 10"
nexus managed-db query shop "SELECT count(*) FROM orders WHERE status = 'paid'"nexus managed-db query shop "CREATE TABLE notes (id serial PRIMARY KEY, body text NOT NULL)"
nexus managed-db query shop "INSERT INTO notes (body) VALUES ('hello')"
nexus managed-db query shop "UPDATE notes SET body = 'hi' WHERE id = 1"nexus managed-db query shop "SELECT * FROM users LIMIT 5" --json | jq '.rows[].email'
nexus managed-db query shop "$(cat migration.sql)"Attaching injects connection details as environment variables — a redeploy is required.
nexus managed-db attach shop --deployment my-api
nexus deploy redeploy my-apiProvision the database and deploy the app together — the first deploy comes up already connected.
nexus deploy source \
--repo https://github.com/you/app.git \
--name myapp --provider gcp_cloud_run \
--env-file ./.env.prod \
--create-db postgresRebuild the same deployment without losing its database or configuration.
nexus deploy redeploy <deploymentId> --waitBackups use native cloud snapshots; restore is non-destructive.
Environment variables are injected at deploy time, not at attach time. Redeploy the deployment after attaching. Also confirm the database status is AVAILABLE — a PROVISIONING database is skipped during injection.
No. Restore is non-destructive: it provisions a new managed database from the snapshot and leaves the source database untouched. You then choose whether to attach the restored database.
v1 RDS instances are created publicly accessible behind a dedicated security group. The allowed inbound range is controlled by the RDS_ALLOWED_CIDR setting; provisioning is refused if no CIDR (or explicit public opt-in) is configured. Restrict this to your deploy network for production.
Managed databases are gated by plan tier (the Free tier has none). If you are at your plan limit or on a plan without managed databases, upgrade to enable them.
Create portable backups for deployment database services, download them securely, and restore data when needed.
Backups are available for database services provisioned with a deployment.
PostgreSQL: backup-<timestamp>.dump # pg_dump custom format
MySQL: backup-<timestamp>.sql # mysqldump SQL file
MongoDB: backup-<timestamp>.archive # compressed mongodump archive
Redis: backup-<timestamp>.rdb # Redis RDB snapshotUse your logged-in JWT for dashboard-grade backup operations.
export NEXUS_API_BASE="https://nexusai.run/api"
export NEXUS_JWT="YOUR_JWT_FROM_LOGIN"curl -s "$NEXUS_API_BASE/deployment-services?deployment=<deploymentId>" \
-H "Authorization: Bearer $NEXUS_JWT"curl -s -X POST "$NEXUS_API_BASE/deployment-services/<serviceId>/backup" \
-H "Authorization: Bearer $NEXUS_JWT"curl -s "$NEXUS_API_BASE/deployment-services/<serviceId>/backups" \
-H "Authorization: Bearer $NEXUS_JWT"Use `nexus db` commands when you want terminal-first backup operations.
nexus auth loginnexus db services
nexus db services <deployment-name-or-id>nexus db backup <service-id>nexus db backups <service-id>
nexus db backups <service-id> --jsonnexus db backup-download <service-id> <backup-id>
nexus db backup-download <service-id> <backup-id> --out ./backups/prod-postgres.dumpnexus db backup-download <service-id> <backup-id> --share
nexus db backup-download <service-id> <backup-id> --share --ttl 900nexus db restore <service-id> <backup-id>
nexus db restore <service-id> <backup-id> --yesnexus db restore-to <target-service-id> <backup-id>
nexus db restore-to <target-service-id> <backup-id> --yes
nexus db restore-to <target-service-id> <backup-id> --jsonnexus db backup-schedule <service-id> --enable
nexus db backup-schedule <service-id> --disablenexus db backup-delete <service-id> <backup-id>
nexus db backup-delete <service-id> <backup-id> --yesDownload directly with your JWT or create a short-lived signed URL for browser and curl use.
curl -L -o backup.dump \
"$NEXUS_API_BASE/deployment-services/<serviceId>/backups/<backupId>/download" \
-H "Authorization: Bearer $NEXUS_JWT"curl -s -X POST "$NEXUS_API_BASE/deployment-services/<serviceId>/backups/<backupId>/download-url" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"ttlSeconds":300}'curl -L -o "<fileName-from-response>" "<signedDownloadUrl>"Restore writes backup data into the selected running service. You can restore in place or restore to another compatible service in the same organization.
curl -s -X POST "$NEXUS_API_BASE/deployment-services/<serviceId>/restore" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"backupId":"<backupId>"}'curl -s -X POST "$NEXUS_API_BASE/deployment-services/<targetServiceId>/restore-from/<backupId>" \
-H "Authorization: Bearer $NEXUS_JWT"Scheduled backups run daily for services with backup scheduling enabled.
curl -s -X PATCH "$NEXUS_API_BASE/deployment-services/<serviceId>/backup/schedule" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'curl -s -X PATCH "$NEXUS_API_BASE/deployment-services/<serviceId>/backup/schedule" \
-H "Authorization: Bearer $NEXUS_JWT" \
-H "Content-Type: application/json" \
-d '{"enabled":false}'ChatGPT, Claude, and custom MCP clients can create, list, download, restore, and schedule database backups.
nexusai_db_services_listnexusai_db_backup # create a backup for serviceId
nexusai_db_backup_list # list backups for serviceId
nexusai_db_backup_download # generate signed download URL
nexusai_db_restore # restore serviceId from backupId
nexusai_db_restore_to # restore backupId into targetServiceId
nexusai_db_backup_schedule # enable or disable daily backupsYes, if the target database service belongs to the same organization and is compatible with the backup engine. Use REST POST /api/deployment-services/:targetServiceId/restore-from/:backupId, CLI nexus db restore-to <target-service-id> <backup-id>, or MCP tool nexusai_db_restore_to. Cross-tenant restore is not allowed.
Yes, restore can overwrite, clean, drop, or replace existing data depending on the engine. PostgreSQL uses pg_restore with clean/if-exists behavior, MySQL imports the SQL dump, MongoDB restores with drop behavior, and Redis replaces the RDB snapshot after stopping and restarting the container.
The default signed download URL lifetime is 5 minutes. You can request ttlSeconds, with a minimum of 30 seconds and a maximum of 3600 seconds.
The backup service needs a live database container so it can run pg_dump, mysqldump, mongodump, redis-cli, or copy files from the container. Start or redeploy the database service, wait for it to be running, then retry.
Yes. Use nexus db services to find a service id, nexus db backup to create a backup, nexus db backups to list backups, nexus db backup-download to download or generate a signed URL, nexus db restore for in-place restore, nexus db restore-to to restore into another service in the same organization, nexus db backup-schedule to manage daily backups, and nexus db backup-delete to remove old backups.
Secrets are encrypted in NEXUS AI, but downloaded database backup files should be treated as sensitive data. Store them only in approved encrypted storage and restrict access according to your organization policy.
Securely store API keys and connect cloud AI providers.
Connect Anthropic (Claude), OpenAI (GPT), Google (Gemini), Cohere, xAI (Grok), or OpenRouter. Grok and OpenRouter require a paid plan.
Provider availability differs between AI Builder and project code generation. Select an enabled provider and a model available to your workspace.
Paid customers can use their own OpenRouter account in AI Builder after reaching their NEXUS AI monthly allowance.
Grok requires Starter, Pro, Enterprise, Healthcare Starter, or Healthcare Pro. Free workspaces cannot configure or use Grok, even with a personal xAI API key.
Build with the AI provider configured by the platform, without adding a personal API key.
Deploy and manage containers from ChatGPT using NEXUS AI.
Use deployments:create, deployments:read, deployments:logs, deployments:delete for full GPT actions.
Deploy nginx:latest on port 80 and name it my-nginx.
Upload this zip and deploy it as zip-app.
Deploy https://github.com/org/repo.git on main using secret github-token.
List my deployments and show the status of the most recent one.
Show the last 50 log lines for my latest deployment.
Destroy the deployment named my-nginx (confirm before deleting).Use repoSecretName with the Secrets Vault name that stores your repo token.
Upload a zip archive, then deploy with sourceType=zip and the uploadId returned by the upload call.
Use an access token that starts with nxk_. Ensure it was created in the same environment (local vs production).
Add deployments:read (and other GPT scopes) to the access token and try again.
Comprehensive MCP documentation for ChatGPT, Claude, and custom clients using OAuth-protected JSON-RPC on NEXUS AI.
NEXUS AI exposes MCP as an OAuth-protected HTTP JSON-RPC endpoint.
Registry listing:
https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.nexusrun/nexus-aiMCP endpoint: https://mcp.nexusai.run/mcp
Transport: HTTP JSON-RPC 2.0
Methods: ping, initialize, tools/list, tools/call
Notifications: notifications/initialized, notifications/cancelled
Protocol version: 2026-01-16https://mcp.nexusai.run/.well-known/oauth-authorization-server
https://mcp.nexusai.run/.well-known/oauth-protected-resource/mcp
https://mcp.nexusai.run/.well-known/openid-configurationcurl -i -X GET "https://mcp.nexusai.run/mcp"
curl -i -X DELETE "https://mcp.nexusai.run/mcp"Use this for no-code setup inside ChatGPT.
https://mcp.nexusai.run/mcpList my NEXUS AI deployments and show their status.Each client runs the OAuth sign-in on first connect. A pre-minted OAuth token in a header is the headless fallback.
{
"mcpServers": {
"nexus-ai": {
"url": "https://mcp.nexusai.run/mcp"
}
}
}claude mcp add --transport http nexus-ai https://mcp.nexusai.run/mcp \
--header "Authorization: Bearer <your-nexus-oauth-token>"URL: https://mcp.nexusai.run/mcpcodex mcp add nexus-ai --url https://mcp.nexusai.run/mcp
codex mcp login nexus-aiCall nexusai_whoami and tell me which tenant I am connected to.Canonical task chains your agent can execute. Each step calls one or more MCP tools.
1. nexusai_projects_list # find the target project
2. <agent generates the app files in chat>
3. nexusai_builder_push # push files, get a live-preview URL for the user
4. <user reviews the running app, optionally edits in the builder>
5. nexusai_builder_pull # bring builder-side edits back into chat (optional)
6. nexusai_deploy_source / deploy # ship it when the user approves1. nexusai_projects_list # find the target project
2. nexusai_deploy_source # build from repo with services=[postgresql, redis]
3. nexusai_bucket_create # provision a bucket for uploads
4. nexusai_bucket_attach # wire bucket env vars into the deploy
5. nexusai_deploy_redeploy # apply the bucket attachment
6. nexusai_deploy_status # confirm RUNNING1. nexusai_db_services_list # discover postgres service id
2. nexusai_db_backup # snapshot first
3. <agent runs the migration>
4. nexusai_deploy_logs # check for errors
5a. (success) nexusai_db_backup_list # confirm backup on retention list
5b. (failure) nexusai_db_restore # restore from the snapshot
nexusai_deploy_rollback # revert to previous release1. nexusai_bucket_rotate_credentials # generate fresh scoped svcacct creds
2. nexusai_deploy_redeploy # for each attached deployment
3. nexusai_deploy_status # confirm RUNNING with new S3_* vars1. nexusai_db_services_list # find prod postgres serviceId
2. nexusai_db_backup # take a fresh snapshot
3. nexusai_db_services_list # find staging postgres serviceId
4. nexusai_db_restore_to # restore prod backup INTO staging1. nexusai_deploy_status # state, health, restart count
2. nexusai_deploy_logs # last 200 lines runtime logs
3a. nexusai_secrets_create / nexusai_secrets_update # if missing env var
3b. nexusai_db_propose_fix → nexusai_db_apply_fix # if schema gap
3c. <agent edits code, pushes, triggers nexusai_deploy_redeploy>
4. nexusai_deploy_logs # confirm fix1. nexusai_deploy_status # inspect current autoDestroyAt
2. nexusai_deploy_auto_destroy # pass autoDestroyHours to extend/reduce
3. nexusai_deploy_auto_destroy # pass autoDestroyAt:null to disable
4. nexusai_deploy_status # confirm the updated scheduleTools the agent must never call without explicit user confirmation in the same conversation turn.
nexusai_deploy_delete # permanent; tears down containers, networks, volumes
nexusai_db_restore # overwrites existing data
nexusai_db_restore_to # overwrites target deployment data
nexusai_bucket_delete # deletes all bucket contents
nexusai_volume_delete # destroys all volume data
nexusai_bucket_rotate_credentials # invalidates current S3 credentialsnexusai_db_query_execute # DML/DDL requires confirmed=true
nexusai_db_apply_fix # requires the proposal ID from nexusai_db_propose_fixNever call delete/restore/rotate tools without an explicit
"yes, <verb> <resource>" from the user in the same message.
For DML/DDL, always call nexusai_db_query_preview first and
show the SQL before setting confirmed=true on nexusai_db_query_execute.Use standard authorization code flow with PKCE for public clients.
curl -s -X POST "https://nexusai.run/register" \
-H "Content-Type: application/json" \
-d '{
"client_name":"my-mcp-client",
"redirect_uris":["https://example.com/callback"],
"token_endpoint_auth_method":"none",
"grant_types":["authorization_code","refresh_token"],
"response_types":["code"],
"scope":"deployments:read deployments:create deployments:logs deployments:delete"
}'curl -s -X POST "https://nexusai.run/oauth/token" \
-H "Content-Type: application/json" \
-d '{
"grant_type":"authorization_code",
"client_id":"<client_id>",
"code":"<authorization_code>",
"redirect_uri":"https://example.com/callback",
"code_verifier":"<pkce_code_verifier>"
}'curl -s "https://nexusai.run/oauth/me" \
-H "Authorization: Bearer <oauth_access_token>"Authorization: Bearer <oauth_access_token>NEXUS AI also supports creating auth codes from a logged-in user session.
curl -s -X POST "https://nexusai.run/oauth/authorize/code" \
-H "Authorization: Bearer <nexus_jwt>" \
-H "Content-Type: application/json" \
-d '{
"response_type":"code",
"client_id":"<client_id>",
"redirect_uri":"https://example.com/callback",
"scope":"deployments:read deployments:logs",
"code_challenge":"<pkce_code_challenge>",
"code_challenge_method":"S256",
"state":"state-123"
}'DCR endpoint validates redirect URIs and client metadata.
Use POST /register (or POST /api/oauth/register).
https://nexusai.run/register
https://nexusai.run/api/oauth/registerRules: 1. At least one redirect URI is required. 2. Maximum 10 redirect URIs. 3. Each URI must be <= 2000 chars. 4. URI fragments (#...) are not allowed. 5. Must use https, except localhost/127.0.0.1 can use http for development.
Supported values are none, client_secret_post, and client_secret_basic. Public MCP clients should usually use none + PKCE.
Supported scopes are deployments:read, deployments:create, deployments:logs, deployments:delete.
Use these examples to test connectivity and tool execution.
curl -s -X POST "https://mcp.nexusai.run/mcp" \
-H "Authorization: Bearer <oauth_access_token>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":1,
"method":"initialize",
"params":{"protocolVersion":"2025-06-18"}
}'curl -s -X POST "https://mcp.nexusai.run/mcp" \
-H "Authorization: Bearer <oauth_access_token>" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'curl -s -X POST "https://mcp.nexusai.run/mcp" \
-H "Authorization: Bearer <oauth_access_token>" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"id":3,
"method":"tools/call",
"params":{"name":"nexusai_whoami","arguments":{}}
}'NEXUS AI exposes 74 tools across 11 categories. Tool names are underscore-based and case-sensitive.
nexusai_whoami
nexusai_projects_list
nexusai_providers_list
nexusai_usage_statsnexusai_builder_push
nexusai_builder_pullnexusai_deploy_list
nexusai_deploy_status
nexusai_deploy_health
nexusai_deploy_logs
nexusai_deploy_create
nexusai_deploy_source
nexusai_deploy_openclaw
nexusai_deploy_flixty
nexusai_deploy_redeploy
nexusai_deploy_rollback
nexusai_deploy_start
nexusai_deploy_stop
nexusai_deploy_scale
nexusai_deploy_auto_destroy
nexusai_deploy_deletenexusai_secrets_list
nexusai_secrets_create
nexusai_secrets_update
nexusai_secrets_deletenexusai_domains_list
nexusai_domains_add
nexusai_domains_verify
nexusai_domains_removenexusai_db_source_list
nexusai_db_source_connect
nexusai_db_source_delete
nexusai_db_inspect_schema
nexusai_db_query_preview
nexusai_db_query_execute
nexusai_db_propose_fix
nexusai_db_apply_fixnexusai_db_services_list
nexusai_db_backup
nexusai_db_backup_list
nexusai_db_backup_download
nexusai_db_restore
nexusai_db_restore_to
nexusai_db_backup_schedulenexusai_volume_list
nexusai_volume_create
nexusai_volume_attach
nexusai_volume_detach
nexusai_volume_deletenexusai_bucket_list
nexusai_bucket_create
nexusai_bucket_attach
nexusai_bucket_detach
nexusai_bucket_rotate_credentials
nexusai_bucket_files_list
nexusai_bucket_file_upload
nexusai_bucket_file_download
nexusai_bucket_file_delete
nexusai_bucket_deletenexusai_managed_db_list
nexusai_managed_db_create
nexusai_managed_db_connection
nexusai_managed_db_attach
nexusai_managed_db_detach
nexusai_managed_db_query
nexusai_managed_db_execute
nexusai_managed_db_snapshot_create
nexusai_managed_db_snapshot_list
nexusai_managed_db_restore
nexusai_managed_db_deletenexusai_support_ticket_create
nexusai_support_ticket_list
nexusai_support_ticket_get
nexusai_support_ticket_replyThe backend enforces 25 OAuth scopes: 4 legacy broad scopes (kept for backward compat) plus 21 fine-grained per-category scopes. Use the narrowest scope set your workflow needs.
nexusai_whoaminexusai_projects_list, nexusai_providers_list, nexusai_usage_stats,
nexusai_deploy_list, nexusai_deploy_status, nexusai_deploy_health,
nexusai_builder_pullnexusai_deploy_logsnexusai_deploy_create, nexusai_deploy_source, nexusai_deploy_openclaw,
nexusai_deploy_flixty, nexusai_deploy_redeploy, nexusai_deploy_rollback,
nexusai_deploy_stop, nexusai_deploy_start, nexusai_deploy_scale,
nexusai_deploy_auto_destroy, nexusai_builder_pushnexusai_deploy_deletesecrets:read: nexusai_secrets_list
secrets:manage: nexusai_secrets_create, nexusai_secrets_update
secrets:delete: nexusai_secrets_deletedomains:read: nexusai_domains_list
domains:manage: nexusai_domains_add, nexusai_domains_verify
domains:delete: nexusai_domains_removedb:read: nexusai_db_source_list, nexusai_db_inspect_schema,
nexusai_db_query_preview, nexusai_db_services_list,
nexusai_db_backup_list, nexusai_db_backup_download
db:query: nexusai_db_query_execute (SELECT)
db:admin: nexusai_db_source_connect, nexusai_db_propose_fix,
nexusai_db_apply_fix, nexusai_db_backup,
nexusai_db_restore, nexusai_db_restore_to,
nexusai_db_backup_schedule
db:source:delete: nexusai_db_source_deletevolumes:read: nexusai_volume_list
volumes:manage: nexusai_volume_create, nexusai_volume_attach, nexusai_volume_detach
volumes:delete: nexusai_volume_deletebuckets:read: nexusai_bucket_list, nexusai_bucket_files_list,
nexusai_bucket_file_download
buckets:manage: nexusai_bucket_create, nexusai_bucket_attach,
nexusai_bucket_detach, nexusai_bucket_rotate_credentials
buckets:delete: nexusai_bucket_delete, nexusai_bucket_file_deletemanaged_db:read: nexusai_managed_db_list, nexusai_managed_db_snapshot_list,
nexusai_managed_db_query
managed_db:manage: nexusai_managed_db_create, nexusai_managed_db_connection,
nexusai_managed_db_attach, nexusai_managed_db_detach,
nexusai_managed_db_snapshot_create, nexusai_managed_db_execute,
nexusai_managed_db_restore
managed_db:delete: nexusai_managed_db_deletesupport:read: nexusai_support_ticket_list, nexusai_support_ticket_get
support:write: nexusai_support_ticket_create, nexusai_support_ticket_replyMost frequent arguments used in production MCP flows.
required: image, port
optional: name, environment (DEVELOPMENT|STAGING|PRODUCTION),
envVars, provider, region, autoDestroyHours, requestIdrequired: repoUrl
optional: name, environment, repoBranch, repoSecretName, envVars,
provider, region, autoDestroyHours, requestId, framework, dockerfile,
buildCommand, startCommand, installCommand, outputDirrequired: deploymentId
optional: overrides {
name, displayName, provider, region, envVars, code, dockerfile, framework,
autoDestroyHours, healthCheckEnabled, healthCheckType, healthCheckUrl
}deploy status/logs/start/stop/delete/health: deploymentId
deploy scale: deploymentId + replicas (1-10)
secret update/delete: secretId
domains add: deploymentId + domain
domains verify/remove: deploymentId + domainIdSet these environment variables for reliable external client integration.
MCP_ORIGIN=https://api.example.com
OAUTH_ISSUER=https://api.example.com
OAUTH_SIGNING_SECRET=<strong-random-secret>
OAUTH_CLIENT_ID=<optional-static-client-id>
OAUTH_CLIENT_SECRET=<optional-static-client-secret>
OAUTH_REDIRECT_URIS=https://chat.openai.com/aip/callback,https://claude.ai/api/mcp/auth_callbackIf client secret is not configured, PKCE is required.
redirect_uri must exactly match allowed client redirect URIs.
issuer/discovery/token signing must stay consistent across all backend nodes.Use an OAuth access token from /oauth/token, not a regular app JWT or nxk token. Confirm the request uses Authorization: Bearer <oauth_access_token>.
Check token_endpoint_auth_method for your registered client. If token_endpoint_auth_method is none, do not send client_secret and use PKCE.
The redirect_uri must exactly match one of the registered redirect_uris for that client.
Use the exact code_verifier pair that generated the code_challenge for that authorization request.
Request the required scopes during authorization and re-run the OAuth flow so the new token includes them.
Use exact tool names from tools/list. NEXUS AI tool names use underscores (for example nexusai_whoami), not dotted names.
Verify discovery issuer and JWT issuer are consistent. In self-hosted setups, align MCP_ORIGIN, OAUTH_ISSUER, and external domain/proxy configuration.
Role-based access control for projects, environments, and deployment providers.
NEXUS AI uses role-based access control (RBAC) to manage what users can do within an organization.
NEXUS AI provides six user roles with different permission levels: • Owner - Full control over the organization, projects, and all settings • Admin - Similar to Owner, can manage users and most settings • Deployment Manager - Can manage deployments across all environments • Member (Developer) - Can create projects and deploy to Development/Staging • Auditor - Read-only access for compliance and monitoring • Billing Manager - Manages billing and views usage data
Organization roles define what a user can do across the entire organization. Project-level permissions can further restrict or grant access to specific projects. For example, a Member can be granted access to deploy to Production for a specific project through the Team Management page.
Control which environments users can create projects in and deploy to.
Default environment permissions by role: • Owner / Admin / Super Admin Development, Staging, Production (full access) • Deployment Manager Development, Staging, Production (full access) • Member (Developer) Development, Staging only • Auditor Read-only (cannot create projects or deploy) • Billing Manager Read-only (cannot create projects or deploy) Members (Developers) cannot create projects in or deploy to Production by default. This protects production environments from unauthorized changes.
To grant Production access to a specific user: 1. Go to Team Management in the sidebar 2. Find the user and click the actions menu (three dots) 3. Select "Manage Permissions" 4. Check "Production" in the Allowed Environments section 5. Click "Save Permissions" This grants Production access only for projects the user is assigned to.
By default, Members can only create projects in Development and Staging environments. This is a security feature to prevent accidental production deployments. If you need Production access, ask your organization Owner or Admin to grant you permission via Team Management.
Control which cloud providers users can deploy to.
Default provider permissions by role: • Owner / Admin / Super Admin Local Docker, GCP Cloud Run, AWS App Runner, Azure Container Apps (all providers) • Deployment Manager Local Docker only (can be expanded via Team Management) • Member (Developer) Local Docker only • Auditor Read-only (cannot deploy) • Billing Manager Read-only (cannot deploy) Cloud providers (GCP Cloud Run, AWS App Runner, Azure Container Apps) require explicit permission for non-admin users.
To grant cloud provider access to a specific user: 1. Go to Team Management in the sidebar 2. Find the user and click the actions menu (three dots) 3. Select "Manage Permissions" 4. Check the desired providers (GCP Cloud Run, AWS App Runner, Azure Container Apps) 5. Click "Save Permissions" Note: Cloud provider access also depends on your organization's plan tier.
Complete overview of all permissions by role.
View Organization Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✓ Auditor: ✓ Billing Mgr: ✓ Manage Organization Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✗ Manage Users Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✗ View Billing Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✓ Manage Billing Owner: ✓ Admin: ✗ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✓ View Audit Logs Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✓ Billing Mgr: ✗ View Usage Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✓ Billing Mgr: ✓ Manage Secrets Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✓ Auditor: ✗ Billing Mgr: ✗ Manage AI Providers Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✗ Manage Custom Domains Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✗ Auditor: ✗ Billing Mgr: ✗
Create Projects Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✓ Auditor: ✗ Billing Mgr: ✗ View Projects Owner: All Admin: All Deploy Mgr: Assigned Member: Assigned Auditor: All Billing Mgr: All Update Projects Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✓ Auditor: ✗ Billing Mgr: ✗ Delete Projects Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✗ Manage Project Members Owner: ✓ Admin: ✓ Deploy Mgr: ✗ Member: ✗ Auditor: ✗ Billing Mgr: ✗ View Deployments Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✓ Auditor: ✓ Billing Mgr: ✗ Create Deployments Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✓ Auditor: ✗ Billing Mgr: ✗ Manage Deployments Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✓ Auditor: ✗ Billing Mgr: ✗ View Deployment Logs Owner: ✓ Admin: ✓ Deploy Mgr: ✓ Member: ✓ Auditor: ✓ Billing Mgr: ✗ Legend: • "All" = Access to all projects in the organization • "Assigned" = Only projects where the user is explicitly added as a member
Project scope determines which projects a user can access: • All Projects: Owner, Admin, Auditor, and Billing Manager can see all projects in the organization. • Assigned Projects Only: Members and Deployment Managers can only see projects they have been explicitly added to. To add a user to a project, go to the project settings and add them as a project member.
Bring your own domain to production deployments.
Enable Cloud Run, App Runner, or Container Apps as deployment targets for your NEXUS AI.
Cloud Build builds images, Artifact Registry stores them, and Cloud Run runs them.
gcloud services enable \
run.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com \
storage.googleapis.com \
logging.googleapis.comgcloud artifacts repositories create nexusai-deployments \
--repository-format=docker \
--location=us-central1gsutil mb -l us-central1 gs://YOUR_UNIQUE_BUILD_BUCKET_NAME# Replace: PROJECT_ID, BACKEND_SA, PROJECT_NUMBER, BUCKET
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:BACKEND_SA \
--role=roles/run.admin
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:BACKEND_SA \
--role=roles/cloudbuild.builds.editor
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:BACKEND_SA \
--role=roles/logging.viewer
gsutil iam ch serviceAccount:BACKEND_SA:objectAdmin gs://BUCKET
gcloud projects add-iam-policy-binding PROJECT_ID \
--member=serviceAccount:[email protected] \
--role=roles/artifactregistry.writer
gsutil iam ch serviceAccount:[email protected]:objectViewer gs://BUCKETCodeBuild builds and pushes to ECR, and App Runner runs the service.
aws ecr create-repository --repository-name nexusai-apps --region us-east-1aws s3api create-bucket --bucket YOUR_UNIQUE_BUCKET_NAME --region us-east-1 --create-bucket-configuration LocationConstraint=us-east-1ACR Tasks builds and pushes images, and Container Apps runs the service.
az login
az account set --subscription "YOUR_SUBSCRIPTION_ID"
az provider register --namespace Microsoft.App
az provider register --namespace Microsoft.ContainerRegistry
az provider register --namespace Microsoft.OperationalInsights
az provider register --namespace Microsoft.StorageRG_NAME="nexusai-core"
RG_LOCATION="eastus"
az group create --name "$RG_NAME" --location "$RG_LOCATION"
SUB_ID=$(az account show --query id -o tsv)
az ad sp create-for-rbac \
--name "nexusai-backend" \
--role Contributor \
--scopes "/subscriptions/$SUB_ID/resourceGroups/$RG_NAME" \
--query "{AZURE_CLIENT_ID:appId,AZURE_CLIENT_SECRET:password,AZURE_TENANT_ID:tenant}" \
-o table
echo "AZURE_SUBSCRIPTION_ID=$SUB_ID"AZURE_TENANT_ID=...
AZURE_CLIENT_ID=...
AZURE_CLIENT_SECRET=...
AZURE_SUBSCRIPTION_ID=...
AZURE_DEFAULT_REGION=eastus
AZURE_RESOURCE_GROUP_PREFIX=nexusai
AZURE_ACR_NAME_PREFIX=nexusai
AZURE_ACR_REPO=nexusai-apps
AZURE_CONTAINERAPPS_ENV_PREFIX=nexusai
AZURE_LOG_ANALYTICS_WORKSPACE_PREFIX=nexusai
AZURE_STORAGE_ACCOUNT_PREFIX=nexusai
AZURE_STORAGE_CONTAINER=build-sourcesSUB_ID=YOUR_SUBSCRIPTION_ID
SP_APP_ID=YOUR_SERVICE_PRINCIPAL_APP_ID
az role assignment create --assignee "$SP_APP_ID" --role Contributor \
--scope "/subscriptions/$SUB_ID"Use this when deployments fail with `Microsoft.Resources/subscriptions/resourcegroups/write`.
SUB_ID="YOUR_SUBSCRIPTION_ID"
RG_NAME="nexusai-shared"
SP_APP_ID="YOUR_AZURE_CLIENT_ID"RG_LOCATION="eastus"
az group show --name "$RG_NAME" --subscription "$SUB_ID" >/dev/null 2>&1 || \
az group create --name "$RG_NAME" --location "$RG_LOCATION" --subscription "$SUB_ID"az role assignment create \
--assignee "$SP_APP_ID" \
--role Contributor \
--scope "/subscriptions/$SUB_ID/resourceGroups/$RG_NAME"az role assignment list \
--assignee "$SP_APP_ID" \
--scope "/subscriptions/$SUB_ID/resourceGroups/$RG_NAME" \
--include-inherited -o tableaz role assignment create \
--assignee "$SP_APP_ID" \
--role Contributor \
--scope "/subscriptions/$SUB_ID"Common deployment validation errors, cloud permissions, and how to unblock yourself fast.
Dockerfile validation is enforced to keep deployments secure and predictable.
This means your Dockerfile violates a security policy (base image allowlist, blocked ports, or dangerous build patterns). Fix: check your base image prefix, EXPOSE ports, and avoid restricted patterns like piping remote scripts into a shell.
Issue: Your Dockerfile contains an `EXPOSE 25` instruction. In hardened environments, ports below 1024 are privileged and blocked by NEXUS AI deployments. Solution: Move the service to a non-privileged port (for example `2525` or `587`) and update your app configuration and Dockerfile accordingly.
# Example (Postfix or SMTP-like service)
# Use a non-privileged port and update your service config accordingly.
ENV PORT=2525
EXPOSE 2525Ports below 1024 are considered privileged. NEXUS AI blocks privileged ports by default (common exceptions are 80 and 443). Fix: move your app to a non-privileged port like 3000 or 8080 and update your Dockerfile and app to listen on that port.
Ports associated with remote access protocols (SSH/Telnet/RDP/VNC) are blocked for safety. Fix: do not expose these ports. If you need admin access, use logs/metrics and application-level endpoints instead.
Issue: NEXUS AI enforces a base-image allowlist so builds start from trusted, maintained sources. The `postfix:` prefix is not on the approved list. Solution: Rebuild using an approved base image prefix and install the needed mail utilities through the package manager. Approved prefixes: node:, python:, nginx:, alpine:, ubuntu:, debian:, postgres:, redis:, mongo:, mysql:, httpd:, php:, ruby:, golang:, openjdk:, rust:, gcc:.
# Example approach: start from Debian and install packages
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends postfix && rm -rf /var/lib/apt/lists/*
# Configure Postfix to listen on a non-privileged port (e.g., 2525) in your main.cf
EXPOSE 2525NEXUS AI only allows builds that start from approved base image prefixes. Fix: switch your Dockerfile `FROM` to an approved prefix such as `debian:`, `ubuntu:`, `alpine:`, `node:`, or `python:` and install what you need via the package manager.
Piping a remote script directly into a shell is a common supply-chain attack vector and is blocked. Fix: install packages using the OS package manager, pin versions where possible, and avoid remote script execution in Docker builds.
These options can allow container escape or host compromise and are blocked by policy. Fix: remove privileged flags and redesign the service to run without elevated host access.
Very large Dockerfiles or extremely high instruction counts can be used for resource exhaustion and are blocked. Fix: reduce layers, remove repeated RUN steps, and prefer package manager installs in fewer commands.
Mounting the Docker socket into a container can allow full host control and is treated as a container escape risk. Fix: remove Docker socket usage. If you need to build/run containers, use the platform's deployment workflow instead.
The validator detects secret-like values in Dockerfiles to prevent accidental credential leaks. Fix: remove secrets from Dockerfile and provide them at runtime using Secrets Vault and environment variables.
If you receive `DEPLOYMENT_FAILED` after a validation error, use this checklist:
Error Message | Meaning | Action Item
------------------------------------- | ------------------------------------- | -------------------------------------------
Dockerfile validation failed | Configuration violates security policy | Check port numbers and base image prefixes
Base image ... is not allowed | Image source is untrusted | Switch to an approved prefix (ubuntu/alpine)
Exposing privileged port | Port is < 1024 | Move app to a port like 8080/3000/2525If your project strictly requires a base image or port that is not allowed by default, open a security review ticket with a clear business justification. Email: [email protected]
Most "service won't start" issues come down to the container port and startup behavior.
Your container must listen on the same port that Cloud Run routes traffic to. In NEXUS AI, the port is typically derived from your Dockerfile `EXPOSE` instruction (or defaults based on the generated Dockerfile). Fix: ensure your app listens on the exposed port and does not bind to localhost-only. Use 0.0.0.0 where applicable.
Cloud Run provides its own `PORT` environment variable and expects your app to bind to it. NEXUS AI also filters out user-provided `PORT` to avoid conflicts. Fix: update your app to read the `PORT` variable at runtime OR explicitly `EXPOSE` the correct port and configure your server to bind to that port.
DNS and SSL are the most common sources of custom domain issues.
Common causes: DNS propagation delay, wrong record name (host), or a conflicting existing record. Fix: confirm the exact record name/value from the UI and verify it from multiple resolvers.
# Example checks
dig CNAME app.example.com +short
dig TXT example.com +short
dig A example.com +shortWhen Cloudflare proxy is enabled, DNS responses and TLS termination can differ from what NEXUS AI expects for verification and certificate issuance. Fix: disable proxy (set the record to DNS-only) during verification and certificate issuance.
Certificate issuance can lag behind DNS verification, especially right after a DNS change. Fix: wait a few minutes and re-check. If it persists, verify there are no restrictive CAA records blocking Let's Encrypt.
CAA records can restrict which certificate authorities are allowed to issue certificates for your domain. Fix: ensure your CAA records allow Let's Encrypt (or remove restrictive CAA records).
dig CAA example.com +shortMany DNS providers do not allow CNAME records at the root/apex (`example.com`). Fix: use the platform's apex-domain flow (A + TXT) or use a provider feature like ALIAS/ANAME if supported.
DNS and browser caches can keep old values temporarily. Fix: verify with `dig` from your terminal, wait for TTL expiry, and try an incognito window or flush DNS cache.
Most Cloud Run issues are IAM permissions or service accessibility.
This means the service account running NEXUS AI does not have enough IAM permissions in your GCP project (or the service account does not exist). Fix: grant the required roles to the backend service account. Replace `PROJECT_ID` and `BACKEND_SA`.
PROJECT_ID="your-project-id"
BACKEND_SA="[email protected]"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$BACKEND_SA" \
--role="roles/cloudbuild.builds.editor"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$BACKEND_SA" \
--role="roles/run.admin"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$BACKEND_SA" \
--role="roles/storage.admin"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$BACKEND_SA" \
--role="roles/iam.serviceAccountUser"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:$BACKEND_SA" \
--role="roles/artifactregistry.writer"Use the build ID shown in the deployment logs and fetch logs from Cloud Build.
gcloud builds log BUILD_ID --project=PROJECT_IDThe default Cloud Build service account uses the project number: `[email protected]`
gcloud projects describe PROJECT_ID --format="value(projectNumber)"Most commonly, the Cloud Build service account is missing Artifact Registry write permission. Fix: grant `roles/artifactregistry.writer` to `[email protected]` in the same project/region as your repo.
A frequent cause is a mismatch between: - Artifact Registry repo name/region - `GCP_ARTIFACT_REGISTRY_HOST` (should be `REGION-docker.pkg.dev`, no `https://`) Fix: confirm the repo exists and the host matches its region.
There are two identities involved: - The backend runtime service account (creates builds, reads logs, uploads source archives). - The Cloud Build service account (executes the build and pushes images). Fix: grant roles to the correct identity. A common miss is Artifact Registry write access for the Cloud Build service account and bucket read access for the build source archive.
Check that your service has a ready revision and that it is publicly invokable (or that you have authentication configured correctly).
gcloud run services describe SERVICE_NAME \
--region=us-central1 \
--project=PROJECT_ID \
--format="value(status.latestReadyRevisionName,status.latestCreatedRevisionName)"
# Check if the service is public (allUsers has roles/run.invoker)
gcloud run services get-iam-policy SERVICE_NAME \
--region=us-central1 \
--project=PROJECT_IDList repositories in Artifact Registry for your project and confirm the repo/region match your backend configuration.
gcloud artifacts repositories list --project=PROJECT_IDNEXUS AI does not support Cloud Run custom domains in-app yet, but you can configure it directly using Cloud Run domain mapping. 1) Create the mapping 2) Add the DNS records returned by the mapping status 3) Wait for the certificate to become ready
gcloud config set project PROJECT_ID
gcloud run domain-mappings create \
--service SERVICE_NAME \
--domain app.example.com \
--region us-central1
gcloud run domain-mappings describe app.example.com \
--region us-central1 \
--format="yaml(status.resourceRecords)"Most App Runner issues are ECR/CodeBuild/IAM configuration or container startup behavior.
Check that: - CodeBuild can read the S3 source archive bucket. - CodeBuild can authenticate to ECR and push images. - App Runner can pull from ECR (service role permissions).
When AWS needs to attach a role to CodeBuild or App Runner, the caller must have permission to pass that role. Fix: ensure the IAM identity used by the backend has `iam:PassRole` for the specific role ARNs you are using.
List repositories and verify the expected repo is present in the region you configured.
aws ecr describe-repositories --region us-east-1Build logs are typically in CodeBuild (CloudWatch Logs). Runtime logs are in App Runner (CloudWatch Logs). Fix: open the related CodeBuild project and App Runner service in AWS Console and inspect CloudWatch logs.
In `us-east-1`, S3 bucket creation differs slightly from other regions and LocationConstraint can cause errors depending on the command used. Fix: for us-east-1, create the bucket without the LocationConstraint field.
aws s3api create-bucket --bucket YOUR_UNIQUE_BUCKET_NAME --region us-east-1Most Azure deployment issues are permissions, ACR builds (Tasks), or Log Analytics setup.
Error (rewritten): Azure is blocking ACR Tasks for your Container Registry, so the platform cannot run the registry-side build step (ACR Tasks). This is not a Dockerfile validation issue—your Azure subscription/tenant/registry configuration is rejecting task requests. Fix options: 1) Check the registry SKU and upgrade if needed (Standard/Premium recommended). 2) Check for Azure Policy restrictions blocking ACR Tasks in your subscription. 3) If required, open an Azure Support request to allow ACR Tasks for the registry: http://aka.ms/azuresupport
# Check ACR SKU
az acr show -n REGISTRY_NAME --query sku.name -o tsv
# Upgrade SKU (example: Standard)
az acr update -n REGISTRY_NAME --sku StandardEnsure the backend service principal has Contributor on the Resource Group. Confirm `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, and `AZURE_SUBSCRIPTION_ID` are correct.
The Azure service principal used by NEXUS AI does not have enough RBAC permissions on the target resource group (or subscription). Fix: grant Contributor on the target resource group for shared-RG mode, or Contributor on the subscription for per-project RG mode. Then wait for IAM propagation and retry deployment.
SUB_ID="YOUR_SUBSCRIPTION_ID"
RG_NAME="nexusai-shared"
SP_APP_ID="YOUR_AZURE_CLIENT_ID"
RG_LOCATION="eastus"
az group show --name "$RG_NAME" --subscription "$SUB_ID" >/dev/null 2>&1 || \
az group create --name "$RG_NAME" --location "$RG_LOCATION" --subscription "$SUB_ID"
az role assignment create \
--assignee "$SP_APP_ID" \
--role Contributor \
--scope "/subscriptions/$SUB_ID/resourceGroups/$RG_NAME"
az role assignment list \
--assignee "$SP_APP_ID" \
--scope "/subscriptions/$SUB_ID/resourceGroups/$RG_NAME" \
--include-inherited -o tableContainer Apps logs are streamed via Log Analytics. Fix: verify the Log Analytics workspace exists and is attached to the Container Apps environment.
Confirm the ACR registry exists and the image tag was pushed by the ACR Task. Check that the Container App registry settings reference the correct login server.
Keys are encrypted at rest. Keep your encryption key stable.
Provider API keys stored by NEXUS AI are encrypted using `ENCRYPTION_KEY`. If you change it, previously stored encrypted values can't be decrypted anymore. Fix: restore the original `ENCRYPTION_KEY` OR re-save your provider credentials and secrets after changing it.
Plan limits affect AI requests and deployments.
The Free plan includes 5 AI requests per day across AI Builder and standard AI generation. The daily allowance resets at 00:00 UTC. Monthly request and managed-token limits also apply.
The Starter plan includes 10 AI requests per day across AI Builder and standard AI generation. The daily allowance resets at 00:00 UTC. The Starter monthly request and managed-token limits also apply.
The Pro plan includes 30 AI requests per day across AI Builder and standard AI generation. The daily allowance resets at 00:00 UTC. The Pro monthly request and managed-token limits also apply.
Your organization hit its monthly AI request limit for the current plan tier. Fix: upgrade your plan or wait for the monthly quota reset.
Your organization may have reached the concurrent deployment limit (running/building deployments). Fix: stop unused deployments or upgrade your plan limits.
Deployments can auto-stop due to plan max runtime (or an auto-destroy setting) to control cost and resource usage. Fix: increase allowed runtime on your plan (if available) or redeploy when needed.
Request quota limits the number of generation calls you can make. Token usage measures the size of prompts and outputs (and impacts cost). Fix: if you hit request quota, upgrade or wait for reset. If costs are high, reduce max tokens and use smaller models.
Connect your own Postgres, Supabase, or any external database. Run safe SQL, inspect schema, and let AI fix deployment errors automatically.
Supabase runs on PostgreSQL. Use the Session Pooler for best compatibility with NEXUS AI short-lived connections.
Host: aws-0-us-east-1.pooler.supabase.com
Port: 5432
Database: postgres
Username: postgres.<your-project-ref>
Password: <your-database-password>
SSL mode: requirePOST /api/db-sources
Authorization: Bearer <token>
{
"name": "my-supabase",
"host": "aws-0-us-east-1.pooler.supabase.com",
"port": 5432,
"dbName": "postgres",
"username": "postgres.abcdefghijklmnop",
"password": "<db-password>",
"sslMode": "require",
"engine": "POSTGRESQL"
}Direct connection port 5432 — long-lived, migrations, admin tasks
Session pooler port 5432 — recommended for NEXUS AI
Transaction pooler port 6543 — ultra-short-lived (pgBouncer, limited SET support)POST /api/db-sources/<id>/query
{
"sql": "SELECT id, email FROM users LIMIT 10",
"mode": "preview"
}POST /api/db-sources/<id>/query
{
"sql": "UPDATE users SET status = 'active' WHERE id = 'abc'",
"mode": "execute",
"confirmed": true
}GET /api/db-sources/<id>/schemaPaste a deployment log containing database errors. NEXUS AI extracts the error, inspects the live schema, and proposes a DDL fix.
POST /api/db-sources/<id>/propose-fix
{
"logSnippet": "ERROR: relation \"profiles\" does not exist\nLINE 1: SELECT * FROM profiles WHERE user_id = $1",
"deploymentId": "<optional-deployment-id>"
}{
"proposedSql": "CREATE TABLE profiles (id UUID PRIMARY KEY, user_id UUID NOT NULL, ...);",
"explanation": "The profiles table is missing. This creates it with a user_id foreign key.",
"riskLevel": "LOW"
}POST /api/db-fix-proposals/<proposalId>/apply
{ "dbSourceId": "<id>" }nexusai_db_source_list — list all registered DB sources
nexusai_db_source_connect — register a new external DB
nexusai_db_source_delete — remove a DB source
nexusai_db_inspect_schema — get full schema graph
nexusai_db_query_preview — dry-run a SQL query
nexusai_db_query_execute — run SQL (confirmed=true for writes)
nexusai_db_propose_fix — analyze logs → propose DDL
nexusai_db_apply_fix — apply a reviewed fix proposalDROP DATABASE
ALTER ROLE / CREATE ROLE
CREATE EXTENSION
COPY ... PROGRAM
pg_read_file, pg_ls_dir, pg_exec
Multi-statement SQL (more than one statement per request)
DELETE or UPDATE without a WHERE clauseMost likely cause: wrong port or username format. Fix: In Supabase Project Settings → Database → Connection string, set the "Connection pooler" dropdown to "Session pooler". Use the Host and Port shown there (port 5432) with username format postgres.<project-ref>.
PgBouncer in transaction mode blocks certain SET commands outside a transaction. Fix: NEXUS AI uses SET LOCAL inside the transaction, which pgBouncer allows. If you see this error on a custom query, avoid session-level SET commands in your SQL.
The safety service rejected the statement before it reached the database. Fix: check the reasons field in the response. Common causes are: DELETE/UPDATE without WHERE, blocked keywords (DROP DATABASE, pg_exec), or multiple statements separated by semicolons.
The connected user may not have access to the public schema, or your tables are in a different schema. Fix: grant SELECT on information_schema to the connecting user, or ensure tables are in the public schema. Supabase users should use the postgres superuser or a role with schema access.
The AI proposal is validated through the SQL safety layer before being stored. If it fails, the endpoint returns an error instead of a bad proposal. Fix: provide more context in the logSnippet (include the full stack trace and error line). You can also manually write the DDL and execute it via /query with confirmed: true.
Deploy, manage, and automate everything from your terminal using the nexus command-line interface.
Install the NEXUS AI CLI on Linux or macOS with a single command. Node.js 18 or later is required — the installer will set it up for you if it's missing.
node --version # must be v18.0.0 or higher
npm --versioncurl -fsSL https://nexusai.run/install.sh | bashcurl -fsSL https://nexusai.run/install-mac.sh | bashnpm install -g nexusapp-clinpx nexusapp-cli auth loginnexus --version
nexus --helpThe Linux installer script supports additional flags for custom setups and self-hosted instances.
curl -fsSL https://nexusai.run/install.sh | bash -s -- --api-url https://nexus.yourcompany.comcurl -fsSL https://nexusai.run/install.sh | bash -s -- --skip-nodecurl -fsSL https://nexusai.run/install.sh -o install.sh
cat install.sh # review the script
bash install.shbash install.sh --uninstallThe macOS installer uses Homebrew for Node.js and supports both Intel Macs and Apple Silicon (M1/M2/M3).
curl -fsSL https://nexusai.run/install-mac.sh | bashcurl -fsSL https://nexusai.run/install-mac.sh | bash -s -- --api-url https://nexus.yourcompany.combrew tap nexusai/tap
brew install nexuscurl -fsSL https://nexusai.run/install-mac.sh | bash -s -- --skip-nodebash install-mac.sh --uninstallsource ~/.zshrc # zsh (default on macOS Catalina+)
source ~/.bash_profile # bashThe CLI stores credentials in ~/.nexusai/config.json. You can override any setting with environment variables — useful for CI/CD pipelines.
cat ~/.nexusai/config.json
# Output:
# {
# "apiUrl": "https://nexusai.run",
# "token": "nxk_...",
# "tokenId": "tok_..."
# }export NEXUSAI_API_URL=https://nexus.yourcompany.com
export NEXUSAI_TOKEN=nxk_your_token_here# GitHub Actions example:
- name: Deploy with NEXUS AI CLI
env:
NEXUSAI_TOKEN: ${{ secrets.NEXUSAI_TOKEN }}
run: |
nexus deploy redeploy my-app --waitnexus auth logoutrm -rf ~/.nexusaiThe npm global bin directory is not in your PATH. Find the directory with "npm bin -g", add it to your shell profile, then reload.
npm bin -g # e.g. /usr/local/bin or /home/user/.local/bin
export PATH="$(npm bin -g):$PATH"
source ~/.bashrc # or ~/.zshrc on macOSThe CLI requires Node.js 18 or later. Use nvm to switch versions without affecting your system Node.
# Install nvm
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
# Install and use Node 20 LTS
nvm install 20
nvm use 20
nvm alias default 20
# Then reinstall
npm install -g nexusapp-cliYour global npm prefix is owned by root. Fix this by changing the npm prefix to a user-writable directory instead of using sudo.
# Option 1 — change npm prefix (recommended)
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
export PATH="$HOME/.npm-global/bin:$PATH"
npm install -g nexusapp-cli
# Option 2 — use sudo (not recommended)
sudo npm install -g nexusapp-cliYour network uses a custom CA certificate. Configure npm to trust it, or set the NODE_EXTRA_CA_CERTS environment variable.
export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.crt
npm install -g nexusapp-cliRun the installer script again — it will upgrade to the latest release. Or update directly via npm.
# Re-run the installer (Linux)
curl -fsSL https://nexusai.run/install.sh | bash
# Or via npm
npm update -g nexusapp-cli
# Check current version
nexus --versionPass the version tag to npm install.
npm install -g [email protected]The CLI uses browser-based login (like GitHub CLI) to obtain a persistent access token.
nexus auth loginnexus auth login --api-url http://localhost:3001 --web-url http://localhost:3002nexus auth login --token nxk_abc123...nexus auth whoaminexus auth logoutexport NEXUSAI_TOKEN=nxk_your_token_here
export NEXUSAI_API_URL=https://nexusai.run
nexus deploy listBuild apps with AI from the terminal. The CLI Builder shares projects, files, and checkpoints with the browser AI App Builder.
nexus builder chat
# or in one step:
nexus builder new "Build an issue tracker with filters and a detail view"nexus builder chat --project <project-id>
nexus builder providersnexus builder dev --project <project-id> --dir ./my-app --opennexus builder sync --project <project-id> --dir ./my-appnexus builder check --project <project-id>
nexus builder fix --project <project-id> --attempts 2nexus builder versions --project <project-id>
nexus builder revert <message-id> --project <project-id>
nexus builder open --project <project-id>nexus builder deploy --project <project-id> --name my-app --provider dockernexus builder pull --project <project-id> --out ./my-app
nexus builder push --project <project-id> --from ./my-appUse nexus deploy create to deploy any pre-built container image.
nexus deploy create --image nginx:latest --port 80 --name my-site --provider dockernexus deploy create \
--image node:20-alpine \
--port 3000 \
--name api-prod \
--provider gcp_cloud_run \
--env NODE_ENV=production \
--env PORT=3000 \
--waitUse nexus deploy source to build and deploy directly from a repo — no Dockerfile required.
nexus deploy source --repo https://github.com/you/app --name my-app --waitnexus deploy source \
--repo https://github.com/you/api \
--branch main \
--framework node \
--install-command "npm ci" \
--build-command "npm run build" \
--start-command "node dist/index.js" \
--environment PRODUCTION \
--wait# First store the token as a secret
nexus secret create --name GITHUB_TOKEN --environment production
# Then deploy referencing that secret
nexus deploy source \
--repo https://github.com/you/private-app \
--repo-secret GITHUB_TOKEN \
--waitnexus deploy source \
--repo https://github.com/you/app \
--branch feature/new-ui \
--environment STAGING \
--auto-destroy 4 \
--waitnexus deploy source \
--repo https://github.com/you/shop \
--root-dir backend \
--name shop-api \
--services postgres \
--wait
nexus deploy source \
--repo https://github.com/you/shop \
--root-dir frontend \
--name shop-web \
--env VITE_API_URL=https://shop-api.nexusai.run \
--waitAll commands accept a deployment name or UUID interchangeably.
nexus deploy list
nexus deploy list --status RUNNING
nexus deploy list --project <project-id>nexus deploy get my-appnexus deploy status my-app --watchnexus deploy logs my-app --follow
nexus deploy logs my-app --type build --lines 200nexus deploy stop my-app
nexus deploy start my-app
nexus deploy delete my-app --yesnexus deploy scale my-app 3nexus deploy auto-destroy my-app --in 4h
nexus deploy auto-destroy my-app --at 2026-05-19T04:00:00Z
nexus deploy auto-destroy my-app --offnexus deploy redeploy my-app --waitnexus deploy rollback my-app
# Roll back to a specific prior deployment:
nexus deploy rollback my-app --target <old-deployment-id>Use nexus cp and nexus exec for LOCAL_DOCKER deployments when you need to inspect a running container, patch a single file, verify runtime state, or send a reload signal without rebuilding the image.
These commands intentionally support LOCAL_DOCKER deployments only. Google Cloud Run, AWS App Runner, and Azure Container Apps do not expose a normal container shell or Docker copy target through NEXUS AI.
Not directly. nexus cp is single-file copy by design. For directory trees, tar the directory and extract it with nexus exec, or copy a tarball and unpack it inside the container.
tar -czf assets.tar.gz ./assets
nexus cp ./assets.tar.gz my-app:/tmp/assets.tar.gz
nexus exec my-app tar -xzf /tmp/assets.tar.gz -C /app/publicNo. nexus exec is batch execution: it runs a command, captures stdout and stderr, and returns the result. There is no interactive TTY yet. Long-running commands should use --timeout.
nexus exec my-app --timeout 120000 sh -c "python manage.py migrate"Each call has a 2MB stdout and stderr cap. For large output, redirect or pipe to a file inside the container and read the portion you need.
nexus exec my-app sh -c "my-command 2>&1 | tee /tmp/command.log"
nexus exec my-app sh -c "tail -n 200 /tmp/command.log"No. Files copied into a running container are runtime changes. They can be lost when the container is recreated, scaled, redeployed, rolled back, or replaced. Always commit durable changes to the app source or image.
nexus secret list
nexus secret list --environment productionnexus secret create --name DATABASE_URL --environment production
# or inline (not recommended — stays in shell history):
nexus secret create --name API_KEY --environment staging --value "sk-abc123"nexus secret update <secret-id>nexus secret delete <secret-id> --yesnexus project listnexus project create --name "Backend API"nexus project delete <project-id> --yesnexus domain add my-app api.example.com# List domains to get the domain ID
nexus domain list my-app
# Verify (DNS changes can take up to 48h)
nexus domain verify my-app <domain-id>nexus domain remove my-app <domain-id>Use NEXUSAI_TOKEN and NEXUSAI_API_URL environment variables for non-interactive pipeline use.
name: Deploy to NEXUS AI
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install NEXUS AI CLI
run: npm install -g nexusapp-cli
- name: Deploy
env:
NEXUSAI_TOKEN: ${{ secrets.NEXUSAI_TOKEN }}
NEXUSAI_API_URL: https://nexusai.run
run: |
nexus deploy source \
--repo ${{ github.repositoryUrl }} \
--branch ${{ github.ref_name }} \
--name my-app \
--environment PRODUCTION \
--wait - name: Build and push image
run: |
docker build -t myregistry/app:${{ github.sha }} .
docker push myregistry/app:${{ github.sha }}
- name: Deploy to NEXUS AI
env:
NEXUSAI_TOKEN: ${{ secrets.NEXUSAI_TOKEN }}
run: |
nexus deploy create \
--image myregistry/app:${{ github.sha }} \
--port 8080 \
--name api-prod \
--provider gcp_cloud_run \
--waitAfter login, credentials are saved to ~/.nexusai/config.json with mode 0600 (owner read/write only). The file contains apiUrl, token, and tokenId.
cat ~/.nexusai/config.jsonNEXUSAI_TOKEN overrides the saved token (useful in CI/CD). NEXUSAI_API_URL overrides the saved API base URL. NEXUSAI_WEB_URL overrides the frontend URL used during browser login.
NEXUSAI_TOKEN=nxk_... NEXUSAI_API_URL=https://nexusai.run nexus deploy listEvery read command supports --json to output raw API data, making it easy to pipe into jq or other tools.
nexus deploy list --json | jq '.[] | {name, status, url}'Pass --yes to any destructive command (stop, delete, rollback, redeploy, domain remove) to skip the interactive confirmation.
nexus deploy delete old-app --yes
nexus deploy stop my-app --yesThe CLI cannot connect to the API. Check the API URL in your config or set NEXUSAI_API_URL to the correct address.
cat ~/.nexusai/config.json
# Fix:
nexus auth login --api-url http://localhost:3001 --web-url http://localhost:3002Your access token was revoked or expired. Log in again to get a fresh token.
nexus auth logout
nexus auth loginThe token was created with the wrong scopes. Log out and back in — the browser auth page now creates tokens with all required scopes automatically.
nexus auth logout
nexus auth loginThe name does not match any deployment in your organization. Run nexus deploy list to see all deployment names and IDs.
nexus deploy listImages must include a tag (e.g. nginx:latest, not nginx). Allowed base images: node:, python:, nginx:, alpine:, ubuntu:, debian:, postgres:, redis:, mongo:, mysql:, httpd:, php:, ruby:, golang:, rust:, gcc:.
# Wrong:
nexus deploy create --image nginx --port 80
# Correct:
nexus deploy create --image nginx:latest --port 80Fix common build and deployment failures.
The most common build failure — dependency installation exits with a non-zero code.
Pull the build logs from the dashboard or CLI. The logs stream the complete Docker build output including every line npm printed before it failed.
nexus deploy logs <deployment-name> --buildBoth npm ci and npm ci --legacy-peer-deps fail when the lockfile was generated in a different state than the current package.json. Regenerate the lockfile locally and commit it.
rm package-lock.json
npm install
git add package-lock.json
git commit -m "regenerate package-lock.json"
nexus deploy redeploy <deployment-name>Two or more packages declare incompatible peer dependencies. Identify the conflict from the npm output (look for ERESOLVE lines), then use overrides in package.json to force a compatible version.
// package.json
{
"overrides": {
"conflicting-package": "^3.0.0"
}
}Your project depends on a private registry package and the build environment has no credentials. Store your npm token as a NEXUS AI secret and add an .npmrc at the project root.
# Step 1 — store token
nexus secret set NPM_TOKEN "your-npm-token" --environment production
# Step 2 — .npmrc at project root
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
# For GitHub Packages:
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
@your-org:registry=https://npm.pkg.github.comThe npm registry was temporarily unavailable. Retry the deployment — these failures resolve on their own.
nexus deploy redeploy <deployment-name>NEXUS AI detected Next.js but could not resolve a build script, so it fell back to the development server.
NEXUS AI reads scripts.build and scripts.start from your package.json to resolve build and start commands. If scripts.build is missing, it cannot run next build and skips the build step entirely, falling back to next dev at runtime.
Add build and start scripts to package.json, commit the change, and redeploy.
// package.json
{
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start -H 0.0.0.0 -p 3000"
}
}next dev is the development server — it compiles pages on every request, exposes source maps, and uses significantly more memory. Running it in production leads to slow responses, high memory usage, and source code exposure in the browser.
Large apps can exhaust the default Node.js heap during next build. Increase the memory limit and optionally enable standalone output mode to reduce the final image size.
// package.json
{
"scripts": {
"build": "NODE_OPTIONS='--max-old-space-size=4096' next build"
}
}
// next.config.js — standalone output
module.exports = { output: 'standalone' };The build process was killed before it completed — usually an out-of-memory kill or oversized build context.
Exit code 137 means the process was killed by the OS — typically an out-of-memory (OOM) event during the Docker build. Large dependency installs or native module compilation are the most common triggers.
Add a .dockerignore file to exclude large directories from being sent to the build. This significantly reduces build time and memory usage.
# .dockerignore
node_modules
.next
dist
build
.git
*.log
coverage
.env*
.env.localNative modules require system build tools (python3, make, g++). NEXUS AI automatically detects and installs build dependencies for known native modules. If your module is not detected, open a support ticket with your deployment ID and the full build log.
NEXUS AI is an agentic AI app builder and full-stack deployment platform. Explore the AI App Builder, learn more on the About page, read the documentation, or contact the team through nexusai.run/contact.
Start for free · Read the documentation · About NEXUS AI · Contact