Schedule social media posts with AI: Postiz on Railway
Short answer: deploy Postiz on Railway to plan, schedule and publish posts to X, LinkedIn, Instagram, Facebook, Threads, YouTube, TikTok, Bluesky, Mastodon and other networks from your own server, with optional AI writing help using your own OpenAI key. Tracklayer’s template runs Postiz v2.25.0 together with the Temporal workflow engine it needs, so it is a six-service project rather than a single app. Expect a Hobby plan or higher.
Deploy Postiz on RailwayWhen a self-hosted scheduler makes sense
Postiz is an open-source social media scheduler. People use it to:
- plan a content calendar across several networks from one dashboard,
- let a small marketing team or agency work on posts on an instance they own,
- keep social credentials, drafts and analytics on their own infrastructure,
- draft and refine posts with an AI assistant using their own OpenAI key,
- post from other tools through the Postiz public API.
Each network needs its own developer app. That setup is the main work, and it happens with the networks, not Railway.
Why it is six services
Since Postiz v2.12.0, every scheduled post runs as a durable Temporal workflow. A self-hosted install therefore needs a Temporal server, its persistence, and a visibility store that Postiz queries when posts are edited or deleted.
| Service | Image | Role |
|---|---|---|
| Postiz | ghcr.io/gitroomhq/postiz-app:v2.25.0 |
Web app, API and Temporal workers, media volume |
| Postgres | postgres-ssl:18 |
Separate databases for Postiz and Temporal |
| Redis | redis:8.2 |
Cache and rate limiting |
| Temporal | temporalio/server:1.32.1 |
Workflow engine, single node |
| Elasticsearch | elasticsearch:8.19.23 |
Temporal visibility index, password protected |
| Temporal UI | temporalio/ui:2.55.0 |
Workflow inspection behind basic auth |
Uploaded media is stored on a volume and served from your Postiz domain, so social networks can fetch it.
Deploy Postiz, step by step
These steps use Tracklayer’s Postiz v2 template.
- Deploy the template and wait. Temporal waits for Elasticsearch and Postgres on the first deploy, so Postiz can take several minutes to become healthy.
- Register immediately. Open the Postiz domain and create the first account. It becomes the owner, and registration then closes automatically (
DISABLE_REGISTRATION=true). - Invite teammates when needed. Set
DISABLE_REGISTRATION=falseon the Postiz service, let them sign up, then set it back totrue. - Email is optional. Accounts are activated automatically while
EMAIL_PROVIDERis empty. SetEMAIL_PROVIDER=resendwithRESEND_API_KEY, ornodemailerwith SMTP settings, for activation and notification emails. - Connect a network. Create a developer app and use the redirect URI
https://your-postiz-domain/integrations/social/provider. Add its keys, for exampleX_API_KEYandX_API_SECRET, orLINKEDIN_CLIENT_IDandLINKEDIN_CLIENT_SECRET, to the Postiz service. - Optional: Temporal UI. Its login is
TEMPORAL_UI_USERNAMEandTEMPORAL_UI_PASSWORDon the Temporal UI service. - Custom domain. Update
MAIN_URL,FRONTEND_URLandNEXT_PUBLIC_BACKEND_URL, and the redirect URIs in your social apps.
Persistence
Postiz data and Temporal data are in separate databases on Postgres, and uploaded media is on a volume. Back up Postgres before upgrades.
Costs
The template’s resource figures are estimates, not measured on Railway. They assume a single team with a few connected channels, at the Railway prices listed in the template’s TEMPLATE.md:
- Idle: about 2.07 GB of RAM in total, about $25 a month.
- Typical: about 3.03 GB of RAM in total, about $45 a month.
- Biggest parts: Postiz and Elasticsearch need about 1 GB each at typical load.
- Saving: lowering
ES_JAVA_OPTSto-Xms256m -Xmx256msaves about 0.25 GB, about $2.50 a month, at the cost of headroom. - Plan guidance from the template: Hobby at minimum, because the Trial plan’s 1 GB per-service limit is at or below what Postiz and Elasticsearch need. Use Pro if uploads will exceed 5 GB.
AI drafting uses your own OpenAI key, which is billed by OpenAI.
Limitations and licences
- Scaling: Postiz runs its web app and workers in one container with a volume, so scale it vertically. Temporal runs as a single node, and
NUM_HISTORY_SHARDSis fixed at the first boot. - Licences: Postiz is AGPL-3.0, Elasticsearch’s default distribution is under the Elastic License 2.0, and Temporal is MIT.
- Affiliation: a community template, not affiliated with Postiz, Temporal or Elastic.
Upgrades
Back up Postgres, then change the image tag on the Postiz service. Postiz applies schema changes on start. For Temporal, change both FROM tags in services/temporal/Dockerfile, one minor version at a time.
Other options
For team docs and whiteboards, see the AFFiNE template. For file sharing, see the Nextcloud template. More walkthroughs are listed under guides.
FAQ
How do I log in to Postiz after deploying?
Open the Postiz domain and register right away. The first account becomes the owner, and registration then closes. To invite teammates, set DISABLE_REGISTRATION to false temporarily, let them sign up, then set it back to true.
How do I connect social networks?
Create a developer app with each network, use the redirect URI https://your-postiz-domain/integrations/social/provider, and add its keys to the Postiz service variables. Bluesky only needs a handle and an app password.
Why does the first start take several minutes?
On the first deploy, Temporal waits for Elasticsearch and Postgres, so Postiz can take several minutes to pass its healthcheck.
How do I upgrade Postiz?
Back up Postgres first, then change the image tag on the Postiz service. Postiz applies schema changes on start. For Temporal, change both FROM tags in services/temporal/Dockerfile, one minor version at a time.
What are the licence notes?
Postiz is AGPL-3.0. Elasticsearch uses its default distribution under the Elastic License 2.0. Temporal is MIT. If you plan to offer this stack as a managed service to third parties, take legal advice first. This is a community template, not affiliated with Postiz, Temporal or Elastic.