Databases on NEXUS AI: Managed, Portable, and Ready for AI-Built Apps
Author: NEXUS AI Team
Category: Databases · Platform · AI Deployments
Reviewed: October 26, 2026
CLI syntax verified: NEXUS AI CLI 4.3.2
Reading time: 13 minutes
Most AI-built apps fail at the same point. The interface works, the demo impresses, and then someone asks where the data lives, who backs it up, and what happens when the AI agent runs a migration at 2 a.m.
Generating code got fast. Running the database underneath it did not get any easier.
NEXUS AI gives every app a database path that matches where it is in its life: a database that starts with the app, a standalone database you share between apps, the same database in your own AWS, Azure, or Google Cloud account, and a guarded way to connect databases you already run. One dashboard, one CLI, and one MCP server manage all of them.
This article explains what each option is, where to use it, how it looks from a management point of view, how portable your data stays, and why the design fits AI deployments in particular.
What NEXUS AI databases are
NEXUS AI databases are the data layer of the NEXUS AI deployment platform. There are four ways to use them:
| Option | What it is | Engines | Manage with |
|---|---|---|---|
| App database service | A database that runs next to one app, created with the deploy | PostgreSQL, MySQL, MongoDB, Redis | nexus db |
| Managed database on NEXUS AI | A standalone database you create once and attach to any app on NEXUS AI | PostgreSQL, Redis | nexus managed-db --local |
| Managed cloud database | A standalone database on Amazon RDS, Google Cloud SQL, or Azure Database, in the platform account or yours | PostgreSQL, MySQL | nexus managed-db --provider |
| Connected external database | A database you already run elsewhere, connected for schema inspection, guarded queries, and AI fix proposals | PostgreSQL, MySQL | Dashboard and MCP |
All four sit behind the same organization, the same role-based permissions, and the same tools.
Where to use each option
App database service: for prototypes and single apps
Add a database when you deploy, and NEXUS AI runs it next to your app and injects the connection settings:
nexus deploy source --repo https://github.com/your-org/helpdesk --services postgres,redis
Use it when one app owns its data: a prototype, an internal tool, a side project, or the first version of a product. It is the fastest path from "generated code" to "working app with real data".
Each service gets backups you control:
nexus db services helpdesk # find the service ID
nexus db backup <service-id> # back up now
nexus db backup-schedule <service-id> --enable --retention 14 # daily, keep 14 days
Managed database on NEXUS AI: for data shared by several apps
When two apps need the same data (an API and a worker, or an app and its admin panel), the database should not belong to either one. Create it on its own:
nexus managed-db create orders-db --local --engine postgres
nexus managed-db attach orders-db --deployment orders-api
nexus managed-db attach orders-db --deployment orders-worker
Each app receives DATABASE_URL (or REDIS_URL for Redis) on its next deploy. Use --env-prefix to give a second database a different name, such as ANALYTICS_URL. Deleting an app no longer puts the data at risk, because the database has its own lifecycle.
Managed databases on NEXUS AI listen on the primary host's private Docker network, so they attach to apps deployed on NEXUS AI on that host.
Managed cloud database: for production and compliance
When the data needs a cloud provider's durability, encryption, and controls, create the database on Amazon RDS, Google Cloud SQL, or Azure Database for PostgreSQL and MySQL:
nexus managed-db create billing-db --provider AWS_RDS --engine postgres \
--engine-version 17.10 --instance-class db.t3.micro --allocated-gb 20 --region us-east-1
Or let the deploy create it for you. On a cloud provider, --create-db provisions a managed database paired with the app:
nexus deploy source --repo https://github.com/your-org/billing --provider aws_app_runner --create-db postgres
Amazon RDS instances are created with storage encryption and seven days of automated backups. On AWS you can choose --network-mode vpc to keep the database private, reachable only from App Runner apps in the same account.
If you have added your own cloud credentials in Deployment Providers, new cloud databases are created in your AWS account or Azure subscription, not the platform's. See Bring Your Own Cloud Account.
Connected external database: for data you already have
Not every database should move. Connect an existing PostgreSQL or MySQL database in the dashboard, then inspect its schema, preview queries, and get AI-proposed fixes from your app's error logs, all with guardrails described below.
Quick decision guide
| Your situation | Start with |
|---|---|
| Prototype or demo with real data | App database service |
| One app, small team, needs backups | App database service with a backup schedule |
| Several apps share the same data | Managed database on NEXUS AI |
| Production workload, customer data, uptime commitments | Managed cloud database |
| Compliance requires data in your own account | Managed cloud database with your own cloud provider |
| Data already lives somewhere else | Connected external database |
The management point of view
For the person responsible for the platform, databases are usually where tools sprawl: one console per cloud, scripts for backups, and a wiki page about who has the passwords. NEXUS AI keeps them in one place.
One inventory. Every database in the organization, whichever option and provider, appears in the dashboard and in nexus managed-db list and nexus db services.
Permissions by role. Reading data and changing it are separate permissions. A teammate with read access can run SELECT queries; write and schema-changing queries require the managed_databases.manage permission. Assign roles per person, and use scoped access tokens for CI.
Backups with a floor. Scheduled backups keep at least 7 days of history, and retention can be raised but never lowered below that. Expired automatic backups are pruned on schedule; backups you upload are never deleted automatically.
Recovery that does not overwrite. Managed database restores always create a new database from a snapshot:
nexus managed-db snapshot orders-db --notes "before v2 migration"
nexus managed-db restore orders-db --snapshot <snapshot-id> --new-name orders-db-check
You compare the restored copy with the original before you switch anything.
Safe sharing of backups. Instead of handing out credentials, create a signed download link that expires in 30 to 3,600 seconds:
nexus db backup-download <service-id> <backup-id> --share --ttl 900
Plan limits you can predict.
| Plan | Standalone managed databases |
|---|---|
| Free | App database services only |
| Starter | 2 |
| Pro | 10 |
| Enterprise | Unlimited |
Portability: your data is never trapped
A database platform is only as good as your ability to leave it. NEXUS AI is built on that assumption.
Standard engines, no proprietary layer. PostgreSQL, MySQL, MongoDB, and Redis run as themselves. Your app connects with its normal driver and a normal connection URL. No SDK, no special query language.
Backups in native formats. PostgreSQL backups use pg_dump, MySQL uses mysqldump, and MongoDB uses mongodump. Download any backup and restore it with standard tools on any server:
nexus db backup-download <service-id> <backup-id> --out ./prod.dump
pg_restore -d "$TARGET_DATABASE_URL" --no-owner ./prod.dump
Move data between services. Copy production into staging without leaving the platform, as long as both use the same engine:
nexus db restore-to <staging-service-id> <backup-id> --yes
Or bring data in from outside with nexus db backup-upload.
Connection settings, not code changes. Apps read their database from environment variables. Detach one database and attach another, redeploy, and the app follows. Moving from a database on NEXUS AI to Amazon RDS is a data copy and an attach, not a rewrite.
Your cloud account, your resources. Cloud databases created with your own provider credentials live in your account. If you stop using NEXUS AI, they keep running where they are.
Flexibility: one workflow, many shapes
- Four engines for different jobs: relational data in PostgreSQL or MySQL, documents in MongoDB, caches and queues in Redis.
- Four homes for standalone databases: NEXUS AI, Amazon RDS, Google Cloud SQL, and Azure Database.
- Public or private networking on AWS: public endpoints restricted to allowed address ranges, or VPC mode with no public endpoint.
- Several databases per app, each under its own environment variable prefix.
- Three ways in: the dashboard for people, the CLI for scripts and CI, and the MCP server for AI assistants.
Who it is for
Founders and solo builders who generated an app with AI and need real data, backups, and a URL today, without learning a cloud console.
Product and agency teams shipping many small apps, who need each one to have a database that is backed up, separated, and easy to hand over.
Platform and DevOps leads who want one inventory, consistent backups, and role-based access across every database their teams create.
Regulated and enterprise teams who need the data in their own cloud account, encrypted, with their own audit trail, while developers keep a simple workflow.
Why NEXUS AI is a strong fit for AI deployments
AI changes who touches the database. An agent in Claude, Cursor, or Codex can now create a schema, write a migration, and run it, often faster than a person can review it. That is useful, and it needs guardrails that do not depend on the agent behaving perfectly.
AI assistants get real database tools. The NEXUS AI MCP server exposes database operations directly to AI assistants: listing services, taking and restoring backups, creating and attaching managed databases, taking snapshots, inspecting schemas, and running queries. An agent can deploy an app with a database and back it up before a migration in the same conversation.
Every query is classified before it runs. Queries are sorted into reads, data changes, schema changes, and blocked operations. Statements such as DROP DATABASE, role changes, extension installs, and server file access are refused outright.
Preview before execute. On connected databases, a preview runs read queries with EXPLAIN and does not apply changes, so the agent (and you) can see what a statement would do first. Execution runs with a statement timeout and returns at most 1,000 rows by default.
Permissions apply to agents too. An assistant acts with the permissions of the person or token it uses. Give an agent a read-only role and it cannot change data, whatever it is asked to do.
Fixes are proposals, not surprises. NEXUS AI can read an app's error logs and propose a schema fix, such as a missing column or index. The fix is stored as a proposal and is applied only when someone applies it.
Backups are one command away from any agent. The habit that saves teams most often is simple: snapshot before a migration. With MCP, asking the agent to "take a snapshot first" is all it takes, and restores never overwrite the original.
The database follows the app's lifecycle. AI-built apps change quickly: prototype on Monday, shared with a team on Wednesday, in production the next month. The path from app database service to managed database to your own cloud account uses the same commands and the same connection variables at every step.
What to know before you start
- Managed databases on NEXUS AI support PostgreSQL and Redis; use a cloud provider for managed MySQL.
- Managed databases on NEXUS AI attach only to apps running on the NEXUS AI primary host.
- Private (VPC) cloud databases must be in the same cloud account as the app that uses them.
- App database service restores replace the current data in place. Take a fresh backup first if you may want the current state back.
-
restore-torequires the source and target to use the same engine.
Frequently asked questions
What databases does NEXUS AI support?
PostgreSQL, MySQL, MongoDB, and Redis as app database services. PostgreSQL and Redis as managed databases on NEXUS AI. PostgreSQL and MySQL as managed cloud databases on Amazon RDS, Google Cloud SQL, and Azure Database.
Can I export my data and leave?
Yes. Backups use the engines' native dump formats, so you can download them and restore them anywhere with standard tools. Cloud databases created with your own credentials are already in your account.
Is it safe to let an AI agent run queries?
NEXUS AI classifies every query, blocks dangerous statements, separates read and write permissions, and offers a preview mode. Give agents the least access they need, and ask them to snapshot before migrations.
What is the difference between nexus db and nexus managed-db?
nexus db manages databases that run alongside one app, created with --services. nexus managed-db manages standalone databases that you create once and attach to any number of apps.
Can I move from a database on NEXUS AI to Amazon RDS later?
Yes. Create the RDS database, copy the data with a backup and restore, attach the new database to the app, and redeploy. The app keeps reading DATABASE_URL.
How long are backups kept?
Scheduled backups are kept for 7 days by default, and you can raise retention per service. Backups you upload are kept until you delete them.
Start with the database your app needs today
Deploy your next app with --services postgres, turn on a backup schedule, and connect your AI assistant to NEXUS AI through MCP. When the data outgrows one app, create a managed database and attach it. When it needs a cloud provider or your own account, move it there with the same tools.
Top comments (0)