---
title: Deploy Strapi with AI
url: "/guides/strapi/"
canonical_url: https://docs.blossom88.com/guides/strapi/
markdown_url: https://docs.blossom88.com/guides/strapi.md
summary: Deploy Strapi with AI on Blossom. Publish content through a headless CMS
  and restricted API, with managed PostgreSQL and S3 or R2 media storage.
categories:
- deployment
- cms
---

# Deploy Strapi with AI

[Strapi](https://strapi.io/) is a headless CMS: your team edits content in an
Admin interface, and your website or app retrieves it through an API. Define
your own content types for articles, products, or other structured content.

It uses Node.js and TypeScript, with a React Admin interface. This deployment
uses PostgreSQL. Browse the [source on GitHub](https://github.com/strapi/strapi).

Run your Strapi project on regular App Capacity, with managed PostgreSQL and
media in your own S3 or Cloudflare R2 bucket.

[Install the Blossom CLI and skill](/learn/getting-started/install/)
on your agent's machine and choose a Blossom Cloud Location when you log in.
You can also use
[Blossom BYOC (bring your own cloud)](/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Ask Your Agent

> **Ask your AI agent:** Deploy Strapi on Blossom with managed Postgres and R2 uploads. Help me publish an article through the API.

> Follow this guide: https://docs.blossom88.com/guides/strapi/



Use your existing Strapi project or adapt the
[Blossom Strapi example](https://github.com/blossom-examples/strapi), which
includes an Article content type and the official S3 upload provider.
Your agent checks the current
[deployment requirements](https://docs.strapi.io/cms/installation/docker),
chooses compatible maintained dependencies, and saves the project configuration.

| Part | Purpose |
|---|---|
| Web Service | Strapi Admin and content API, built from your project |
| Managed PostgreSQL | Administrators, content records, permissions, and media metadata |
| Your bucket | Uploaded media, independently of the Container |

Build the project's production Dockerfile, including its Admin interface.
Run Strapi in production mode. Keep application keys, Admin and user JWT
secrets, token salts, and the encryption key stable across deployments.
Set the final HTTPS address and trust Blossom's reverse proxy.

### Connect Your Bucket

Create a private bucket in your own provider account and a bucket-restricted
credential. Install Strapi's official AWS S3 upload provider in the project.
Supply the endpoint, region, bucket, and credentials through a private
environment file. Keep provider administration credentials off the app.

For R2, use path-style requests and allow the bucket endpoint in Strapi's
media security policy. Set the bucket CORS policy to allow `GET` and `HEAD`
from your Strapi HTTPS origin so browser previews load. With a private provider,
Strapi signs media previews in **Admin**. Check the authorized Content API
response too: the tested release returns expiring signed media links. Refresh
those links instead of saving them as permanent file addresses.

For public website images, deliberately configure a separate bucket for public
delivery. Keep private documents separate.

### Create the Owner

Keep the site behind **Blossom Account access** while opening `/admin` and
creating the first administrator. Configure email before relying on invitations
or password resets.

## Publish Your First Article

> **Ask your AI agent:** Help me publish a sample article and create an API token that can only read articles.

> Follow this guide: https://docs.blossom88.com/guides/strapi/



Add an article in Content Manager, upload a cover image, and save the draft.
Publish it, then read it through the Content API with a restricted token.
Check that the same token cannot create content and that an unauthenticated
request is refused.

![A published article in Strapi Admin, with its title, slug, and content.](/assets/images/guides/strapi/article-editor.png)

Allow only the intended Content API routes through Blossom's access policy
when an external website needs them. Keep Admin private and retain Strapi's
own API permissions.

<details class="optional-reading" markdown="1">
<summary>Commands behind the deployment</summary>

Save the content model, upload provider, and Dockerfile in your Git repository.
Create the App, source Environment, managed database, and database link:

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom git_repo:create --data repository.yml
    blossom environment:build_config:update --id environment-100 --data build.yml
    blossom database_instance:create --data postgres.yml --follow
    blossom environment_link:create --data database-link.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom service:create --data web-service.yml
    blossom environment:deploy --id environment-100 --follow

The example reads the linked `DATABASE_URL`. Its web process runs `npm run
start`, listens on port `1337`, and uses an HTTP readiness check at `/_health`.
Strapi initializes its database schema when the application starts.

The example's bucket settings:

```yaml
S3_BUCKET: your-private-bucket
S3_ENDPOINT: https://your-account.r2.cloudflarestorage.com
S3_REGION: auto
```

Supply `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY` privately. The provider
configuration enables path-style requests and private signed Admin previews.
Use credentials with a lifetime suitable for your deployment.

</details>

## Keep Content Through Updates

> **Ask your AI agent:** Update Strapi and check that our published article, API token, and cover image still work.

> Follow this guide: https://docs.blossom88.com/guides/strapi/



Content records live in PostgreSQL and media bytes live in the bucket. Keep
both, along with your application secrets, and back them up. Replacing the web
Container doesn't require retaining its local disk.

Content types and plugins belong in the project source. Edit them locally or
with Strapi's development Content-Type Builder, commit the changes, and rebuild.
Production Admin edits content rather than rewriting the deployed application.

Start with one web Container. Check Strapi's requirements for shared sessions,
jobs, and plugins before adding replicas; this guide verifies replacement and
persistence with one instance.

## What You Get

- A headless CMS with a private Admin interface
- Published content served through a permission-controlled API
- Managed PostgreSQL for content and configuration
- Media in your own S3 or R2 bucket
- A Git project you can extend and rebuild
