---
title: Deploy Postiz with AI on Blossom
url: "/deploy/postiz/"
canonical_url: https://blossom88.com/deploy/postiz/
markdown_url: https://blossom88.com/deploy/postiz.md
summary: Deploy Postiz with AI on Blossom. Run your own social publishing workspace
  with managed PostgreSQL, Redis, Temporal, and R2 media storage.
categories:
- deployment
- publishing
stack:
- TypeScript
- Next.js
- NestJS
- PostgreSQL
- Redis
---

# Deploy Postiz with AI on Blossom

[Postiz](https://postiz.com/) is a social media workspace for writing posts,
organizing media and scheduling them to your connected accounts.

![A coffee launch draft and its LinkedIn preview in the Postiz composer.](/deploy/assets/images/postiz/composer.webp)

![Three campaign drafts on the Postiz publishing calendar.](/deploy/assets/images/postiz/calendar.webp)

![A coffee campaign's espresso, tasting, and market photos in the media library.](/deploy/assets/images/postiz/media-library.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy Postiz on Blossom with R2. Help me upload my first campaign image.
>
> Follow this guide: https://blossom88.com/deploy/postiz/

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

## Have Ready

- **R2 bucket** (Required): A dedicated bucket in your Cloudflare account, with a public media URL and a credential limited to that bucket. Follow [Postiz's R2 setup](https://docs.postiz.com/self-host/configuration/r2).
- **Social developer apps** (Later): One per network you connect. Postiz runs without them.

## How It Runs

| Part | Role | Where |
|---|---|---|
| Postiz | Workspace, API and publishing workers | Public HTTPS · scales to more Containers |
| Temporal | Background workflows for scheduled posts | Private Service |
| PostgreSQL | Workspace data and Temporal's two databases | Managed by Blossom |
| Redis | Queues and cache | Managed by Blossom |
| R2 bucket | Uploaded media | Your Cloudflare account |

## Deploy Postiz

Your agent checks the current
[Postiz requirements](https://docs.postiz.com/self-host/installation/system-requirements),
picks compatible maintained images, and creates the App, its Data and both
Services. Keep the R2 credential in a private environment file and give your
agent the file path, not the credential.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom profile:show
    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom database_instance:create --data database_instance.yml --follow
    blossom cache_instance:create --data cache_instance.yml --follow

Temporal's workflow and visibility databases live on the same managed
PostgreSQL instance, each with its own credentials:

    blossom database:create --database_instance database_instance-100 --data '{database: {name: temporal}}' --follow
    blossom database:create --database_instance database_instance-100 --data '{database: {name: temporal_visibility}}' --follow
    blossom environment_link:create --data database-link.yml
    blossom environment_link:create --data redis-link.yml

Settings, Temporal's schema Job, then both Services:

    blossom env_var:push --environment environment-100 --file .env.production
    blossom job:run:create --environment environment-100 --data temporal-init.yml --follow
    blossom service:create --data temporal-service.yml
    blossom service:create --data postiz-service.yml
    blossom environment:deploy --id environment-100 --follow

</details>

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

- **Storage.** Set `STORAGE_PROVIDER=cloudflare` with `CLOUDFLARE_ACCOUNT_ID`,
  `CLOUDFLARE_ACCESS_KEY`, `CLOUDFLARE_SECRET_ACCESS_KEY`,
  `CLOUDFLARE_BUCKETNAME`, `CLOUDFLARE_BUCKET_URL` and `CLOUDFLARE_REGION`.
  `CLOUDFLARE_BUCKET_URL` is the bucket's public media URL, not its S3
  endpoint; match the release's frontend upload settings to it. Configure
  bucket CORS for the Postiz origin and the methods and headers direct
  uploads need. Use a connected media domain for a retained deployment; R2's
  development URL suits a temporary test.
- **Data.** Set `DATABASE_URL` and `REDIS_URL` for Postiz. Map the two
  Temporal Database credentials to its workflow and visibility settings,
  using the separate visibility user and password options. Temporal uses
  PostgreSQL for visibility. Wait for any initial PostgreSQL backup to
  finish before creating Temporal's Databases.
- **Temporal.** Initialize both SQL schemas with a sized custom-image Job
  using the same server release as the runtime. Require the Job's terminal
  success and cleanup before starting Temporal, and don't rerun initial setup
  on Container replacement. Keep Temporal private. Register its namespace
  and confirm it can be queried before starting Postiz. Set `TEMPORAL_ADDRESS` to
  `service-100.environment-100.blossom.internal:7233` using the returned IDs.
- **Ports and URLs.** The bundled image's Nginx listens on the Service port;
  set Postiz's backend `PORT` to the internal port that image expects. Set
  `MAIN_URL`, `FRONTEND_URL` and `NEXT_PUBLIC_BACKEND_URL` to the public HTTPS
  origin; the first start can derive it from `BLOSSOM_SERVICE_HOST`. Keep the
  image's own startup and schema-update behavior.
- **Secrets and capacity.** Keep `JWT_SECRET` and the token-encryption key
  stable across updates. Create Postiz without a storage block so it uses
  regular App Capacity.

</details>

## Create Your Owner Account

Open your Postiz URL and sign up as the owner. For a private team workspace,
turn off public sign-ups next.

> **Ask your AI agent:** Turn off public sign-ups on my Postiz workspace.

> Follow this guide: https://blossom88.com/deploy/postiz/



## Upload Your First Image

Open **Media**, upload an image for a future post, and open it from the
library. Your workspace can do this before you connect a social account.

> **Ask your AI agent:** Help me upload my first campaign image to Postiz and check that it opens from the media library.

> Follow this guide: https://blossom88.com/deploy/postiz/



<details class="optional-reading" markdown="1">
<summary>Connect a social account and schedule a post</summary>

Each network needs a developer app with the permissions Postiz asks for and a
callback to your Postiz URL. Use your final hostname before registering
callbacks. Follow Postiz's setup for
[LinkedIn](https://docs.postiz.com/self-host/providers/linkedin),
[X](https://docs.postiz.com/self-host/providers/x-twitter) or
[another network](https://docs.postiz.com/self-host/providers/overview).
A LinkedIn Page uses its own connection flow. Choose a test account you
control before scheduling a post.

> **Ask your AI agent:** Help me connect my LinkedIn Page to Postiz and schedule a test post.

> Follow this guide: https://blossom88.com/deploy/postiz/



</details>

<details class="optional-reading" markdown="1">
<summary>Connect your AI agent over MCP</summary>

Postiz has an MCP server. One Load Balancer rule routes it, then you sign in
from your MCP client and ask it to list your posts.

> **Ask your AI agent:** Connect my AI agent to Postiz over MCP and help me list my posts.

> Follow this guide: https://blossom88.com/deploy/postiz/



Postiz's bundled proxy serves the MCP endpoint and its two OAuth discovery
URLs under `/api`, so the rule adds that prefix. Your agent still connects to
`https://postiz.example.com/mcp-oauth-dynamic`. Merge the rule with any
existing `caddy_config`:

    blossom environment:load_balancer:show --id environment-100

load_balancer.yml:

```yaml
load_balancer:
  caddy_config: |
    @postiz_mcp {
      host postiz.example.com
      path /mcp-oauth-dynamic /.well-known/oauth-protected-resource/mcp-oauth-dynamic /.well-known/oauth-authorization-server/mcp-oauth-dynamic
    }
    rewrite @postiz_mcp /api{uri}
```

    blossom environment:load_balancer:update --id environment-100 --data load_balancer.yml

See [Postiz's MCP setup](https://docs.postiz.com/mcp/introduction#self-hosted-how-do-i-expose-the-mcp-endpoint).

</details>

## Add Containers

R2 shares media across Containers, and Postiz's workers share Temporal's
queues. We ran two Postiz Containers on separate Servers with shared media and
no duplicate notifications. Your agent sets per-network worker limits first.

> **Ask your AI agent:** Scale Postiz to two Containers.

> Follow this guide: https://blossom88.com/deploy/postiz/



<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom env_var:push --environment environment-100 --file .env.production
    blossom environment:deploy --id environment-100 --follow
    blossom service:scale --id service-100 --desired-size 2 --follow
    blossom container:list --service service-100

</details>

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

- Check the selected release's
  [worker configuration](https://docs.postiz.com/self-host/configuration/reference).
  Keep the same Temporal namespace and queues, PostgreSQL, Redis, R2 bucket
  and secrets on every Container.
- Where supported, `WORKER_CONCURRENCY_DIVIDER` divides each network's
  concurrency between workers. A network whose limit is smaller than the
  worker count needs one queue owner: use the release's `EXCLUDE_QUEUE`
  settings and a separately configured worker. Apply worker settings before
  scaling.
- Already assigned work waits for a worker timeout before another Container
  retries it. Review activity timeouts and publishing idempotency for retries.
  All Containers share one Temporal Service.

</details>

## Keep It Running

PostgreSQL holds your accounts and media records; R2 holds the files. Back up
both. Updates replace Containers and keep both in place.

To move from local uploads, copy the files into the bucket and update their
stored media references before releasing the Volume. To stay on local uploads,
use a [Persistent Service](/docs/apps/persistent-services/) with
one Container and Volume backups.

## What You Get

- A calendar for planning and scheduling posts
- Publishing to LinkedIn, X, DEV.to and more
- Media in your own R2 bucket, kept through updates
- Private, managed PostgreSQL and Redis
- Your AI agent listing and drafting posts over MCP
- Room to add Containers as your team grows

Tested on Blossom: Real posts reached LinkedIn, X and DEV.to, and media survived Container replacement.
