{
  "manifest_version": "1",
  "slug": "medusa",
  "title": "Medusa",
  "headline": "Self-host Medusa",
  "description": "Self-host Medusa 2 on a VM without Docker: a public Next.js storefront, the admin behind exe.dev login, PostgreSQL, Redis, order emails, backups.",
  "category": "web-apps",
  "tags": [
    "medusa",
    "medusajs",
    "headless commerce",
    "ecommerce",
    "online store",
    "nextjs storefront",
    "postgresql",
    "redis",
    "shopify alternative",
    "medusa self-host"
  ],
  "url": "https://exe.dev/deploy/medusa",
  "markdown_url": "https://exe.dev/deploy/medusa.md",
  "upstream": {
    "website": "https://medusajs.com",
    "source": "https://github.com/medusajs/medusa",
    "docs": "https://docs.medusajs.com",
    "license": "MIT (Enterprise features under a commercial license)"
  },
  "example_vm_name": "my-medusa",
  "time": "20 minutes",
  "stack": [
    {
      "name": "nginx",
      "detail": "the public port, sending shoppers to the storefront and the Store API, never to the admin",
      "port": 8000
    },
    {
      "name": "Next.js storefront",
      "detail": "Medusa's starter storefront on Next.js 16, as storefront.service",
      "port": 8001,
      "data": "~/store/apps/storefront → a release in ~/releases"
    },
    {
      "name": "Medusa 2.23",
      "detail": "the server, the admin dashboard, and the background worker, as medusa.service",
      "port": 9000,
      "data": "~/store/apps/backend → a release in ~/releases"
    },
    {
      "name": "PostgreSQL 16",
      "detail": "Ubuntu's package; products, orders, customers",
      "port": 5432,
      "data": "/var/lib/postgresql"
    },
    {
      "name": "Redis 7",
      "detail": "sessions, events, workflows, and locks",
      "port": 6379
    },
    {
      "name": "Uploads",
      "detail": "product images, on the VM's disk; S3 if you'd rather",
      "data": "~/medusa-data"
    },
    {
      "name": "Nightly backup",
      "detail": "database, uploads, settings, and the store's git history",
      "data": "~/backups"
    }
  ],
  "access": [
    {
      "url": "https://my-medusa.exe.xyz/",
      "who": "private",
      "what": "the storefront and the Store API, until you make the VM public"
    },
    {
      "url": "https://my-medusa.exe.xyz:9000/app",
      "who": "private",
      "what": "Medusa's admin and admin API, for people with access to the VM, even when the store is public"
    }
  ],
  "delivers": [
    "Medusa 2.23 with its admin and worker on port 9000, and the Next.js starter storefront behind nginx on port 8000, restarting after a reboot.",
    "PostgreSQL and Redis on the VM, and uploads in ~/medusa-data, backed up every night and before every deploy.",
    "A storefront you can make public in one command, while the admin and admin API stay on a private port behind exe.dev login.",
    "An email to you through exe.dev for every order, with no mail provider, and a note in the admin's notification bell.",
    "~/store as the one place to change the server and the storefront, and ~/bin/medusa-deploy to build, back up, migrate, and switch, with rollback."
  ],
  "owner_runs_after": [
    "ssh exe.dev share set-public my-medusa"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe.dev/new?prompt=Set%20up%20Medusa%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Fmedusa.md%3Fvia%3Ddeploy%20from%20top%20to%20bottom.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-medusa.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-medusa.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Medusa%202.23%20with%20its%20admin%20and%20worker%20on%20port%209000%2C%20and%20the%20Next.js%20starter%20storefront%20behind%20nginx%20on%20port%208000%2C%20restarting%20after%20a%20reboot.%0A-%20PostgreSQL%20and%20Redis%20on%20the%20VM%2C%20and%20uploads%20in%20~%2Fmedusa-data%2C%20backed%20up%20every%20night%20and%20before%20every%20deploy.%0A-%20A%20storefront%20you%20can%20make%20public%20in%20one%20command%2C%20while%20the%20admin%20and%20admin%20API%20stay%20on%20a%20private%20port%20behind%20exe.dev%20login.%0A-%20An%20email%20to%20you%20through%20exe.dev%20for%20every%20order%2C%20with%20no%20mail%20provider%2C%20and%20a%20note%20in%20the%20admin%27s%20notification%20bell.%0A-%20~%2Fstore%20as%20the%20one%20place%20to%20change%20the%20server%20and%20the%20storefront%2C%20and%20~%2Fbin%2Fmedusa-deploy%20to%20build%2C%20back%20up%2C%20migrate%2C%20and%20switch%2C%20with%20rollback.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details.%20For%20initial%20setup%2C%0Afollow%20%22Set%20up%20by%20hand%22%20from%20%22Install%20the%20tools%22%20to%20the%20end%20of%20it%2C%20as%0Aexedev%3B%20the%20walkthrough%20sections%20are%20for%20the%20owner%20afterwards.%20Use%20the%0Aexact%20versions%20given.%20Never%20overwrite%20an%20existing%20~%2Fmedusa.env%20or%0A~%2Fstorefront.env.%20Don%27t%20make%20the%20VM%20public%20and%20don%27t%20run%20Restore%20or%0AUpdate.%20Do%20not%20reboot.%20If%20a%20build%20fails%2C%20read%20its%20output%20and%20fix%20what%0Ayou%20can%3B%20never%20commit%20secrets.%20At%20the%20end%2C%20create%20an%20admin%20invite%20for%0Athe%20owner%27s%20exe.dev%20email%20%28the%20reflection%20email%29%20as%20in%20%22Sign%20in%20to%20the%0Aadmin%22%2C%20and%20give%20the%20owner%20the%20invite%20link%20and%0Ahttps%3A%2F%2F%3Cvm%3E.exe.xyz%2F.%20Don%27t%20paste%20anything%20from%20~%2Fmedusa.env%20into%20the%0Achat.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open%20and%20these%20commands%2C%20which%20only%20I%20can%20run%2C%20from%20my%20own%20computer%20%28with%20this%20VM%27s%20name%20in%20them%29%3A%0A%20%20ssh%20exe.dev%20share%20set-public%20my-medusa%0A",
    "terminal": "curl -fsSL https://exe.dev/deploy/medusa/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "Set up Medusa on this VM by following the exe.dev recipe at https://exe.dev/deploy/medusa.md?via=deploy from top to bottom.\n\nThe recipe's example VM name is my-medusa. This VM's name is the output of `hostname`: use it wherever the recipe writes my-medusa. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- Medusa 2.23 with its admin and worker on port 9000, and the Next.js starter storefront behind nginx on port 8000, restarting after a reboot.\n- PostgreSQL and Redis on the VM, and uploads in ~/medusa-data, backed up every night and before every deploy.\n- A storefront you can make public in one command, while the admin and admin API stay on a private port behind exe.dev login.\n- An email to you through exe.dev for every order, with no mail provider, and a note in the admin's notification bell.\n- ~/store as the one place to change the server and the storefront, and ~/bin/medusa-deploy to build, back up, migrate, and switch, with rollback.\n\nRead the whole recipe, including the closed details. For initial setup,\nfollow \"Set up by hand\" from \"Install the tools\" to the end of it, as\nexedev; the walkthrough sections are for the owner afterwards. Use the\nexact versions given. Never overwrite an existing ~/medusa.env or\n~/storefront.env. Don't make the VM public and don't run Restore or\nUpdate. Do not reboot. If a build fails, read its output and fix what\nyou can; never commit secrets. At the end, create an admin invite for\nthe owner's exe.dev email (the reflection email) as in \"Sign in to the\nadmin\", and give the owner the invite link and\nhttps://\u003cvm\u003e.exe.xyz/. Don't paste anything from ~/medusa.env into the\nchat.\n\nFinish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them):\n  ssh exe.dev share set-public my-medusa\n",
    "prompt_url": "https://exe.dev/deploy/medusa/prompt.txt"
  },
  "published": "2026-11-21",
  "updated": "2026-11-21",
  "verified": "2026-11-21",
  "related": [
    "postgres",
    "redis",
    "nextjs",
    "s3-storage",
    "payload",
    "dev-test-prod"
  ],
  "alternatives": [
    "Shopify",
    "BigCommerce",
    "Medusa Cloud",
    "Saleor",
    "Vendure"
  ],
  "files": [
    "https://exe.dev/deploy/medusa/medusa-backup",
    "https://exe.dev/deploy/medusa/medusa-cli",
    "https://exe.dev/deploy/medusa/medusa-config.ts",
    "https://exe.dev/deploy/medusa/medusa-deploy",
    "https://exe.dev/deploy/medusa/medusa.nginx",
    "https://exe.dev/deploy/medusa/order-placed-email.ts",
    "https://exe.dev/deploy/medusa/us-region.ts"
  ]
}
