xhostd
Sign in Start building
← Solutions

Deploy a Claude Code app to a live HTTPS URL

Deploy a Claude Code app to production in four steps: connect, create, push, deploy. Then verify the live HTTPS URL. Works with Codex and Cursor too.

To deploy a Claude Code app to production, connect Claude Code to xhostd, create an app, push the code with git, and call deploy. Claude Code makes each call, and the app answers on an HTTPS address when the health check passes.

xhostd is the infrastructure your coding agent deploys to: tools to build, test, deploy, and run the application. It does not replace Claude Code. The same steps work for Codex, Cursor, and any other AI coding agent that can call Model Context Protocol (MCP) tools or the HTTP API.

Requirements

You need no local runtime for the deployed app, no server, and no certificate.

Step 1: connect Claude Code

Add the xhostd MCP server to Claude Code, then ask it to list your apps. A successful list confirms that the tools are available. Other agents connect the same way through MCP or the HTTP API.

Step 2: create the app

Ask Claude Code to create an app with the template that fits the project:

Template Use it for You provide
static HTML, CSS, and JavaScript files The files
app A Node.js or Python service install.sh and launch.sh
docker Any other runtime A Dockerfile

The create_app call returns a repo_url, the git address of the app. Every new app starts with a prod channel, which is its production environment. The recipes show a complete project for each template: static site, Node.js app, Python API, and Docker app.

Step 3: push the code

Claude Code commits the files and pushes them to the repo_url:

  • With SSH: register a key once, then push to git@git.xhostd.com:<owner>/<repo>.git.
  • Where port 22 is blocked: push over HTTPS with a token from get_credentials.
  • With no shell, such as the claude.ai connector: use commit_files. See Ship without git.

A push stores the commit but does not deploy it. The deploy is a separate call, so you decide when a commit goes live. Push code with git has the details.

Step 4: deploy

Claude Code calls deploy with the app, the channel, and a reference such as master. To deploy the same code that you reviewed, pass the full commit SHA instead of a branch name, because a branch resolves at deploy time.

The call returns queued. That status means xhostd accepted the work, not that the app runs.

Step 5: verify the deployment

  1. Read get_deploy_log until the status is final.
  2. For the app and docker templates, confirm the health check passed. The platform probes GET / on the port in XHOSTD_HTTP_PORT and expects a 2xx or 3xx response within 120 seconds.
  3. Open the HTTPS address. The prod channel answers at <app>-<user>.xhostd.app, and every other channel at <channel>-<app>-<user>.xhostd.app.

If the deploy fails, compare the two logs. The deploy log shows the build and the health check. The runtime log shows what your process printed. A 502 from the hostname means the route exists but the container does not answer; a 404 means the channel has no route. The address returns 404 or 502 covers both.

After the first deploy

  • Test changes before production. Deploy to a separate preview URL first. See Preview and staging environments.
  • Use the database. Code-running channels get Postgres, with DATABASE_URL already set. See Postgres backups and recovery for what xhostd saves before each deploy.
  • Attach your own domain. Ask Claude Code to call add_custom_domain, create the two DNS records it returns, then call verify_custom_domain. The custom domains page lists the failure reasons.
  • Move an existing app. If the app already runs on a server, follow How to migrate a web app from a VPS.
  • Check limits and cost. The pricing page states the channel and storage limits of each plan, and the free plan needs no payment method.