Setting Up and Deploying
This page explains how to set up a project on Mastra Cloud  with automatic deployments using our GitHub integration.
Mastra Cloud is currently in public beta. Features, APIs, and UIs may change as development continues.
Prerequisites
- A Mastra Cloud  account
- A GitHub account / repository containing a Mastra application
See our Getting started guide to scaffold out a new Mastra project with sensible defaults.
Setup and Deploy process
Sign in to Mastra Cloud
Head over to https://cloud.mastra.ai/  and sign in with either:
- GitHub
Install the Mastra GitHub app
When prompted, install the Mastra GitHub app.
Create a new project
Click the Create new project button to create a new project.
Import a Git repository
Search for a repository, then click Import.
Configure the deployment
Mastra Cloud automatically detects the right build settings, but you can customize them using the options described below.
- Importing from GitHub: The GitHub repository name
- Project name: Customize the project name
- Branch: The branch to deploy from
- Project root: The root directory of your project
- Mastra directory: Where Mastra files are located
- Environment variables: Add environment variables used by the application
- Build and Store settings:
- Install command: Runs pre-build to install project dependencies
- Project setup command: Runs pre-build to prepare any external dependencies
- Port: The network port the server will use
- Store settings: Use Mastra Cloud’s built-in LibSQLStore storage
- Deploy Project: Starts the deployment process
Deploy project
Click Deploy Project to create and deploy your application using the configuration you’ve set.
Successful deployment
After a successful deployment you’ll be shown the Overview screen where you can view your project’s status, domains, latest deployments and connected agents and workflows.
Continuous integration
Your project is now configured with automatic deployments which occur whenever you push to the configured branch of your GitHub repository.
Testing your application
After a successful deployment you can test your agents and workflows from the Playground in Mastra Cloud, or interact with them using our Client SDK.