# Mastra Hosting on a Real microVM

> Run Mastra — the TypeScript agent framework — as a production server on its own always-on Firecracker microVM. Studio at your TLS subdomain, your project on a persistent volume, edit and rebuild in the browser. BYOK, 30-day money-back.

- Published: 2026-07-05 · Updated: 2026-07-05 · jurniti
- Canonical: https://www.jurniti.com/blog/mastra-hosting

Mastra won the TypeScript agent framework race — 26,000 GitHub stars, 300,000 weekly downloads, and comparison posts that end the same way: *if your team writes TypeScript, use [Mastra](/mastra)*. The quickstart is genuinely five minutes. Then you try to keep it running: the dev server wants ~2 GB of RAM, the production build needs a supervisor and safe redeploys, Studio ships with no login screen, and the databases holding your agent's memory need a disk that doesn't vanish. Mastra's own changelogs say it plainly — the rough edges "show up once you start running real workloads." Here's how to run it for real: the production server, always on, on its own Firecracker microVM.

## What Mastra is

Mastra is the open-source TypeScript framework for AI agents. An agent is a file in your repo — a model, instructions, tools, memory — not a configuration in someone's cloud. Around it: **tools** (typed functions the model can call), **workflows** (typed steps chained into pipelines), and **memory** backed by a real database. On top: **Studio**, a web UI where you chat with your agents and watch every tool call.

It's Apache-2.0, built by the team behind Gatsby, and v1.0 since January 2026. Switchers are blunt about why: one developer who moved a production agent off LangGraph TS rebuilt it in Mastra in 18 hours instead of 41 — and cut P95 latency in half. `mastra build` compiles the whole project into a standalone Node.js server that exposes each agent as a REST endpoint and serves Studio — that server is what production means here, and it's what jurniti runs.

## Why a real microVM for Mastra

Mastra's docs offer serverless deployers and their own hosted platform. Both are fine answers to "where do I put a function." A microVM is the answer to a different question: **where does my agent *live*?**

An agent isn't stateless. Its memory database grows with every conversation. Its project source is something you keep editing. Its `.env` holds your model keys. On serverless, that state scatters across managed services; on jurniti it's all one place — **your project directory, on a persistent volume, on a machine that's yours.**

**Isolation is hardware, not a namespace.** Your Mastra server executes arbitrary TypeScript with your API keys in its environment — and this June's npm supply-chain attack on the Mastra org showed exactly what's at stake. jurniti gives every tenant a dedicated Firecracker microVM: own kernel, KVM boundary, one tenant per box. Our installs are version-pinned and run script-less (`--ignore-scripts`), and every image is boot-tested before it ships.

**Studio gets a real home.** Open-source Studio has no auth — you should never expose port 4111 raw. On jurniti, Studio is served through your authenticated portal at your own TLS subdomain, and the **edit loop lives in the browser**: open the terminal or file browser, change your agent, run `mastra-rebuild`. It builds atomically and rolls back to the last good build if yours fails — your Studio never goes dark from a typo.

**BYOK is architectural.** Your key goes in your project's `.env`, inside the VM. One OpenRouter key covers hundreds of models; switching providers is a one-line env change. jurniti never sees a key and never marks up a token. And it's reversible: **30-day money-back guarantee**, workspace kept 7 days after cancellation.

## Run Mastra in 3 steps

By hand this is a VPS, Node 22, a pinned scaffold, `mastra build --studio`, a systemd unit, a reverse proxy with TLS and auth, and patching forever. jurniti runs the box; you write the agents.

### 1. Pick a plan and pay

[Pro](/pricing) is the natural starting point — it serves Studio at your own subdomain. Check out, and provisioning runs automatically the moment payment confirms.

### 2. Your microVM boots with a Mastra project serving

A fresh microVM boots with a complete, pre-built Mastra starter project — example agent, tool, and workflow included — already serving Studio. Add your model key to `.env` from the quickstart, and you're chatting with your first agent in minutes.

### 3. Make it yours

Edit `src/mastra/` in the terminal or file browser, run `mastra-rebuild`, and watch your own agents and workflows appear in Studio. Every agent is also a REST endpoint your apps and cron jobs can call. Total time from checkout to your first agent reply: about three minutes.

## What people run Mastra for

