Xuda logo Xuda Docs User Guides
/
xuda.io
← All guides On-Prem

Xuda On-Prem API Reference

Source file: xuda-on-prem-api-reference.md

Xuda On-Prem API Reference

Xuda On-Prem is a sales-led deployment model: Xuda engineers install the same control-plane stack Xuda runs on its own regions onto infrastructure you control. There is no On-Prem module, no On-Prem endpoint and no self-serve purchase path anywhere in the platform. This reference documents what is genuinely programmable around an On-Prem engagement: the eighteen CPI methods that carry the On-Prem story, what a delivered installation physically contains, and the mechanism by which it is installed, deployed and updated.

There Is No Self-Serve On-Prem API

Read this before you plan an integration, because it will save you looking for something that does not exist.

Of the 965 methods in the shipped method catalog, not one is named for, or described as, on-prem or self-hosted. There is no on_prem_module and no onprem_* method. Every On-Prem entry point in the product is a contact form: the public site routes its calls to action to Contact Sales, and the dashboard Create sheet's "Enterprise App" tile, badged On-prem, routes to the support form. There is no license key, activation key or license check anywhere in the platform code, so an On-Prem installation is bounded by contract, not by a technical entitlement.

What that leaves you is three things, and this reference covers all three:

  • Eighteen existing methods that touch the On-Prem story. Three are reachable with a developer API key, eight require a signed-in dashboard session, and seven are operator-only fleet methods. They are documented in full below, including the operator ones, because those are the actual mechanism by which the platform gets installed onto and updated on a server, which is the substance of what On-Prem delivers.
  • The delivery artifact and the on-box installer. See How An Installation Is Delivered and What Runs On The Box.
  • The update mechanism. Soft deploys, hard reinstalls and surgical module hot-fixes, all described in How An Installation Is Updated.

If you are looking for a command line installer, there is not one. There is no xuda onprem CLI in the Xuda CLI. Installation and updates are performed by the on-box installer and driven from the operator console described below.

How To Call These Methods

Every method here is a CPI method. CPI methods are dispatched by name over the Xuda API and MCP layer, and the normal credential for that layer is the account API key. For the transport-level detail, including how requests are framed and how the MCP layer exposes methods, see /api-mcp-integration.

Two rules decide whether you can reach a given method:

  • A method flagged private is not reachable with a developer API key. It is a dashboard-session method, and the account identity comes from the session rather than from a parameter. This holds even when the method's clearance is public: get_plans has public clearance and is still private, so an API key cannot call it.
  • clearance is the caller class enforced at the CPI layer. clearance: 'admin' means app or project admin, and it is not superuser. Every ops_* method re-checks superuser in code on top of its clearance and answers -403 to anyone else.

The public On-Prem marketing page's Contact Sales form is not backed by a CPI method at all, so it is not part of this surface. From inside the product, the working programmatic inbound channel for an On-Prem conversation is submit_support_ticket.

What The Availability Labels Mean

Every method below carries one explicit availability line. Read it first, because it tells you whether you can call the method from your own code today.

  • Availability: API key means an external developer API key or the MCP layer can call it. Three methods here carry this label.
  • Availability: Dashboard session means a signed-in user in the Xuda dashboard can call it, and an API key cannot. Eight methods here carry this label.
  • Availability: Public endpoint means no authentication at all. No On-Prem-related method carries this label. Nothing in this surface is unauthenticated.
  • Availability: Operator only means Xuda staff, listed for completeness. Seven methods here carry this label, and every one of them returns { code: -403, data: 'superuser only' } to anybody else.

Method Index

Method What It Does
get_xuda_servers_info Reads the live fleet topology: which Xuda regions exist and which countries each serves.
get_account_datacenters Lists the datacenters associated with the calling account.
get_region_hosting_options Resolves a macro-region to a farm-first hosting offer plus the DigitalOcean datacenters for it.
get_plans Reads the plan object, including the Enterprise T1/T2/T3 membership tiers and the four support plans.
submit_support_ticket Creates a support ticket. This is the working inbound channel for an On-Prem conversation.
create_external_vps Registers a third-party server you already own as SSH inventory and returns a bootstrap command.
verify_external_vps_ssh Verifies SSH reachability of a registered external server and marks it active.
deploy_datacenter Provisions a dedicated datacenter app with its own CouchDB credentials and droplet.
configure_datacenter_replication Configures cross-datacenter replication type, source and direction for an app.
reinstall_datacenter_resources Reinstalls the hosting resources for a datacenter app as a ten-step job.
assign_ssh_keys Installs your own SSH public keys on a server Xuda runs for you.
ops_list_servers Operator: lists fleet servers with live status and deploy state.
ops_deploy_server Operator: queues a soft or hard code deploy to a region app-server.
ops_server_deploy_status Operator: polls deploy status and progress for one server or the whole fleet.
ops_add_infra_box_region Operator: onboards a raw box as an infra host, a region control-plane, or both.
ops_list_modules Operator: lists managed modules with published versions and reloadable processes.
ops_hotfix_preview Operator: dry-runs a batch module hot-fix and returns the plan without writing.
ops_batch_hotfix Operator: applies a surgical module hot-fix and reloads only the affected processes.

