---
title: Deploy Postiz with AI
url: "/guides/postiz/"
canonical_url: https://docs.blossom88.com/guides/postiz/
markdown_url: https://docs.blossom88.com/guides/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
---

# Deploy Postiz with AI

[Postiz](https://postiz.com/) is a social media workspace for preparing content,
organizing media, and scheduling posts to connected accounts. Run your own
instance on Blossom, then connect the social providers you use.

It's written in TypeScript, with a Next.js (React) frontend, a NestJS backend,
and a PostgreSQL database. Explore the
[source on GitHub](https://github.com/gitroomhq/postiz-app#tech-stack).

[Install the Blossom CLI and skill](/learn/getting-started/install/)
and choose a Blossom Cloud Location. You can also use
[Blossom BYOC (bring your own cloud)](/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Prepare Your Media Bucket

**R2 is the recommended setup for horizontal scaling.** Every Postiz Container
uses the same uploaded media, so files stay available when you add or replace
Containers. This removes the single-Container storage constraint of a local
Persistent Service Volume and lets Postiz use regular App Capacity. See
[Add Containers](#add-containers) for the worker configuration.

Use a dedicated R2 bucket in **your own Cloudflare account**, with a public
HTTPS media URL. Postiz returns these URLs for displaying and publishing
uploads. For a retained deployment, connect your media domain to the bucket;
R2's development URL is suitable for a temporary test.

Follow Postiz's [R2 setup](https://docs.postiz.com/self-host/configuration/r2).
Create a credential restricted to this bucket and keep it in a private
environment file. Give your agent the file path, not the credential in chat.
Configure CORS for your Postiz origin, including the methods and headers
needed by direct uploads.

## Ask Your Agent

> **Ask your AI agent:** Deploy Postiz on Blossom with R2 for uploads.

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



Your agent checks the current [Postiz requirements](https://docs.postiz.com/self-host/installation/system-requirements),
chooses compatible maintained images, and saves the configuration for your App.

| Part | Purpose |
|---|---|
| Postiz | Runs the web workspace, API, and bundled workers |
| Temporal | Keeps background workflow state in PostgreSQL |
| Managed PostgreSQL | Stores Postiz data and separate Temporal workflow and visibility databases |
| Managed Redis | Provides Postiz's cache and queue connection |
| Your R2 bucket | Keeps uploaded media independently of Containers |

Postiz and Temporal use regular App Capacity. Temporal can use PostgreSQL for
visibility as well as workflow data, without adding Elasticsearch for this
setup. Keep Temporal private.

Create the first Postiz owner account when the workspace opens. Keep
`JWT_SECRET` and the token-encryption key stable across updates, and disable
further public registration when the workspace is for your own team.

![Postiz media library with images stored in R2](/assets/images/guides/postiz/media.png)

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

Your agent prepares each file with your Location, resources, and selected
images. Service images can differ within one Environment.

    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

Create Postiz's database and Temporal's workflow and visibility databases on
the managed PostgreSQL instance. Each Database has its own credentials:

    blossom database:list --database_instance database_instance-100
    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

Link all three Databases and Redis to the Environment. Set Postiz's
`DATABASE_URL` and `REDIS_URL`; map the two Temporal Database credentials to
its workflow and visibility connection settings. Use the separate visibility
user/password options in Temporal's standard configuration.

Set `STORAGE_PROVIDER=cloudflare` and the native R2 settings:
`CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_ACCESS_KEY`,
`CLOUDFLARE_SECRET_ACCESS_KEY`, `CLOUDFLARE_BUCKETNAME`,
`CLOUDFLARE_BUCKET_URL`, and `CLOUDFLARE_REGION`. Use the bucket's public media
base URL, not its authenticated S3 endpoint, for `CLOUDFLARE_BUCKET_URL`.
Match the selected release's frontend upload settings to that URL too.

Initialize both Temporal SQL schemas with a sized custom-image Job using
Temporal's supported schema tools. Require the Job's terminal success and
confirmed cleanup before starting Temporal. Use the same compatible server
release for schema tools and runtime; do not rerun initial schema setup on
ordinary Container replacement.

    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 environment:deploy --id environment-100 --follow

Register Temporal's namespace, then set Postiz's `TEMPORAL_ADDRESS` to the
private Service address: `service-100.environment-100.blossom.internal:7233`,
using the returned IDs.

For the bundled Postiz image, keep its Nginx listener and backend listener
separate. Blossom's Service port points to Nginx; the startup command sets
Postiz's backend `PORT` to the internal port expected by that image. Configure
`MAIN_URL`, `FRONTEND_URL`, and `NEXT_PUBLIC_BACKEND_URL` for your public HTTPS
origin. The initial startup can derive it from `BLOSSOM_SERVICE_HOST`.
Keep the image's supported startup and schema-update behavior.

Create Postiz without a storage block so it uses regular App Capacity:

    blossom service:create --data postiz-service.yml
    blossom environment:deploy --id environment-100 --follow
    blossom environment:show --id environment-100

</details>

## Connect Your Social Accounts

Postiz can start before social-provider credentials are installed. To connect
an account, create the provider's developer app, configure its required
permissions, and register the callback for your Postiz HTTPS address.

Follow Postiz's setup for [X](https://docs.postiz.com/self-host/providers/x-twitter),
[LinkedIn](https://docs.postiz.com/self-host/providers/linkedin), or
[another supported provider](https://docs.postiz.com/self-host/providers/overview).
A LinkedIn Page uses its own connection flow. Use a stable hostname before
registering provider callbacks, then authorize the intended account inside
Postiz.

> **Ask your AI agent:** Help me connect my social account to Postiz and prepare a test post.

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



## Keep Media Across Updates

R2 keeps the files; managed PostgreSQL keeps the workspace's accounts and
media records. Keep backups of both. Uploads and downloads survived Container
replacement in our development test.

For existing local uploads, copy the files into the bucket and update their
stored media references before releasing the Volume. If you prefer local
uploads, use a [Persistent Service](/docs/apps/persistent-services/)
with one Container and enable Volume backups.

## Add Containers

Postiz's bundled workers share Temporal task queues. We tested two Postiz
Containers on separate Servers, shared media access, and native workflows
without duplicate notifications. Already assigned work can wait for a worker
timeout before another Container retries it.

> **Ask your AI agent:** Scale Postiz to two Containers and check the workers.

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



Before scaling, have your agent 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 application secrets across Containers. Keep worker concurrency within
each social provider's limits.

<details class="optional-reading" markdown="1">
<summary>Worker limits and scaling commands</summary>

Where supported, `WORKER_CONCURRENCY_DIVIDER` divides provider concurrency
between workers. A provider whose limit is smaller than the worker count
needs one queue owner; dividing alone cannot reduce each worker below one.
Use the release's `EXCLUDE_QUEUE` settings and a separately configured worker
when a queue must have a single owner. Apply worker settings before scaling.

    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

The worker check used channels marked as needing reconnection, so it never
contacted a social network. Test real delivery and retries with your provider.
Review activity timeouts for recovery speed and publishing idempotency for
retry safety. Multiple Postiz Containers still share one Temporal Service.

</details>

## What You Get

Your own Postiz workspace on regular App Capacity, private managed data, a
Temporal workflow backend, and R2 media shared across Containers that survives
app updates. Add your provider credentials when you're ready to connect social
accounts.