- **Agents as endpoints.** `POST /api/agents/yourAgent/stream` from a webhook, a cron job, or your product — the agent answers 24/7.
- **Typed workflows against real APIs.** Deterministic steps where you need reliability, model calls where you need judgment.
- **Agent memory that compounds.** Conversations and preferences accumulate in a database on your persistent volume — yours to query, back up, or export.
- **A living project, not a deploy artifact.** Edit the source on the VM, rebuild in place, keep the whole thing in git.

Snapshot a configured Mastra project into a [template](/templates) and fork it — your agents and source travel, your keys and memory never do.

## jurniti vs a laptop vs a DIY VPS

| | jurniti | Your laptop | DIY VPS |
|---|---|---|---|
| Always on | Yes | No — it sleeps | Yes |
| Serves | Production build (`mastra build --studio`) | Usually `mastra dev` (~2 GB RAM) | You wire it up |
| Studio auth + TLS | Portal auth at your subdomain | Localhost only | You configure both |
| Failed rebuild | Rolls back, keeps serving | Dev server crashes | Your problem at 2am |
| Supply-chain posture | Pinned, script-less installs | Whatever npm pulled | You audit it |
| Model keys | Yours, never leave the VM | Yours | Yours |
| Refund | 30-day money-back | n/a | None |

## Pricing

Because Mastra ships Studio as a web dashboard, **Pro ($49/mo, $490/year)** is the natural starting point — that's the plan that auto-serves Studio at your own TLS subdomain. **Starter ($25/mo)** runs the production server comfortably too (it idles around 350 MB), and the rebuild helper is built to work within Starter's memory. Every plan includes the 30-day money-back guarantee, and your model spend is separate and never marked up.

Prefer an agent that manages other agents, or a chat-first assistant? See the guides for [Paperclip](/blog/paperclip-hosting), [Hermes](/blog/hermes-agent-hosting), and [OpenClaw](/blog/openclaw-hosting), or compare plans on the [pricing page](/pricing).

## Frequently asked questions

### What is Mastra?

Mastra is the open-source TypeScript framework for building AI agents — agents, tools, and workflows written as code, with a Studio web UI to chat with agents and run workflows. It's Apache-2.0, built by the team behind Gatsby, hit v1.0 in January 2026, and passed 26,000 GitHub stars with 300,000+ weekly npm downloads.

### Can I self-host Mastra?

Yes. `mastra build` compiles your project into a standalone Node.js server (Hono) that serves your agents, workflows, and Studio on port 4111. Self-hosting means you also own the ops: a machine that never sleeps, a supervisor, safe rebuilds, TLS, auth in front of Studio, and backups of the databases that hold your agent's memory. jurniti runs exactly that production build for you on a dedicated microVM.

### How is jurniti different from Mastra Cloud?

Mastra Cloud and the Mastra Platform are serverless deployment products from the Mastra team. jurniti is different: you get one dedicated Firecracker microVM that's entirely yours — the full project on a persistent disk you can edit live in a terminal and file browser, rebuild in place, snapshot into forkable templates, and take with you. It's the owned-machine option, not the serverless one.

### Do I need my own API keys for Mastra?

Yes. jurniti is bring-your-own-key. Your model key goes into your project's .env inside the VM — one OpenRouter key unlocks hundreds of models, or use OpenAI/Anthropic directly. Keys never touch jurniti's side, traffic goes straight from your VM to your provider, and there's no token markup.

### Why does Mastra need a real server instead of my laptop?

Because the point of `mastra build` is a long-lived HTTP server: every agent becomes a REST endpoint that cron jobs, webhooks, and apps can call around the clock, and agent memory accumulates in a database on disk. A laptop that sleeps takes your agents and their memory offline. On jurniti the production server runs 24/7 inside its own Firecracker microVM with its own kernel.

### How much does it cost to host Mastra?

Plans start at $25/mo ($250/year — two months free), with a 30-day money-back guarantee on every plan. Because Mastra Studio is a web dashboard, the Pro plan ($49/mo) is the natural starting point — it auto-serves Studio at your own TLS subdomain. Model spend is separate and never marked up, because you bring your own key.

### Is this an official Mastra product?

No. jurniti is independent managed hosting for the open-source Mastra framework. We scaffold the upstream starter project with pinned versions, build it with Mastra's own production tooling, and serve it unmodified — no fork. Your project is standard Mastra you can run anywhere Node runs.
