Mastra Deployment Overview
Trust: ★★★☆☆ (0.90) · 0 validations · developer_reference
Published: 2026-05-10 · Source: crawler_authoritative
Tình huống
Guide for deploying Mastra applications to Node.js-compatible environments including standalone servers, monorepos, cloud providers, and web framework integrations.
Insight
Mastra applications support deployment to any Node.js-compatible environment. Supported runtimes include Node.js v22.13.0 or later, Bun, Deno, and Cloudflare Workers. The framework offers five primary deployment paths: (1) Standalone Mastra server powered by Hono, built with mastra build command and deployable to VMs, containers, or PaaS platforms; (2) Monorepo deployment following the same standalone approach; (3) Mastra Platform for managed Studio and Server products; (4) Cloud providers with built-in deployers for Vercel, Netlify, and Cloudflare, plus guides for Amazon EC2, AWS Lambda, Azure App Services, and Digital Ocean; (5) Web framework integration with Next.js or Astro using standard framework deployment processes. Workflows support execution via the built-in engine by default, or can be deployed to Inngest for step memoization, automatic retries, and real-time monitoring in production workloads.
Hành động
Use mastra build to build your application for standalone server deployment. For cloud providers, use the framework’s standard deployment process or built-in deployers for Vercel, Netlify, and Cloudflare. For Mastra Platform, deploy using the Studio and Server products. For workflow runners, configure Inngest for production workloads requiring managed infrastructure. When integrating with Next.js or Astro, follow the framework-specific deployment guides for the target platform.
Kết quả
Mastra applications run as production-ready API servers with support for WebSocket connections, long-running processes, and auto-scaling on serverless platforms. Workflows execute with optional step memoization and automatic retries via Inngest integration.
Điều kiện áp dụng
Node.js v22.13.0 or later, Bun, Deno, Cloudflare Workers runtimes supported. Built-in deployers available for Vercel, Netlify, and Cloudflare.
Nội dung gốc (Original)
Deployment overview
Mastra applications can be deployed to any Node.js-compatible environment. You can deploy a Mastra server, integrate with an existing web framework, deploy to cloud providers, or use Mastra platform for Studio and server deployment.
Runtime support
Mastra can run against any of these runtime environments:
- Node.js
v22.13.0or later - Bun
- Deno
- Cloudflare
Deployment options
Mastra server
Mastra provides a server powered by Hono that can be deployed independently. Use the mastra build command to build your application and deploy the output to your preferred VM, container, or PaaS platform.
Use this option when you need full control over your infrastructure, long-running processes, or WebSocket connections. The Mastra server deployment guide provides more details.
Monorepo
Deploy a Mastra server as part of a monorepo setup, following the same approach as standalone deployment.
Read about monorepo deployment.
Mastra platform
The Mastra platform provides two products for deploying and managing AI applications built with the Mastra framework:
- Studio: A hosted visual environment for testing agents, running workflows, and inspecting traces
- Server: A production deployment target that runs your Mastra application as an API server
Learn more in the Studio deployment guide and Server deployment guide.
Cloud Providers
Mastra applications can be deployed to cloud providers and serverless platforms. Mastra includes optional built-in deployers for Vercel, Netlify, and Cloudflare to automate the build and deployment process.
Use this option for auto-scaling, minimal infrastructure management, or when you’re already using one of these platforms.
Web Framework
When Mastra is integrated with a web framework, it deploys alongside your application using the framework’s standard deployment process. The guides below cover framework-specific configuration requirements for deployment.
Use these guides when adding Mastra to an existing Next.js or Astro application.
Workflow runners
Mastra workflows run using the built-in execution engine by default. For production workloads requiring managed infrastructure, workflows can also be deployed to specialized platforms like Inngest that provide step memoization, automatic retries, and real-time monitoring.
Visit the Workflow Runners guide for execution options and the Inngest deployment guide for setup instructions.
Liên kết
- Nền tảng: Dev Framework · Mastra
- Nguồn: https://mastra.ai/docs/deployment/overview
Xem thêm: