---
title: "Deploy Postiz [Updated Sep'26]"
description: "Self-host Postiz — schedule to 30+ platforms via your own REST API"
category: "Automation"
url: https://railway.com/deploy/postiz-social-api
---

# Deploy Postiz [Updated Sep'26]

Self-host Postiz — schedule to 30+ platforms via your own REST API

**[Deploy Postiz [Updated Sep'26] on Railway](https://railway.com/template/postiz-social-api)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/postiz-social-api/manifest.json

- **Creator:** SB
- **Category:** Automation

## Template content

### postiz_redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1

### temporal-ui https://docs.temporal.io/img/favicon.png

- **Image:** temporalio/ui

### temporal-postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl

### temporal-admin-tools https://djeqr6to3dedg.cloudfront.net/repo-logos/temporalio/admin-tools/live/logo-1731448348189.png

- **Image:** temporalio/admin-tools

### postiz_postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl

### temporal_server https://docs.temporal.io/img/favicon.png

- **Image:** temporalio/auto-setup

### postiz-app https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/postiz.svg

- **Image:** ghcr.io/gitroomhq/postiz-app

### elasticsearch-railway https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/elasticsearch.svg

- **Source:** praveen-ks-2001/elasticsearch-railway

## Documentation

# Deploy and Host Postiz on Railway

Postiz is an open-source social media scheduler with a full REST API — a self-hosted Buffer alternative you can drive programmatically. Beyond its dashboard, Postiz exposes an API and webhooks to create, schedule, and publish posts across 30+ platforms (X, LinkedIn, Instagram, TikTok, Reddit, and more) from your own code, an automation like n8n, or your product's backend. Own your social-posting API instead of paying per-call SaaS. This template deploys the full modern Postiz stack — including the Temporal engine that actually runs scheduled posts — so your programmatic scheduler is live in minutes.

---

## What This Template Deploys

| Service | Purpose |
| --- | --- |
| **Postiz** | The scheduler, REST API, webhooks, and dashboard (port 5000) |
| **PostgreSQL** | Posts, accounts, and history |
| **Redis** | Queues, rate limiting, and caching |
| **Temporal** | The workflow engine that executes scheduled posts |
| **Elasticsearch** | Search and indexing (Railway-compatible wrapped image) |

All connect over Railway's private network. Postiz serves the API and dashboard, Temporal runs the scheduling workflows that make posts actually publish, and Postgres, Redis, and Elasticsearch back the platform — a self-hosted social-posting API you own.

---

## About Hosting

This template hosts Postiz as a programmable posting backend, and getting its modern architecture right is what makes the API reliably publish — all handled here.

**A social-posting API you own — call it from anything.** Postiz exposes a REST API and webhooks, so any system that can make an HTTP request — your app's backend, an n8n or cron workflow, a SaaS product adding a "schedule to social" feature — can create and schedule posts across 30+ platforms through one endpoint. Instead of integrating each network's API and paying a per-call scheduling SaaS, you run your own posting API at flat cost. Generate an API key in the dashboard and point your code at it.

**Temporal is required now — or the API accepts posts that never publish.** Since v2.12, Postiz uses a Temporal workflow engine to execute scheduled posts. Without it, the app and API start and accept requests, but scheduled posts silently never go out — the most common modern Postiz failure. This template includes the full Temporal stack, so posts created via the API or dashboard actually fire on schedule.

**The URL variables must match your domain — or OAuth fails.** Connecting social accounts uses OAuth callbacks, so `MAIN_URL`, `FRONTEND_URL`, and `NEXT_PUBLIC_BACKEND_URL` (your domain plus `/api`) must point at your Railway public domain, or account connections fail. This template sets all three automatically, so linking accounts works once you add each platform's API keys, and the API can then post to them.
**Railway-specific fixes, and webhooks for automation.** Elasticsearch's config uses dotted env-var names Railway rejects, so this template uses a wrapped image that writes the config to a file at build time; `PORT` is set explicitly so routing reaches the container. Posts, accounts, and history persist in PostgreSQL, uploads and Temporal's database on volumes, so everything survives redeploys; `JWT_SECRET` is auto-generated and the first user becomes admin. Beyond outbound posting, Postiz fires webhooks on events and integrates with automation tools, so you can build two-way flows — trigger a post when your app ships a release, or notify your system when a post publishes.

Typical cost: **~$15–25/month** on Railway for the five-service stack — larger than older Postgres-and-Redis-only setups because Temporal and Elasticsearch are now part of Postiz, but it's what makes API-driven scheduling reliable. Postiz is AGPL-licensed and free.

---

## How It Compares

| | Postiz API (self-hosted) | Buffer/Ayrshare API | Per-network APIs | Managed Postiz |
| --- | --- | --- | --- | --- |
| One API for 30+ platforms | Yes | Yes | No — integrate each | Yes |
| Cost model | Flat infra | Per post/call | Free but you build it | Subscription |
| Webhooks + automation | Yes | Varies | Per network | Yes |
| Own your data + keys | Full — your infra | Vendor | Full | Vendor |
| Self-hostable | Yes | No | N/A | No |

Social-posting API vendors like Ayrshare are convenient but bill per post or per call, which scales badly for a product. Integrating each network's API yourself means maintaining a dozen OAuth flows. Postiz's managed cloud is subscription-priced. Self-hosted Postiz's edge is one REST API across 30+ platforms — with webhooks and the dashboard included — at flat infrastructure cost, so you own the posting API your app or automations call.

---

## Deploy in Under 5 Minutes

1. Click **Deploy on Railway** — the full stack (Postiz, Postgres, Redis, Temporal, Elasticsearch) builds (~5 minutes)
2. Confirm the URL variables point at your Railway domain and `JWT_SECRET` is set
3. Wait for Temporal's auto-setup, then open your Postiz domain and register the first user (admin)
4. Add each social platform's API keys, connect accounts, and generate a Postiz API key
5. Call the API from your app, n8n, or a script to create and schedule posts programmatically

Point a webhook at your system to be notified when posts publish.

---

## Common Use Cases

- **Programmatic posting** — schedule to 30+ platforms from your app's backend via one REST API
- **Automation workflows** — trigger social posts from n8n, cron, or CI on your own events
- **Data-owned publishing** — keep content, accounts, and API keys on your infrastructure

---

## Configuration

| Variable | Required | Description |
| --- | --- | --- |
| `MAIN_URL` / `FRONTEND_URL` | Required | Your Railway domain — for OAuth callbacks and links |
| `NEXT_PUBLIC_BACKEND_URL` | Required | Your Railway domain plus `/api` |
| `JWT_SECRET` | Generated | Signs session tokens — rotating it logs everyone out |
| Storage volumes | Pre-set | Persist uploads, Postgres, and Temporal data |

> **Temporal is mandatory, and URLs must match.** Since v2.12 Postiz needs Temporal to run scheduled posts — this template includes it, so posts created via the API actually publish. `MAIN_URL`, `FRONTEND_URL`, and `NEXT_PUBLIC_BACKEND_URL` must point at your Railway domain or OAuth account-connection fails.

> **Generate an API key to go programmatic.** Create a Postiz API key in the dashboard, then call the REST API from your app, automation, or scripts. A wrapped Elasticsearch image and explicit `PORT` handle Railway's requirements; data persists on volumes.

---

## Dependencies for Postiz Hosting

- Railway account — ~$15–25/month for the five-service stack
- PostgreSQL, Redis, Temporal, and Elasticsearch (all included and wired)
- Persistent volumes for uploads and databases (included)
- API keys for each social platform you connect; an HTTP client or automation to call the API

### Deployment Dependencies

- [Postiz GitHub Repository](https://github.com/gitroomhq/postiz-app)
- [Postiz Public API Documentation](https://docs.postiz.com/public-api)
- [Postiz Configuration Reference](https://docs.postiz.com/configuration/reference)
- [Railway Private Networking](https://docs.railway.com/guides/private-networking)

### Implementation Details

The template runs `ghcr.io/gitroomhq/postiz-app` with the full modern stack: PostgreSQL, Redis, a Temporal service (the engine that executes scheduled posts), and Elasticsearch, connected over Railway's private network via reference variables. Since Postiz v2.12, Temporal is a hard dependency for the scheduler — without it the API accepts posts that never publish — so including it is essential for programmatic use.

Postiz exposes a REST API and webhooks for creating, scheduling, and managing posts across 30+ platforms; an API key generated in the dashboard is used as a bearer token, so applications, automation tools (n8n, cron), or a product backend can drive scheduling without touching each network's API directly. Two Railway-specific adaptations are applied: a wrapped Elasticsearch image writes its config to a file at build time because Railway rejects dotted env-var names, and `PORT` is set explicitly so routing reaches the container. The public URL variables are set to the Railway domain so OAuth callbacks resolve, and `JWT_SECRET` is auto-generated. Multi-user mode is available via `IS_GENERAL=true`. Data persists on volumes, so posts, accounts, and history survive redeploys; on first boot Temporal auto-configures and the first user becomes admin. PostgreSQL and the volumes are the backup targets.

---

## Frequently Asked Questions

**Can I schedule posts from my own code?** Yes — that's the point of this perspective. Postiz exposes a REST API (and webhooks); generate an API key in the dashboard and call it from your app, an n8n or cron workflow, or your product's backend to create and schedule posts across 30+ platforms.

**How is this cheaper than a posting-API vendor?** Vendors like Ayrshare bill per post or per call, which scales badly. Self-hosted Postiz is flat infrastructure cost regardless of volume, and you own the API and data.

---

## Why Deploy Postiz on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Postiz on Railway you get a self-hosted social-posting API with the hard parts solved — the full Temporal stack so API-scheduled posts actually publish, the OAuth URLs and Railway-specific Elasticsearch fix handled, and persistence wired. Schedule to 30+ platforms programmatically from your own code, self-hosted on infrastructure you own.

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/postiz-social-api