get_xuda_servers_info

Get Xuda Servers Info

Queries the fleet database for active application servers and returns their id, countries, status and datacenters. This is the only public read of the fleet topology, and it is what a customer or an agent uses to see which Xuda regions exist and which countries each one serves. The implementation selects only servers in the live state and returns only the fields _id, countries, server_status and do_datacenters, so a server that is mid-deploy or failed is invisible to callers.

Availability: API key

Parameters

This method takes no parameters.

Notes

  • Clearance public, and not private, so an API key can call it. It is also exposed as an MCP tool.
  • Cached, with a cache timeout of 60 seconds. Two calls inside the same minute can return the same snapshot.
  • No plan gate.
  • Because mid-deploy and failed servers are filtered out, the result set legitimately shrinks during a rollout. Do not treat a missing region as a decommissioned one.

get_account_datacenters

Get Account Datacenters

Returns the datacenters associated with the calling account. For an enterprise customer running dedicated datacenter apps, this is the inventory read behind the datacenter pickers.

Availability: API key

Parameters

This method takes no parameters.

Notes

  • Clearance user, and not private, so an API key can call it. It is also exposed as an MCP tool.
  • No plan gate. The account identity determines the result.

get_region_hosting_options

Get Region Hosting Options

Resolves a macro-region to a farm-first hosting offer plus the DigitalOcean datacenters for that region. It powers the region-first deploy wizard: the Xuda Farm is offered first where there is capacity, DigitalOcean otherwise, with a persistent "More options" that opens the full global list. It returns availability, a monthly price, a farm server_id, a dedicated_v4 block (support flag, IP add-on price, the region the VM lands in, the user's nearest region, and a relocated flag set when enabling a dedicated IP moves the server) and an ipv6.supported flag.

Availability: API key

Parameters

This method declares no fields in the shipped contract, so there is no declared parameter table for it.

The implementation does read parameters. They are listed here from the code rather than from the declared contract, and no type is stated for them because none is declared:

  • macro_region. Required in practice. It must be one of the recognized macro-region keys or the call answers code: -1.
  • app_server_type. A server slug, from which cores, ram, disk and disk preference are derived.
  • app_type.
  • dedicated_ip.
  • pinned_datacenter.
  • cores, ram_gb, disk_gb and tier. Legacy explicit sizing fields, superseded by app_server_type.

Notes

  • Clearance user, and not private, so an API key can call it. It is not exposed as an MCP tool.
  • Not cached. Availability reflects real farm capacity at call time.
  • No plan gate.
  • Because the declared contract is empty, treat the fields above as unversioned. Anything not declared can change without a contract change.

get_plans

Get Plans

Returns the configured subscription plan object from server config. This is how both the dashboard Plans screen and the public pricing and enterprise pages learn about the Enterprise T1/T2/T3 membership tiers and the four support plans, including Enterprise T3, titled "Own", whose description reads "Deploy the Xuda platform on your personal servers".

Availability: Dashboard session

Parameters

This method takes no parameters.

Notes

  • Clearance is public, but the method is flagged private, so despite that clearance an API key cannot call it. This is the clearest example on this surface of why the private flag, not the clearance, decides API-key reachability.
  • Cached. No plan gate.
  • Enterprise T3 carries the literal price string "call", which renders as "Call" with no monthly figure and resolves to a null renewal amount on the billing side, so checkout shows a contact prompt rather than a number.

submit_support_ticket

Submit Support Ticket

Creates a support ticket, notifies the support team and sends the user an auto-reply confirmation. This is the real, working inbound channel for an On-Prem or Enterprise conversation from inside the product, and it is the destination of the dashboard "Enterprise App" tile.

Availability: Dashboard session

Parameters

Name Type Required Description
communication_type string Yes Preferred channel for the ticket (call, ticket, or chat).
ticket_topic string Yes Top-level support topic the ticket falls under.

Notes

  • Clearance user, private, so a dashboard session is required.
  • No min_plan, but a per-channel support-plan gate is declared as min_support_plan: { call: 'enterprise', chat: 'business', ticket: 'starter' }. The ticket channel is open on the free Starter support plan, chat needs Business, and a phone callback needs the Enterprise support plan.
  • Only the two fields above are declared. The dashboard form submits more of them, spread from its own form model: ticket_subtopic, ticket_tertiary_subtopic, ticket_first_name, ticket_last_name, ticket_phone, ticket_subject, ticket_where_is_the_error and ticket_description. They are accepted, but they are not part of the declared contract.
  • The valid topics come from server config and are Studio, Billing, Deploy, Runtime, Dashboard, Marketplace, Support, Account, Vps and Inquiries. There is no feature topic and no enterprise subtopic, so the dashboard's Enterprise deep link, which passes topic=feature&subtopic=enterprise, matches no option and the topic has to be chosen by hand before the form will submit.
  • Tickets are written to the tickets control database, which replicates fleet-wide.

create_external_vps

Create External VPS

Registers a third-party VPS you already own as an external_vps app, which is SSH inventory. It creates the app document in a pending state and returns a one-line bootstrap command that authorizes Xuda's platform public key on your server. It stores no password and no private key. It returns { app_id, app_obj: { _id }, bootstrap_command, ssh_user, host, port }. When the platform SSH key is unavailable, bootstrap_command comes back null with data.warning = 'platform ssh key unavailable'.

Availability: Dashboard session

Parameters

Name Type Required Description
data.app_name string Yes Display name for the external VPS.
data.host string Yes Hostname or IP address of the external server.
data.port number No SSH port (default 22).
data.ssh_user string No Login user on the target server (default root).
data.provider_label string No Optional free-text label for the server's provider.

Notes

  • Clearance user, private, so a dashboard session is required. No plan gate.
  • This is inventory registration, not an install. The app document records is_installed: false, no Xuda platform stack is installed by this flow, and deleting the app never touches the third-party server. Do not confuse it with an On-Prem installation, which is performed by Xuda engineers with the tooling described further down this page.
  • The app lands in a pending state (app_status_code: 2) and stays there until verify_external_vps_ssh succeeds.
  • The returned bootstrap_command is meant to be run by you, on your own server, as the SSH user you supplied.

verify_external_vps_ssh

Verify External VPS SSH

Verifies SSH reachability of an external_vps app using Xuda's platform key, in batch mode, with accept-new host key handling and a bounded timeout. On success it captures the host fingerprint plus basic server information and marks the app active. On failure it leaves the app pending with the reason recorded.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Id of the external_vps app to verify.

Notes

  • Clearance user, private, so a dashboard session is required. No plan gate.
  • On success the app flips to active (app_status_code: 3) and the app document records the fingerprint plus uname, hostname, id, df and free output.
  • Safe to repeat. A failed verification records last_verify_error and leaves the app pending, so you can fix the key or the firewall and call it again.

deploy_datacenter

Deploy Datacenter

Provisions a datacenter app by saving a master datacenter application document with generated CouchDB admin credentials and creating its droplet. This is the dedicated-infrastructure product inside Xuda, and it is the closest self-serve step to On-Prem: the hardware is dedicated to you, but Xuda still runs it.

Availability: Dashboard session

Parameters

Name Type Required Description
data.create_datacenter.app_name string Yes Denotes the name of the deployment.
data.create_datacenter.app_region string No The Datacenter Region is the location where the server will be set up.
data.create_datacenter.app_server_type string No Datacenter Server Type refers to the server classification that indicates the CPU, memory, and disk size.

Notes

  • Clearance admin (app or project admin, not superuser), private, so a dashboard session is required.
  • Plan gate: min_plan: pro. This is one of the few methods on this surface that carries a platform plan gate at all.
  • CouchDB admin credentials for the datacenter are generated during the save. They are not supplied by the caller.

configure_datacenter_replication

Configure Datacenter Replication

Configures cross-datacenter data replication for the app, setting the replication type, source and direction. This is the mechanism behind the datacenter sync feature that the Enterprise T1 membership tier unlocks in the dashboard.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.
replicate_data.app_datacenter_replication.replicate_type string Yes Value for the replicate data app datacenter replication replicate type field.
replicate_data.app_datacenter_replication.replicate_from string Yes Value for the replicate data app datacenter replication replicate from field.
replicate_data.app_datacenter_replication.replicate_direction string No Value for the replicate data app datacenter replication replicate direction field.
apply boolean No When false, the replication configuration is saved WITHOUT running it. Use this when editing an existing setup, so re-saving a completed one-time seed does not re-copy the datacenter's data. Omitted or true keeps the original behavior: save and run immediately.

Notes

  • Clearance admin, private, so a dashboard session is required. No min_plan on the method itself.
  • The dashboard surface that calls it is gated in the UI at Enterprise T1. The gate is a UI-level plan check, not a method-level one, so the entitlement you see in the product is stricter than the method contract.
  • Use apply: false when editing an existing configuration. Re-saving a completed one-time seed with apply omitted or true will re-copy the datacenter's data.

reinstall_datacenter_resources

Reinstall Datacenter Resources

Reinstalls the hosting resources for the given datacenter app. It is declared as a job with ten steps: initiating process, connecting to server, initiating directories, creating self signed certificate, creating ini files, creating admin ini files, creating db, copying data, creating design docs, activating the server.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the application this request targets.

Notes

  • Clearance admin, private, so a dashboard session is required. No plan gate.
  • It runs as a background job. Poll the job rather than expecting a synchronous result.
  • This is a rebuild of the hosting resources, not a data-preserving no-op. Treat it as a maintenance action.

assign_ssh_keys

Assign SSH Keys

Installs the given SSH public keys on the hosting server of a deployment, datacenter, VPS or webserver app. Farm VMs are reached over the Proxmox guest agent and everything else over SSH. Keys that are switched off or expired are refused. This is how you keep your own operator access to a server Xuda runs for you.

Availability: Dashboard session

Parameters

Name Type Required Description
app_id string Yes Unique identifier of the target deployment or server app to assign the SSH keys to.
ssh_keys array Yes Array of SSH key document IDs whose public keys are copied onto the server.

Notes

  • Clearance admin, private, so a dashboard session is required. No min_plan on the method itself.
  • The dashboard button that calls it is additionally gated at Enterprise T1 for non-VPS app types. As with datacenter replication, that gate lives in the UI, not in the method contract.
  • You pass key document ids, not key material. The keys must already exist on the account, and a key that is disabled or past its expiry is rejected rather than silently skipped.

The Operator Methods

The seven methods that follow are not customer API. They are documented because they are the actual mechanism by which the Xuda platform is installed onto, deployed to and maintained on a server, which is the substance of what On-Prem delivers. If you are evaluating On-Prem, this is the operational model you are buying into.

All seven are flagged private and declare clearance admin, and every one re-checks superuser in code on top of that. A caller who is not a Xuda superuser receives { code: -403, data: 'superuser only' }. Every call is written to the account log with security: true, naming the acting user, the target servers and the result.

ops_list_servers

Ops: list fleet servers

Lists the platform's own fleet servers, meaning regions plus farm nodes, with live status and deploy state. Read only. It loads every fleet document from the orchestrator's CouchDB, normalizes each into a view containing id, role (region, farm_node, farm_vm, datacenter, other), deployable, provider, hostname, public_ip, private_ip (the WireGuard mesh address), server_status, server_is_full, capacity, countries, location, region_name, metro, macro_region and a deploy block, then returns { servers, deploy_targets, orchestrator, note }.

Availability: Operator only

Parameters

This method takes no parameters.

Notes

  • Superuser enforced in code on top of clearance admin. Not a job, so it answers synchronously.
  • It reads the orchestrator's copy of the fleet database deliberately, not the local one. The fleet database is authoritative on the deploy orchestrator and replicates one way from there, so a state written on any other node's local CouchDB is stranded and never acted on.
  • deploy_targets is the subset that a deploy can actually be aimed at. A document that is not deployable is excluded from it.

ops_deploy_server

Ops: deploy server (soft/hard)

Queues a code deploy to a region app-server. Mode soft is a zero-downtime drain plus reload. Mode hard is a teardown plus clean install. This method enqueues only: it writes the queued state, the publish mode and the requesting user and timestamp onto the target's fleet document on the orchestrator CouchDB, and the deploy orchestrator's one-minute tick performs the rollout itself.

Availability: Operator only

Parameters

Name Type Required Description
server_id string Yes Server Id. The fleet document id of the target region app-server.
mode string No Mode. soft (default) or hard.
confirm (untyped) No Confirm. true for soft; must equal the server_id string for hard.
dry_run boolean No Dry Run. Returns { dry_run: true, would_deploy: { server_id, mode, current_state, busy, private_ip } } and writes nothing.

Notes

  • Superuser enforced in code. No plan gate.
  • Confirmation is proportional to blast radius. A soft deploy needs confirm: true. A hard reinstall needs the server id typed back as the value of confirm.
  • It refuses the dev server id, refuses a document that is not deployable, and refuses a target that is already queued or deploying. That last refusal is what makes repeat calls safe: a second request during a rollout does not stack a second rollout.
  • dry_run: true writes nothing at all and returns what would happen.
  • Soft mode unzips the new archive over the existing installation. Hard mode first stops and removes every process, kills the process manager, and clears the installation directory except the delivered archive itself.
  • A failed deploy leaves the region drained out of edge rotation rather than returning it to service, and the failure reason is recorded on the fleet document truncated to 500 characters.

ops_server_deploy_status

Ops: server deploy status

Polls deploy status and progress for one server, or for every deployable region app-server when server_id is omitted. Each row returns id, state (queued, deploying, idle, failed, unknown), busy, publish_mode, stat, stat_ts, elapsed_ms, error, requested_by and requested_ts. The all-servers form additionally returns any_busy.

Availability: Operator only

Parameters

Name Type Required Description
server_id string No Server Id. Omit to get every deployable region app-server.

Notes

  • Superuser enforced in code. Not a job, so it answers synchronously. No plan gate.
  • The underlying deploy state is a four-value machine on the target's fleet document: 1 queued, 2 deploying, 3 idle, 4 failed. state is that value mapped to a word.
  • any_busy on the fleet-wide form is what the operator console uses to show a "publish in flight" indicator and to hold back a second rollout.

ops_add_infra_box_region

Ops: add infra box and region

Onboards a raw box, given its address plus a user and a password, as an infra host (a Proxmox farm node), a region control-plane, or both. This is the closest thing in the platform to an On-Prem install: it takes a machine that has nothing on it and turns it into a running Xuda control-plane. It runs as a background job. The password is used once, for the single first hop that installs the control-plane key, and is never stored.

Availability: Operator only

Parameters

Name Type Required Description
spec (untyped object) Yes Spec. Must contain targets (array containing infra and/or region) and ssh.host. When infra is targeted it must contain infra.metro and infra.region. When region is targeted it must contain region.case (1, 2 or 3), region.code, region.source_region, and region.of_region for cases 2 and 3.
ssh_password (untyped) No SSH Password. Required for a real run; used for the single first hop, passed only as XUDA_SSH_PASS in the child process environment, redacted from the audit log and the ops notification, never written to the spec file or a database document.
confirm (untyped) No Confirm. true normally; must equal spec.ssh.host when infra.install_pve is not explicitly false, because installing Proxmox reboots and reconfigures the host.
dry_run (untyped) No Dry Run. Returns { dry_run: true, target, plan } with the last 60 plan lines, and writes nothing.

Notes

  • Superuser enforced in code. No plan gate.
  • Two different timeouts. The real run is declared as a background job with a 2400 second timeout and three job steps: connect and install the control-plane key; provision the box (os, wireguard, couch, code); join the mesh and register in the fleet database. The dry run is capped at 60 seconds server-side and is sent without a password.
  • The three region cases are: 1 a new top region, 2 the same region on a different vendor, 3 the same region on the same vendor. Case 3 shares a failure domain and an account-lock domain with its peer, which matters for disaster recovery planning.
  • The staged build it runs is: install the control-plane key, run the OS bootstrap, bring up WireGuard, write the environment profile, configure CouchDB, stage the box secrets, sync the installation tree from a healthy source region, create the replication documents, run the on-box installer, then verify that the web root answers 200 with every process online.
  • The first-hop password is stripped from the spec file written to disk and redacted from both the audit log and the operator notification.

ops_list_modules

Ops: list managed modules

Lists the platform's managed modules with their latest published npm version, publish date and whether they have a reloadable process. It feeds the module picker in the batch hot-fix dialog.

Availability: Operator only

Parameters

Name Type Required Description
refresh boolean No Bypass the cached module list and re-read published versions.

Notes

  • Superuser enforced in code. Not a job, so it answers synchronously. No plan gate.
  • Modules are tagged as either a reloadable process or a library. A library change still requires the processes that depend on it to be reloaded.
  • Pass refresh: true after publishing a new version, otherwise the cached list can lag the registry.

ops_hotfix_preview

Ops: preview batch hot-fix

Dry-runs a batch module hot-fix over the selected region app-servers and an optional module subset. It writes nothing and returns the plan, a rejected list of non-deployable targets with the reason each was rejected, and a log tail.

Availability: Operator only

Parameters

Name Type Required Description
server_ids (untyped array) Yes The fleet document ids to preview against.
modules (untyped array) No Module subset. Empty or omitted means all changed modules.

Notes

  • Superuser enforced in code. Not a job, so it answers synchronously. No plan gate.
  • It is the safe read before ops_batch_hotfix. Nothing is written and no process is touched.
  • Check the rejected list before running for real. A target can be rejected for not being deployable even when it was selectable in the console.

ops_batch_hotfix

Ops: batch hot-fix

Applies a surgical batch hot-fix to the selected region app-servers: pull the freshly published npm versions and reload only the affected processes. There is no teardown and no configuration change. Returns { converged, hosts, modules, summary, log_tail, elapsed_ms } on success, or the same shape with converged: false and an error line on failure.

Availability: Operator only

Parameters

Name Type Required Description
server_ids (untyped array) Yes The fleet document ids to apply the hot-fix on.
modules (untyped array) No Module subset. Empty or omitted means all changed modules.
confirm (untyped) No Must be true to apply.

Notes

  • Superuser enforced in code. No plan gate.
  • Runs as a background job with a 1200 second timeout and three job steps: resolving target servers; pulling published versions; reloading affected processes.
  • confirm: true is required. Without it nothing is applied.
  • Every run is written to the account log with security: true.
  • This is the day-two update path for a running installation, and it is the least disruptive of the three. Prefer it over a soft deploy when the change is confined to published module versions.

Methods That Exist In Code But Are Not Callable

Two functions in this area are exported in code but are not registered as methods, so they are not addressable over the API at all and carry no availability label.

  • publish_to_servers is the rollout entry point. It is not in the method catalog, so it cannot be reached over HTTP. It is invoked over the message broker, either by the deploy orchestrator's one-minute tick or by a direct broker send. It returns immediately with { code: 1, data: 'publish rollout started in background' }, or { code: 2, data: 'publish rollout already in progress' } when the single-rollout guard is set.
  • ops_seed_do_datacenters is a superuser-gated seeder that upserts the DigitalOcean datacenter inventory documents. It is not in the method catalog, so neither the dashboard nor the API can reach it.

How An Installation Is Delivered

There is no downloadable installer and no package you fetch yourself. What ships to a box is a single archive, built by Xuda's own packaging tool, plus the on-box installer that lives inside it.

What the archive contains. Thirteen directory trees plus the root files that configure the installation:

Part of the archive What it is
dist, dist/runtime, common, runtime The built platform and runtime code.
deployment Deployment assets.
docs The shipped documentation tree.
Six Nuxt applications The built server output for the website, fashion, live preview, user group, preview and auth applications.
config.json The platform configuration, including the module list.
ecosystem.config.js, ecosystem_master.config.js The process manager definitions for a region host and a master host.
install_regional_server.js The on-box installer.
Notification templates, email template, favicons, the split sitemap set Supporting assets placed at the archive root.

What the archive deliberately does not contain. It is trimmed rather than complete source: dependency trees are excluded, as are the fashion source and print build trees, which together account for roughly 600 MB of build artifacts. The dependencies are installed on the box instead, from the registry, at install time.

Provenance. The archive is a plain compressed zip. It carries no signature, no checksum and no build attestation. The previous archive is retained on the build side as a backup, kept by count and by age (14 archives and 5 days by default), which is a rollback convenience rather than a distribution guarantee.

What Runs On The Box

The on-box installer performs the same sequence on an On-Prem box that it performs on a Xuda region.

  1. Registry authentication. It writes an npm configuration file from the box secrets so the private Xuda module scope authenticates.
  2. Module installation. It installs every module named in the configuration's module list into the installation's module directory, one npm install per module. The shipped configuration lists 45 modules.
  3. Process boot. It boots the stack with the process manager, choosing the master process definition on a master host, the dev definition on the orchestrator, and the standard definition otherwise. The standard definition declares 47 processes and derives its own region identity from the host's name.

Prerequisites the OS bootstrap installs. Node v22, the process manager, RabbitMQ, memcached, CouchDB 3.5.2, WireGuard, nftables, unzip, git, openssl, jq, and the media and OCR toolchain (imagemagick, poppler-utils, tesseract-ocr). Google Chrome is installed as well.

State that lives on the box rather than in the database. This is the configuration surface an operator actually touches:

Path What it holds
/etc/profile.d/xuda.sh and /etc/environment XUDA_HOME, XUDA_CONFIG, XUDA_HOSTNAME, XUDA_HOSTNAME_ALT and XUDA_SECRETS.
/root/secrets.json (mode 600) The provider keys, merged over the secret-stripped configuration.
/root/.npmrc (mode 600) The private module registry token.
/run/xuda-draining The drain flag. Its presence makes the health endpoint answer non-200 so the edge drops this host from rotation.
/tmp/xuda_reinstall.sh, .status, .log The detached install script, its status marker and its log, kept outside the installation directory so a hard reinstall cannot delete them.

What a region control-plane joins. A region brings up WireGuard peering to master, with its private key generated on the box, runs a single-node CouchDB bound to the mesh behind an nftables guard, and then replicates 19 control databases continuously with master: pull for all 19, push for all except the fleet database, which is pull-only because the deploy orchestrator is its sole author. The databases are xuda_accounts, xuda_api_keys, xuda_logs, xuda_marketplace, xuda_master, xuda_notification, xuda_plugins, xuda_sessions, xuda_ssh_keys, xuda_tickets, xuda_team, xuda_transfers, xuda_usage, xuda_servers, xuda_billing, _users, xuda_website, xuda_runtime and chefby.

Object storage is Cloudflare R2, with storage bucket handles reused per region.

How An Installation Is Updated

Three update paths exist, in increasing order of disruption. All three are driven by an operator, never by a customer API call.

1. Batch hot-fix, the surgical path. ops_batch_hotfix, previewed first with ops_hotfix_preview. It pulls freshly published module versions and reloads only the affected processes. No teardown, no configuration change, no drain.

2. Soft deploy, the zero-downtime path. ops_deploy_server with mode: 'soft'. The orchestrator drains the target at the edge, copies the archive over, unzips it over the existing installation, runs the installer, then undrains.

3. Hard reinstall, the clean path. ops_deploy_server with mode: 'hard' and the server id typed back as confirm. Every process is stopped and removed, the process manager is killed, and the installation directory is cleared except the delivered archive, then the install proceeds from scratch. The host is offline for part of this.

How zero downtime is actually achieved. It happens at the edge, not in the application. Draining touches the drain flag file so the host's health endpoint stops answering 200, then waits 40 seconds for the edge router, which polls health roughly every 30 seconds, to shift traffic away. The code refuses to drain the last healthy region, so a rollout cannot take the whole service down. After the install the host is undrained and rejoins rotation.

Why the install is detached. The remote install script is base64-encoded, launched under setsid with all input and output redirected, and its status is polled while its log is streamed back to the operator console, capped at 25 minutes. The install therefore completes even if the orchestrator, the message broker or the SSH connection dies mid-way. This design came out of a real production incident.

Who can run a rollout. Only the deploy orchestrator. The one-minute tick that performs rollouts is guarded on the orchestrator's hostname, so a queued state written anywhere else is never acted on. Combined with the fleet database's one-way replication out of the orchestrator, this means a deploy has exactly one possible driver.

Connectivity The Shipped Tooling Requires

An On-Prem box installed with the tooling above is not an isolated island, and you should size your network plan accordingly.

  • Outbound to the module registry. The installer's core loop installs 45 private modules from the npm registry, on every install and on every hot-fix. There is no offline mirror path in the shipped tooling, so a box with no route to the registry cannot be installed or updated by it.
  • Outbound to OS package sources. The bootstrap fetches Node from NodeSource, CouchDB from the Apache CouchDB repository, Chrome from Google, and the rest from the distribution's own repositories.
  • Mesh peering to master. A region control-plane joins the WireGuard control mesh and runs continuous bidirectional replication of the 19 control databases with master.
  • Edge health polling. Drain-based zero-downtime deploys depend on the edge router polling the host's health endpoint. Without that, a deploy is not zero downtime; it is just a restart.
  • AI model access. The shipped model catalog is nine OpenAI models. There is no configurable alternative provider endpoint and no self-hosted model target in the catalog.

What Is Not Programmable Today

Stated plainly, so you do not plan around something that is not there:

  • No On-Prem method, module or SKU. Nothing in the method catalog is named for on-prem or self-hosted, and no plan, price or product is either.
  • No xuda onprem CLI. Installation and updates run from the on-box installer and the operator methods above.
  • No license key or activation check. Entitlement for an On-Prem installation is contractual.
  • No signed bundle and no build provenance. The delivery archive is an unsigned zip with no checksum or attestation.
  • No offline or air-gapped install path in the shipped tooling. Install and update both reach out to the registry and to OS package sources.
  • No SAML, OIDC or SCIM implementation exists in the platform code.
  • No append-only or hash-chained audit log, and no SIEM export target. Operator actions are written to the account log flagged as security entries, and the logs module offers reads, counts, a security-log read, CSV export and deletes. That is the whole of it.
  • No Kubernetes, Helm chart, manifest, operator or platform container image. The only deployment target is the process manager on Debian or Ubuntu, on bare metal or a virtual machine.
  • Not a single-tenant island. What the tooling produces is a Xuda region, which joins Xuda's control mesh and shares the 19 control databases with master. A fully isolated installation with customer-owned accounts, sessions and billing and no master peering is not something this tooling produces. If that is your requirement, raise it in the sales conversation rather than assuming it.

Errors

This surface has no error catalog of its own. The codes below are the ones these methods specifically return.

Code Where Meaning
-403 Every ops_* method { code: -403, data: 'superuser only' }. The caller is not a Xuda superuser. Clearance admin alone is not enough.
-1 get_region_hosting_options The macro_region value is missing or is not a recognized macro-region key.

Other failure shapes worth knowing:

  • create_external_vps can succeed without a bootstrap command. When the platform SSH key is unavailable, it returns bootstrap_command: null together with data.warning = 'platform ssh key unavailable'. Check for the null before showing the command to a user.
  • verify_external_vps_ssh records rather than throws. A failed verification leaves the app pending and writes last_verify_error onto the app document.
  • A failed deploy is a state, not an exception. ops_deploy_server enqueues and returns; the failure appears later as deploy state 4 with the reason recorded on the fleet document, truncated to 500 characters, and is read back through ops_server_deploy_status. A region that failed is deliberately left drained out of rotation until it rejoins roughly 15 minutes later.
  • ops_batch_hotfix reports partial success in its payload. A failure returns the normal shape with converged: false and an error line rather than an error code. Read converged, not just the absence of an error.
  • The rollout engine refuses to overlap. The broker-only rollout entry point answers { code: 2, data: 'publish rollout already in progress' } when a rollout is already running.

Plan Gates

Plan gating on this surface is thinner than the marketing ladder suggests, and it is worth being precise about where each gate actually lives.

Method-level gates. Exactly one method here declares a platform plan gate: deploy_datacenter requires the Pro membership plan. No method in the entire catalog carries an enterprise-tier gate; across all 965 methods the only declared plan values are Pro, Agency, Team and Free.

Channel gate on support. submit_support_ticket declares min_support_plan: { call: 'enterprise', chat: 'business', ticket: 'starter' }, and the dashboard reads that same declaration to decide which channels to offer. This gate is real and enforced.

UI-level gates. Datacenter sync and the Assign keys button are gated at Enterprise T1 by the dashboard, not by the method contract. The methods themselves, configure_datacenter_replication and assign_ssh_keys, declare no plan.

The membership tiers that matter here, by what they unlock rather than by price:

Tier Title What it unlocks that is relevant to On-Prem
Enterprise T1 Sync First tier where datacenter sync and load balancer become available. Outsourced server is still not.
Enterprise T2 Host Outsourced server becomes available. Described as establishing your own outsourced server cluster.
Enterprise T3 Own Described as deploying the Xuda platform on your personal servers. The only tier granting the Xuda SDK, and the only one with unlimited quotas throughout. Its price is the literal value "call", so checkout shows a contact prompt rather than a figure.

The support ladder, which is what the On-Prem support conversation actually maps onto:

Plan Price Response Channels
Starter $0 under 72 hr ticket
Developer $100/mo plus 2% of monthly Xuda usage under 4 hr; production down under 1 hr ticket
Business $1500/mo plus 5% of monthly Xuda usage under 2 hr; production down under 30 min ticket, chat
Enterprise $4500/mo plus 7% of monthly Xuda usage under 30 min; production down under 10 min ticket, chat, call

Only the Enterprise support plan carries the monitoring feature, described in configuration as Xuda's Incident Detection and Response, providing round-the-clock proactive surveillance and handling of incidents for chosen projects.

Support plans are bought from the dashboard Plans screen. The change is previewed with stripe_get_proration and applied with stripe_update_plan. Those two are billing methods and their contracts are not part of this reference.

Rate Limits, Timeouts And Caches

No method on this surface declares a per-caller rate limit. What constrains these calls instead is caching on the reads and hard timeouts on the writes.

Setting Value
get_xuda_servers_info cache 60 seconds
get_plans cache Cached (no timeout declared)
get_region_hosting_options cache Not cached
ops_add_infra_box_region real run 2400 second job timeout, three job steps
ops_add_infra_box_region dry run Capped at 60 seconds server-side, sent without a password
ops_batch_hotfix 1200 second job timeout, three job steps
reinstall_datacenter_resources Declared as a job with ten steps
Detached remote install status polling Capped at 25 minutes
Drain wait before a deploy proceeds 40000 ms
Edge health poll interval the drain depends on Roughly 30 seconds
Deploy orchestrator tick Every minute, on the orchestrator host only

The 40 second drain wait exists because the edge refreshes health roughly every 30 seconds. Shortening it in your head does not shorten it in practice: traffic has not moved until the edge has re-polled.

Idempotency And Repeat Safety

  • Deploys do not stack. ops_deploy_server refuses a target that is already queued or deploying, and the rollout engine holds a single-rollout guard so requeued duplicate jobs coalesce into one rollout rather than running twice.
  • Every destructive operator method has a dry run that writes nothing. ops_deploy_server, ops_add_infra_box_region and ops_hotfix_preview all return a plan without touching anything. Use them.
  • Confirmation scales with blast radius. Soft deploy needs confirm: true. Hard reinstall needs the server id typed back. Installing Proxmox on a new box needs the host address typed back.
  • verify_external_vps_ssh is safe to repeat. It records the failure reason and leaves the app pending, so you can fix the cause and call again.
  • configure_datacenter_replication is not automatically safe to repeat. Re-saving a completed one-time seed with apply omitted or true re-copies the data. Pass apply: false when you are only editing the configuration.
  • The fleet health refresh writes only on change. The background sweep that refreshes server status and server information writes a document only when a tracked field actually changed, to avoid replication churn.

Background Jobs And Crons

  • Every minute, on the deploy orchestrator only: refresh live server status, then run the publish rollout. The guard is the orchestrator's own hostname, so no other host performs a rollout.
  • The live-server refresh updates status and server information for every live fleet document, asking Proxmox about farm virtual machines and the provider API about legacy droplets.
  • A daily fleet health sweep alerts administrators. It skips any document that is not an application server.
  • The rollout itself runs in the background, walking targets one at a time, after the broker acknowledges the request in seconds.

Webhooks

There is no On-Prem webhook. Nothing in this surface emits one, and there is no callback you can register for a deploy, a hot-fix or an install. The way to observe a rollout is to poll ops_server_deploy_status.

Stripe webhooks exist, but they serve the plan ladders generally and belong to the billing module. They are not an On-Prem integration point.

A Note On The Rest Of The Surface

Two more things a reader of this page will otherwise go looking for.

Mail failover. The operator console carries a mail failover panel, but its two backing methods, get_mail_ha_status and mail_failover, are not registered in the method catalog. The panel self-detects that and degrades. Do not plan against them.

Everything else in the platform. The methods above are the ones that carry the On-Prem story specifically. The wider platform surface, project and app management, deployment, storage, AI, commerce and the rest, is documented per product elsewhere in these docs and behaves identically on an On-Prem installation, because an On-Prem installation runs the same code as a Xuda region.

If your requirement is something this page says does not exist, that is the conversation to have with sales rather than a gap to engineer around. From inside the product, submit_support_ticket is the working way to start it.