
Deploy Postiz Public API
Schedule posts from code with the Postiz public API
Just deployed
/uploads
Temporal
Just deployed
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted Postiz Public API (Open-Source Social Media Scheduler) on Railway
This template runs Postiz on Railway with Postgres, Redis and Temporal, so your scripts can schedule and publish to connected channels through the public API. It is built for developers who post from code, CI or their own tools.
About Hosting Postiz Public API open-source software on Railway (self hosted Postiz public API template)
Your posts, media and API keys stay in your own Postgres database, Redis and /uploads volume, and nothing is shared with a third-party scheduler.
This template runs the Postiz app on one service (frontend, /api backend and workers), plus Temporal for scheduled jobs, Postgres 18 and Redis 8.2.
Why Deploy Postiz Public API, the Buffer alternative on Railway (Railway Free Trial)
Buffer charges per channel and keeps the API behind its own plan tiers. Self-hosted Postiz gives you the same scheduling calls on your own domain, with a limit you can raise. Start on the Railway $5 trial and see the spend before you commit.
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 Public API on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Railway vs Other Hosting Providers and VPS for Postiz Public API self hosting
The container is identical everywhere; what changes is how much of the stack you wire up yourself.
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | Four services wired, uploads volume ready. | You run compose and set up TLS yourself. |
| AWS | One bill, API base URL filled from the public domain. | You own ECS, RDS, ElastiCache and the URL wiring. |
| Hetzner | Cheap, and redeploys keep the uploads volume. | Cheap too, but you patch the host and renew certs. |
The API path stays /api/public/v1 on your domain, so moving hosts only changes the domain in your scripts.
Common Use Cases for hosted Postiz Public API
- Release notes from CI: after a tag builds, POST to https://your-domain/api/public/v1/posts with type now and two posts, one for the X integration id and one for LinkedIn, so nobody opens a browser.
- A week of scheduled posts: one request with type schedule carries several posts, each with its own date, so a script can fill the calendar ahead of a launch.
- CMS webhook cross-posting: when an article publishes, your endpoint calls the API with the title and URL, sets shortLink true, and lets the existing channel ids do the rest.
- Slot finding: ask the find-slot endpoint for a channel's next free time before you schedule, instead of guessing a date that collides with something already queued.
- AI drafts queued: generate copy elsewhere, push drafts as scheduled posts with a __type per platform.
Dependencies for Postiz Public API Docker hosted on Railway
Four services: postiz (frontend, API under /api, workers in one container, v2.25.1, public port 5000, /uploads volume, health check /), Temporal 1.28.1 on private port 7233, Postgres 18, Redis 8.2. No social network works until credentials are set.
Deployment Dependencies for Managed Postiz Public API Service (Social Media Scheduling)
Env vars: MAIN_URL and FRONTEND_URL use https://RAILWAY_PUBLIC_DOMAIN, NEXT_PUBLIC_BACKEND_URL is that domain plus /api, so calls go to https://your-domain/api/public/v1/..., JWT_SECRET is 64 chars, DATABASE_URL and REDIS_URL come from their services, TEMPORAL_ADDRESS is Temporal on 7233, plus STORAGE_PROVIDER=local, UPLOAD_DIRECTORY=/uploads, NOT_SECURED=true for login.
Implementation Details for Postiz Public API (Using Postiz official docker image)
The API runs in the official Postiz image. Copy the key from Settings, Developers, Public API, call GET https://your-domain/api/public/v1/integrations for ids, then POST /posts.
How does Postiz Public API compare against other social media scheduling APIs
Postiz API vs Buffer API
- Where Postiz wins: The 90-per-hour create-post cap is an env var (API_LIMIT) you own, and one POST with a posts array schedules several updates per call.
- Where Buffer wins: A managed API with no OAuth apps to register and no servers to run; you never watch Temporal or Postgres.
- Gotcha: Every network needs its own developer credentials before /integrations returns anything useful.
Postiz vs Ayrshare
- Where Postiz wins: No per-profile SaaS meter between you and the networks, and you can read the source when a platform changes its payload.
- Where Ayrshare wins: It absorbs app review and token plumbing for many networks, so one key posts everywhere.
- Cost shape: Ayrshare bills per profile; Postiz bills as your own server, cheaper at some volumes and not others.
Postiz vs Hootsuite
- Where Postiz wins: Hootsuite is dashboard-first for teams; Postiz puts the same scheduling primitives behind HTTP, so scripts and CI are first-class.
- Where Hootsuite wins: Approvals, compliance and vendor support when publishing breaks at 2am.
- Honest gap: review happens in the Postiz UI, so plan how API-created posts get checked.
Postiz vs Mixpost
- Where Postiz wins: A documented public API with an official Node.js SDK (@postiz/node) and webhooks, under AGPL-3.0.
- Where Mixpost wins: A lighter Laravel app if you already run PHP, and paid Pro and Enterprise tiers buy support without AGPL terms.
- Both self host: Neither charges per post; check Mixpost's API coverage per edition before you commit.
How to use Postiz Public API (the OSS social media scheduler)?
- Sign up at /auth on your domain. The first account is admin.
- Add a channel. Each network needs its own developer app credentials as env vars on postiz (X_API_KEY, X_API_SECRET, and so on).
- In Settings, Developers, Public API, copy the key. It goes in the header with no Bearer prefix.
curl -H "Authorization: YOUR-KEY" https://your-domain/api/public/v1/integrations
- Take the integration id. Upload an image first if needed, then POST a scheduled post:
{"type":"schedule","date":"2026-11-02T09:00:00Z","shortLink":true,"tags":[],"posts":[{"integration":{"id":"YOUR-ID"},"value":[{"content":"Hello","image":[]}],"settings":{"__type":"x"}}]}
- Check the calendar.
How to self host Postiz Public API on other VPS Services (Postiz self hosting guide)
You need a domain with HTTPS, about 2 GB of RAM, and Docker with Compose.
Clone the Repository
git clone https://github.com/gitroomhq/postiz-docker-compose.git
cd postiz-docker-compose
Install Dependencies
Install Docker and the Compose plugin.
Configure Environment Variables
Edit the environment block in docker-compose.yaml: set MAIN_URL, FRONTEND_URL, NEXT_PUBLIC_BACKEND_URL and JWT_SECRET, then add each network's credentials, like X_API_KEY and X_API_SECRET, with OAuth callbacks on your domain.
Start the Postiz Public API Application
Run the official compose stack: app, Postgres, Redis and Temporal.
docker compose up -d
Open your domain, sign up as the first admin, connect a channel, then call https://your-domain/api/public/v1/integrations with your key in the Authorization header. Railway wires the services, volumes and domain for you.
Official Pricing of Postiz Public API (Postiz pricing)
Postiz itself is open source under AGPL-3.0 and free to self host, so there is no per-seat or per-channel fee and no charge for API calls. What you pay is infrastructure.
Postiz Public API cloud vs self hosted comparison (Pricing, features, costs, and more)
The API surface is the same on Postiz Cloud and on this template: same endpoints, same JSON body, same key header. Cloud caps create-post at 100 requests per hour.
Monthly cost of self hosting Postiz Public API on Railway
Light use of the four services lands around $10-25/mo, and the $5 Railway trial covers the first experiments. No per-channel fee, no per-post fee. The trade is that you pay for uptime whether or not anything is scheduled.
System Requirements for Hosting Postiz Public API on a VPS
Roughly 2 GB RAM or more, plus Postgres, Redis and Temporal alongside the app. Storage grows with /uploads, so size the volume for your image history.
Frequently Asked Questions (FAQs)
What is the base URL for the Postiz public API on a self-hosted instance?
NEXT_PUBLIC_BACKEND_URL holds your domain plus /api, so calls go to https://your-domain/api/public/v1/integrations, /posts and /upload. Postiz Cloud uses https://api.postiz.com instead, with no /api segment.
Why do I get a 401 when I call the API?
The header is missing or the key is unknown. Send the key raw, with no Bearer prefix: Authorization: YOUR-API-KEY. Rotating the key in Settings, Developers, Public API invalidates the old one immediately, so update your CI secret.
Why am I getting 429 errors?
The create-post endpoint allows 90 requests per hour on self-hosted (100 on cloud), and only that endpoint is throttled. Batch several posts into one request, or change the API_LIMIT variable on the postiz service and redeploy.
What does __type mean in post settings?
It names the target platform, so settings.__type is x or linkedin. Add that platform's own fields next to it.
How do I attach images to an API post?
Upload with POST /public/v1/upload first, then put the returned path in the value image array. Skip inline base64, since bodies over 50 MB return 413.
Is there an official SDK?
Yes, @postiz/node on npm wraps integrations, upload and posts so you pass objects instead of raw fetch calls. Everything else is plain JSON over HTTP, so any language works.
Template Content
