---
title: Deploy Strapi with AI on Blossom
url: "/deploy/strapi/"
canonical_url: https://blossom88.com/deploy/strapi/
markdown_url: https://blossom88.com/deploy/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
stack:
- TypeScript
- Node.js
- React
- PostgreSQL
---

# Deploy Strapi with AI on Blossom

[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.

## Ask Your Agent

> **Ask your AI agent:** Deploy Strapi on Blossom. Help me publish an article my app can fetch.
>
> Follow this guide: https://blossom88.com/deploy/strapi/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Your Content Setup

| 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 |

Use your own Strapi project or the
[Blossom example](https://github.com/blossom-examples/strapi). Bring a private
S3 or R2 bucket for media. Content types and plugins belong in project source;
production Admin edits the content.

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

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Test the restricted Content API token: it can read published articles but
cannot create content. An unauthenticated request must be refused.

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.

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.

[Source code](https://github.com/strapi/strapi).

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>

## Publish Your First Article

Create the administrator behind Blossom Account access. Publish an article
with an image and read it through the API using a read-only token. Allow only
the content routes your website needs; keep Admin private.

<details class="optional-reading" markdown="1">
<summary>Updates and storage</summary>

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.

</details>

## 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
