npx @xano/sdk deploy deploys to
it, with no Xano account and no network round-trip once the Engine is cached. It runs the same
imports, statements and tests as an ephemeral in Xano’s cloud.
Deploy to the Engine
In a scaffolded project, deploy to the Engine with thexano:deploy script:
On Windows on Arm? There is no Xano Engine build for your machine yet. Wherever this page
says
npm run xano:deploy, run npm run xano:deploy:ephemeral instead: it deploys the same code
to an ephemeral in Xano’s cloud. That needs a Xano account, so sign in first
(Connect to Xano). See
supported platforms.npx @xano/sdk deploy ./xano/index.ts --keep-data. On a fresh machine
the first deploy downloads the newest Engine for your platform from Xano’s release CDN, checks it
against the sha256 its release recorded, starts it, and imports your backend. The Engine runs on
macOS (Apple silicon and Intel), Linux (x64, arm64) and Windows (x64); see
Supported platforms. Each Engine version downloads once per
machine and is shared by every project on it.
- The backend URL. Your APIs answer there, on loopback only.
- How to reach its Meta API.
npx @xano/sdk local tokenprints the bearer (below). - The MCP server a coding agent connects to. See Engine MCP server.
npx @xano/sdk impersonate refuses it.
Read what you built in xano/, call the Meta API with npx @xano/sdk local token, or have your
agent look through the MCP server.
Your frontend follows the deploy
In a scaffolded project, a deploy that publishes no static site writes the Engine’s URL into.env.local as VITE_XANO_HOST, inside a marked block that leaves your own values alone.
Restart npm run dev to pick it up. --no-dev-env turns the write off. A .env.local that your
repo does not gitignore is reported, never written. To have the Engine serve a built frontend
instead, see Frontend hosting.
Commit the pin
The first deploy pins the Engine version inpackage.json, creating the file if the project has
none:
- A newer Engine is offered, never applied. Each deploy checks at most once an hour. In a
terminal it asks, defaulting to no. In CI, piped output or
--jsonit prints one line and keeps the pin.XANOSDK_NO_UPDATE_CHECK=1turns the check off. npx @xano/sdk local updatemoves the pin on purpose to the latest Engine, or to--version v0.1.14(downgrades included). It downloads that version and restarts this project’s Engine on it. Commitpackage.jsonafterwards.- A teammate’s pin change reaches you on your next deploy. When the running Engine is on a different version from the pin, the deploy stops it, starts the pinned one, and says so.
Keep your rows between deploys
The scaffoldednpm run xano:deploy passes --keep-data, so rows you enter through your app
survive each code change:
- The first deploy seeds. The Engine starts empty, and your tables get their seed rows.
- Every later deploy merges. Code and schema changes land, objects you removed are deleted, and existing rows stay. Seed rows are not written again.
--resetstarts over.npm run xano:deploy -- --resetreplaces the Engine’s backend and seeds it fresh.
--keep-data deploy seeds it instead of merging (see
below). A project with its own data in xano/data is the
exception: see Run on your own data.
The Engine does not inherit your shell’s environment, so no credential in your shell reaches it.
It gets the platform basics and the usage-telemetry variables (DO_NOT_TRACK, CI,
XANO_TELEMETRY, XANO_TELEMETRY_URL, XANO_TELEMETRY_ANONYMOUS_ID) when it starts. If you
change them while XANO_TELEMETRY is on for you or the running Engine, the next deploy restarts
the Engine with your values, so an opt-out takes effect then. While it is unset or off for both,
the deploy reuses the running Engine. After you upgrade the SDK, a deploy that opts out restarts
an Engine an earlier version started, one time. The full rules are in
Environment variables.
Run on your own data
A project can carry its own Engine data inxano/data: the records, stored files and instance
secrets of a workspace exported from Xano. npx @xano/sdk init --from <bundle>.tar.gz puts them
there when it turns an exported workspace, such as the end-of-trial download, into a project (see
Existing workspace):
xano/data, deploy --local runs the Engine on that folder instead of a
throwaway one:
- Rows stay between runs. Stopping the Engine,
npx @xano/sdk local updateand a restart all keep every row. The next deploy starts the Engine on the same data again. - Every deploy merges, as
--keep-datadoes, with or without the flag. Code and schema changes land, existing rows stay, and seed rows are never written over them. --resetis refused, with the steps to start over: stop the Engine, movexano/dataout of the project, and deploy again, which seeds a throwaway Engine.- The workspace must be in the data. Before writing anything, the deploy checks that the workspace it targets is one the data holds, and refuses rather than create one beside it.
- It never leaves your machine.
xano/dataholds the workspace’s secrets. It is gitignored in new and existing projects, a deploy warns if git already tracks it, and it is never packed into a publish, an archive or a source upload.init --forcedoes not delete it. - One Engine per data folder. A deploy refuses to start the project’s Engine while another
Engine runs on the same
xano/data.
Work against it
After a deploy to the Engine, it is the backend this project tracks. These commands reach it with no flag and no Xano account:local, or
local:<name> for another Engine from npx @xano/sdk local list (for example
npx @xano/sdk test run-all --on local).
A script that calls the meta API needs the Engine’s own bearer. npx @xano/sdk local token prints it on
stdout, so it works in a subshell:
--json adds the Engine’s URL and workspace id. A restart mints a new bearer, so read it again
after one. The bearer is never written to disk or printed in a deploy summary.
Manage engines
An Engine has no expiry, and nothing on a server reclaims it. These commands see and stop them. Each Engine is named after its project’s path (xanosdk- plus 12 hex characters), and token,
mcp and update default to this project’s Engine.
Fetch an Engine ahead of time
To deploy with no network later, on a plane or a locked-down machine, download the Engine first:deploy --local on that version finds it cached and runs offline.
--json prints { "version", "downloaded", "path" }. With XANOSDK_ENGINE_OVERRIDE set it
fetches nothing and says why.
Run a different Engine without moving the pin
To try an experimental build, or a published version the project has not moved to, override the pin for your own runs:https URL to an Engine archive, or a path to one. The flag beats
the variable, and the variable beats the pin. An override never reads or writes the pin and never
checks for updates. Plain http:// is refused unless the host is this machine.
Two more variables apply to overrides and release lookups:
XANOSDK_ENGINE_TOKENis sent only to an override URL’s host, for a private archive.XANOSDK_ENGINE_RELEASES_URLpoints version lookups at a different Engine release folder, one that holds anindex.jsonlike the default,https://cdn.xano.com/releases/engine. An address of the old release service no longer resolves. Its Engines download fresh on every deploy, andnpx @xano/sdk local updateandnpx @xano/sdk local cache fetchrefuse while it is set.
Disk use
Engine binaries and the runtime data a running Engine keeps (unpacked runtime files, logs, records of running Engines) live in~/.xanosdk/local-engine. Set XANOSDK_ENGINE_HOME to move it. Expect
roughly 600 MB after the first deploy, and a similar amount for each Engine version you run.
Xano AI on the Engine
Agents withllm: { type: "xano-ai" } (and xano-free agents, which now run as Xano AI) and the
s.ai.* model statements run on the Engine with no key to copy. Each deploy hands the Engine a Xano AI credential from your npx @xano/sdk login
sign-in and prints a Xano AI: line saying whether it is on and who pays. See
Xano AI on the Xano Engine.
Where the Engine differs today
The Engine is the same backend as an ephemeral. Four gaps change a command you run today:-
You cannot cut a release from the Engine.
npx @xano/sdk release createrefuses it by name, because a release is cut on your Xano instance. Deploy to an ephemeral first, then cut the release from there:You can also stage on a Xano branch of your workspace and cut from it withnpx @xano/sdk release create v1.4.0 --from workspace --branch <label>. See Releases. -
The Engine has no Xano editor. There is nothing to sign in to, so
npx @xano/sdk impersonaterefuseslocal,local:<name>, and a bare run after a local deploy. Usenpx @xano/sdk local tokenfor the Meta API andnpx @xano/sdk local mcpfor agents. An ephemeral still opens in the editor withnpx @xano/sdk impersonate ephemeral:<name>. -
There is no Engine build for Windows on Arm. The Engine runs on macOS (Apple silicon and
Intel), Linux (x64, arm64) and Windows (x64). On any other platform a deploy to the Engine is
refused before anything compiles. Use
npm run xano:deploy:ephemeralto deploy to an ephemeral instead. See Supported platforms. -
An Engine update or restart starts it empty. Rows do not survive
npx @xano/sdk local update, a version change, a telemetry change (above), or a restart. The next--keep-datadeploy seeds the Engine instead of merging. Treat rows on the Engine as scratch data, unless the project runs on its own data inxano/data, which keeps them.
Next
- Connect your coding agent to the Engine: Engine MCP server.
- Put the same backend in Xano’s cloud: Ephemerals.
- Every flag on
deployandlocal: CLI reference.