aerostack deploy
Deploy your project. Supports two modes: deploy to Aerostack’s managed cloud, or deploy directly to your own Cloudflare account.
Usage
aerostack deploy [service-name] [flags]Flags
| Flag | Default | Description |
|---|---|---|
-e, --env | staging | Target environment: staging or production |
--all | false | Deploy all services in the project |
--cloudflare | false | Deploy to your Cloudflare account instead of Aerostack |
--public | false | Make the service publicly accessible (no auth required) |
--private | false | Require authentication for all requests |
--sync-secrets | false | Push .dev.vars secrets to the target environment before deploying |
Deploy to Aerostack (default)
Aerostack hosts and manages your Worker on your behalf. Requires aerostack login.
# Deploy to staging
aerostack deploy
# Deploy to production
aerostack deploy --env production
# Deploy all services
aerostack deploy --all --env production
# Sync secrets from .dev.vars, then deploy
aerostack deploy --sync-secrets --env productionAfter deploy, the CLI prints your service URL and test instructions.
Deploy to your Cloudflare account
Use --cloudflare to deploy directly to your own Cloudflare account via Wrangler. Requires CLOUDFLARE_API_TOKEN in your environment or npx wrangler login.
# Deploy to Cloudflare (staging)
aerostack deploy --cloudflare
# Deploy to Cloudflare production
aerostack deploy --cloudflare --env productionWhen using --cloudflare, Cloudflare resources (D1, KV, R2, Queues) must be created first. Run aerostack resources create or let the deploy command create them automatically.
Deploy an MCP server
aerostack deploy mcp [file] [flags]| Flag | Default | Description |
|---|---|---|
-e, --env | production | Target environment |
--slug | (directory name) | Unique slug for the MCP server |
# Deploy bundled MCP server (default: dist/index.js)
aerostack deploy mcp
# Deploy with explicit slug
aerostack deploy mcp dist/index.js --slug my-notion-mcpVisibility flags
# Make a service fully public (no API key required)
aerostack deploy --public
# Require authentication (default behavior)
aerostack deploy --privateFull production workflow
# 1. Deploy to staging first
aerostack deploy --env staging
# 2. Test staging
curl https://your-staging-url.aerostack.dev/api/health
# 3. Deploy to production with secrets sync
aerostack deploy --env production --sync-secrets