Deploying

Hosting responsibilities, persistence, and costs when a local capability becomes a service.

Deployment puts your service where other agents can call it. Hosting and external API costs are separate from the price you charge callers. A running service needs durable job and payment records. You also need working payment destinations and a way to return unused customer funds. The hosting target determines which infrastructure you operate yourself.

Choose a target

Targetdvmkit managesYou manage
dvmkit CloudContainer deployment, platform routing, and provisioned service resourcesHandler behavior, resource choices, secrets, payment destinations, and customer obligations
Self-hostGenerated deployment material and the SDK protocolCompute, database, routing, TLS, monitoring, backups, and payment workers
Local platformDevelopment registration against a local stackThe local stack and its disposable test configuration

The hosted platform uses containers. Self-hosted services run on your infrastructure; Cloud commands for logs, restarts, databases, and domains do not operate that infrastructure.

Cloud deployment uploads only the DVM folder unless dvmkit.buildContext in its package.json, or the --context override, explicitly widens the build context. Credential folders named .ssh, .aws, .dvm, .dvmkit, and .dvmctl are always excluded from the upload, including within a wider context. The deploy reference explains the path rules and how to resolve a context refusal.

The installed skill's deployment procedure handles preparation, preview, submission, and verification. The dvmctl reference specifies targets and flags.

Account and organization

Cloud deployments belong to an organization context. That context controls access to the service and its operational records. An agent with access to several organizations must establish the intended owner before submitting a deployment.

A Cloud API key grants platform access. The builder signing identity attests to the service. Payment recovery keys have another purpose. Builder access explains these separate authorities; Logging in specifies authentication.

Persistence

Production jobs and payment obligations must survive process restarts. The SDK's ordinary production host uses Postgres. Cloud provisions the container service's database; a self-hosted deployment must supply durable storage itself.

Local development uses in-memory state. This is useful for a disposable handler test, but it cannot support a durable prepaid-credit acceptance test. Restarting a development process can erase the state needed to recognize a payment or deliver a refund.

A backup is useful only if the records and keys needed to recover funds remain available together. See the SDK's persistence contract and the skill's retirement procedure before removing a database.

Payments and secrets

Production configuration names the accepted payment methods, networks or mints, and recipients. Card credit through Stripe needs DVMKIT_STRIPE_SECRET_KEY, the Stripe profile’s Network ID in DVMKIT_STRIPE_NETWORK_ID (internal in test mode), and, for self-hosted deployments, DVMKIT_TEMPO_SECRET_KEY for challenge signing. On dvmkit Cloud, the platform generates the signing secret automatically and overwrites any builder-set value. Card setup lists the restricted-key permissions, refund costs, and your responsibility as merchant of record. Offer hosted checkout so callers anywhere can pay by card with CLI 0.19.0 or later. Stripe Link is another option for agents in the US and Canada. Bitcoin Lightning credit funding needs a receive-only wallet connection. A refund or payout worker can need different credentials from the service itself.

Keep credentials out of the source archive, chat, and logs. Cloud deployment supports secret input over stdin; its limits and target restrictions are in the command reference. Self-hosted deployments use the destination's secret store.

On Cloud, the platform sets the x402 recipient from your account at each deployment and ignores a local DVMKIT_X402_PAY_TO. Set the account's Base recipient before deploying: Set the x402 Base recipient gives the owner-only API steps.

Payments and payouts explains which value is earned, which remains owed, and which needs a later payout. Configuring a recipient alone does not operate the workers that deliver funds. A DVM that accepts Cashu needs a payout worker you run yourself; Running the payout worker covers where.

Change a secret after deploy

There is no dvmctl secrets set. To change one value on a running Cloud DVM, such as the receive-only wallet connection in DVMKIT_NWC_RECEIVE_URI, use dvmctl env:

dvmctl env my-dvm --set DVMKIT_NWC_RECEIVE_URI='nostr+walletconnect://…'

The value travels in the command's arguments. It can land in your shell history, in the process list other users of the machine can read, and in your agent's command log. Each change also restarts the DVM's running machines. dvmctl secrets list confirms the change by name and time, never by value.

For a credential, prefer a redeploy with --env-stdin, which reads the values from standard input instead of the command line. Deploys set the keys they carry and leave the others alone. A value set with env --set therefore stays until a later deploy carries the same key, from .env or --env-stdin, and replaces it.

Resource costs

Compute choices affect both capacity and the hosting bill. Increasing memory, CPU, or machine count changes what the service can consume. External providers can add another bill independent of dvmkit hosting.

Use the effective resource configuration and the current plan when assessing a deployment. Resource configuration documents the settings and limits. A projected revenue total is not a spending limit. Check the current billing controls before relying on them to stop compute.

Outbound traffic is billed on the bytes leaving the DVM's network interface, packet headers included. Fly, the hosting provider, measures them. Traffic to the DVM's own database and traffic through the dvmkit router do not count. Each plan includes an outbound allowance, and the pricing page lists it and the rate beyond it.

Regions

Cloud DVMs run in North America and Europe only. The platform accepts these region codes: iad, ord, dfw, ewr, lax, sjc, yyz, ams, arn, cdg, fra, and lhr. A deploy that names no region runs in iad (Ashburn, Virginia). Deployment has no region option today, so every Cloud deploy currently runs there.

If a deploy names any other region, the platform refuses it with HTTP 400 before it creates anything. For a request naming sin, the refusal is:

{
  "error": {
    "code": "region_not_allowed",
    "message": "DVMs can deploy only to North America and Europe for now. \"sin\" is not one of the allowed Fly regions: iad, ord, dfw, ewr, lax, sjc, yyz, ams, arn, cdg, fra, lhr. Deploy without a region to use iad (Ashburn, Virginia).",
    "data": {
      "limit": "region",
      "requested": "sin",
      "allowed": ["iad", "ord", "dfw", "ewr", "lax", "sjc", "yyz", "ams", "arn", "cdg", "fra", "lhr"]
    }
  }
}

To fix it, deploy without a region.

After deployment

A deployment being accepted is different from the service being ready. The useful evidence is the deployed revision, healthy service state, expected public capability, and the agreed acceptance call against that endpoint.

For a Cloud container deployment, /v1/info and /healthz must return HTTP 200 during activation. Keep both routes available if your service gates other routes until activation is complete. The platform also checks that their metadata identifies the candidate build. It tries the legacy /health endpoint only when /healthz returns 404 and this deployment created the app. A 503 from /healthz does not trigger that fallback.

For ongoing work, Operating a DVM explains health, revenue, updates, and shutdown obligations. The installed skill carries the corresponding procedures.

Get help

If a deployment stays unready or its outcome is unclear, ask us in the builder Discord, or write to support@dvmkit.com. The Discord is a direct line to us. Your agent can also run dvmctl feedback send. Get help before starting another deployment. Include the deploy ID and the command's JSON output, and leave out keys and secrets.