Skip to content

Deploy Strapi and its PostgreSQL database with your AI, over MCP (2026)

Your Strapi runs locally. Connected to while over MCP, your AI deploys it in France without a Dockerfile, with its PostgreSQL database backed up every day and your media kept safe in a bucket.

By Aloïs Oddon, co-founder of Nextmap. Facts checked on November 19, 2026.

View as Markdown

Deploy Strapi and its PostgreSQL database with your AI, over MCP: host Strapi and its PostgreSQL database in France, put in production by Claude Code, Cursor or Codex over HTTPS, with the database backed up every day

The short version. Over MCP, your AI deploys your Strapi with while, in France, with its PostgreSQL database backed up every day and its media in an S3 bucket. What matters, like deleting a database, waits for a person’s approval.

Prerequisites

  • A Strapi project, with its package.json.
  • An AI that works in a terminal: Claude Code, Codex, Cursor or Gemini CLI.

Step 1: Give your AI this message

Open your AI in your app’s folder, and paste this message into it:

The message to give your AI
Connect to while with my account (while.sh/agents), then put my app on while.

Your AI adds while’s MCP server itself. If it asks you to, restart it. On the first call to while, a page opens in your browser. In Claude Code, if it doesn’t open, type /mcp, choose while, then Authenticate. On that page, choose “A new app”, then click Authorize.

Step 2: Open your app

Your AI gives you your app’s address, for example https://mon-cms.while.cloud, over HTTPS.

What your AI does

It writes while.yaml at the root of your project:

while.yaml
apiVersion: while/v1
project: mon-cms
services:
  - name: web
    port: 1337
    health:
      path: /_health
    resources:
      memory: 1Gi
    env:
      DATABASE_CLIENT: postgres
databases:
  - name: main
buckets:
  - name: medias

Strapi is detected as a Node.js app: it is built with npm run build, then started with npm start. It reads its database from DATABASE_URL, with DATABASE_CLIENT=postgres and the pg package, which your AI adds1. Your media files go into the bucket, through Strapi’s S3 provider2. Your AI generates Strapi’s keys, APP_KEYS, ADMIN_JWT_SECRET and the others, and stores them in while’s vault3.

What your AI does to put Strapi and its PostgreSQL database in production on while: the while.yaml file, the build and tests, the HTTPS address, the PostgreSQL database backed up every day and a person's approval, in France
Your AI writes while.yaml, while builds and serves the app over HTTPS, and the previous version stays ready.

Move to your own domain

You, to your AI: Put the app on cms.acme.com.

Your AI declares the domain, you add the DNS records it gives you, and the HTTPS certificate follows.

See a new version before you deploy it

You, to your AI: Show me the new version before you deploy it.

Your AI opens a preview, at its own address, with its own data. You look at it, and then your AI puts it into production.

Read your content from your AI

You, to your AI: How many articles were published this month?

Your AI reads Strapi’s database in SQL over MCP, with your permissions, and it can’t write to it.

Fix a vulnerability in your dependencies

You, to your AI: Fix the vulnerabilities in our dependencies.

Your app’s dependencies are checked against known vulnerabilities at every deployment, then every day. Your AI is warned of a serious vulnerability, and it updates the package involved.

Go back to the previous version

You, to your AI: Go back to the previous version.

In the 30 minutes after a production release, the previous version comes back in a second. After that, it takes a few seconds. Once the previous version is back, your AI reads what broke in while’s logs, fixes it and deploys again.

In the docs: PostgreSQL databases, Object storage (S3), Custom domain, Previews, Versions and rollback and Dependency vulnerabilities.

Next steps

Sources

  1. Strapi, database configuration, accessed November 2, 2026
  2. Strapi, the Amazon S3 provider for media, accessed November 2, 2026
  3. Strapi, environment variables, accessed November 2, 2026

Questions

Do I need to write a Dockerfile?

No. Strapi is a Node.js app: it is detected, built with npm run build, then started with npm start.

Where do my images and files go?

Into an S3-compatible bucket in while, separate from the app. On the disk, they would start from scratch at every restart.

Is my content backed up?

Yes, it lives in the PostgreSQL database, which is backed up every day and can go back to a precise moment.

Where is my Strapi hosted?

In France, by Nextmap, a French company.

Does my AI see my credentials?

No. You paste them into while, the app uses them, and your AI never sees them. Every call is logged.

Give your AI the message, and it takes care of the rest

Give this to your AI

Read while.sh/agents and help me get started with while.

Copy the message

In 3 minutes, with no sign-up, the tool has its own address. To keep it, create your account.

For a company project, write to the while team: hello@while.sh