For Medusa
Medusa 2 on your own VMs, Postgres next door
Free to sign up. No egress fees on any product.
Why Medusa on Edge
Medusa runs here the way it runs on your laptop
Node, Postgres and Redis
Medusa server and worker on one VM, Postgres on another, joined by a free private network. Split further as you grow.The S3 file provider, unchanged
Point Medusa's file-s3 provider at Edge Storage. Product images and digital goods land in a bucket, not on the VM.Any storefront you like
Medusa is API-first. Run the Next.js starter on its own VM, or pair it with Nuxt, SvelteKit or Astro.Catalogue at the edge
Storefront pages, static assets and product media cache in 988 locations. Carts and checkout go straight to origin.Bring your own payments
Stripe, PayPal and the other payment providers work exactly as documented. Money moves between Medusa and your gateway.Agent-deployable
Ask your coding agent to deploy a Medusa store to shop.acme.com. The agent API stands up the VMs, bucket, DNS and CDN.
Reference architecture
Medusa behind the storefront, data on a private network
Shoppers
web and mobile
shop.acme.com
pages + /_next/static
media.acme.com
product images, resized
next start :8000
Next.js starter on a Standard VM
medusa start :9000
Medusa 2 server and worker
cart complete
scored before the order
postgres :5432
medusa-db, PostgreSQL 16
redis :6379
events, workflows, locking
medusa-media
file-s3 provider uploads
- Compute
Runs the Medusa server and worker, the storefront and Postgres on separate VMs.
- Storage
Holds product imagery, uploads and downloadable goods behind the file-s3 provider.
- CDN
Caches storefront pages, static assets and media URLs worldwide.
- Image optimisation
Resizes and converts product images on request, instead of at upload.
- DNS
Anycast DNS for shop., api. and media. subdomains.
- Shield
Scores cart completion and customer signup calls from the storefront.
- Assist
Answers shipping, stock and returns questions from storefront content.
Deploy
A Medusa 2 store with the standard CLI
- 01
Create the database and Medusa VMs
The postgresql script installs PostgreSQL 16 with remote access. Attach both VMs to one private network, then allow 5432 from that range only.
shell$ edge compute create --name medusa-db --size s-2vcpu-4gb \ --image ubuntu-24 --region london --script postgresql \ --script-param db_name=medusa $ edge compute create --name medusa --size s-4vcpu-8gb \ --image ubuntu-24 --region london --script nodejs - 02
Point the file module at Edge Storage
Medusa 2 ships an S3 file provider. Path-style addressing and the Edge endpoint are the only changes from AWS.
medusa-config.tsmodules: [{ resolve: "@medusajs/medusa/file", options: { providers: [{ resolve: "@medusajs/medusa/file-s3", id: "s3", options: { bucket: "medusa-media", region: "us-east-1", endpoint: "https://storage.edge.network", file_url: "https://media.acme.com", access_key_id: process.env.S3_ACCESS_KEY_ID, secret_access_key: process.env.S3_SECRET_ACCESS_KEY, additional_client_config: { forcePathStyle: true }, }, }], }, }], - 03
Migrate, build and start
Redis lives on the Medusa VM and listens on localhost. The production server runs from .medusa/server under PM2.
shell$ apt install -y redis-server $ echo "DATABASE_URL=postgres://<user>:<pw>@10.185.0.2/medusa" >> .env $ echo "REDIS_URL=redis://localhost:6379" >> .env $ npx medusa db:migrate && npx medusa build $ cp .env .medusa/server/.env.production $ cd .medusa/server && npm install $ NODE_ENV=production pm2 start npm --name medusa -- start - 04
Front the storefront and media with the CDN
Product images then resize from the URL: media.acme.com/tee.jpg?width=800&format=auto.
shell$ edge cdn create --name acme-store $ edge cdn domains add cdn-a1b2c3 --domain shop.acme.com \ --origin https://<storefront-ip> $ edge cdn domains add cdn-a1b2c3 --domain media.acme.com \ --origin-type storage --storage-bucket medusa-media --jit-image
Prefer to hand it off? Give the job to your AI agent or have our engineers do it.
What it costs
A full Medusa stack, priced line by line
- No per-order, per-request or per-seat fees
- Private network traffic between VMs is free
- Payment providers bill you directly
- Billed hourly from a prepaid balance
Estimated monthly bill on Edge
Medusa 2 store with a Next.js storefront, ~100k visits a month
- Medusa VM$38.47Performance: 4 vCPU, 8 GiB for server, worker and Redis
- Database VM$19.24Standard: 2 vCPU, 4 GiB for PostgreSQL 16
- Storefront VM$19.24Standard: 2 vCPU, 4 GiB for the Next.js starter
- CDN$0.502.5M requests: first 500k free, then 2M × $0.25 per million
- Storage$0.3025 GB of product media: first 5 GB free, then 20 GB × $0.015
- Egress$0.00
FAQ
Medusa on Edge, answered
Medusa 1.x or 2.x?
How does this compare to Medusa Cloud?
Which storefront framework should I use?
How do I scale beyond this?
Can the CDN cache the Store API?
Drop-in services
Add these without touching the stack
- Edge ShieldBot protection
POST /siteverify → score: 94Score cart completion and customer signup in your storefront's server code before the request reaches Medusa.
Free for most sites. No puzzles, no widget to style.Explore - Edge AssistAI answers
<script src="…/assist.js">Shipping, stock and returns questions, answered from your storefront content before support hears about them.
Free tier: 250 answered questions a monthExplore
Put your Medusa store on VMs you control
Start free. Bring an existing Medusa store or scaffold a new one with create-medusa-app.
Free tiers hard-cap. Nothing bills until you add a card.