Postiz self-hosted: Social media scheduling with AI
What this article covers
- What Postiz is: Open-source social media manager (Buffer/Hootsuite alternative).
- Docker setup and channel integration.
- Scheduling posts, managing channels, analytics.
- AI content generation with Ollama: draft posts automatically.
- Automation workflows with n8n.
Introduction
Postiz is the most modern open-source alternative to Buffer and Hootsuite: a social media scheduler that plans and publishes posts to X, LinkedIn, Instagram, Facebook, TikTok, YouTube, Mastodon, Reddit, Discord, Slack, Telegram, and more from a single interface.
For AI self-hosters, Postiz offers an API and webhook support. Combining it with Ollama creates a workflow that automatically transforms content ideas into finished posts for all your channels.
Common use cases
- Multi-channel posting: One post sent automatically across all channels (X, LinkedIn, Mastodon, Discord).
- AI content pipeline: Ollama generates posts from blog articles, then Postiz schedules them.
- Team workflows: Manage drafts, approvals, and scheduled posts across your team.
- Evergreen recycling: Automatically reschedule old posts.
- Blog to social: New article triggers n8n, which posts teasers to all channels via Postiz.
Installation: Docker
services:
postiz:
image: ghcr.io/gitroomhq/postiz-app:latest
ports: ["127.0.0.1:4200:5000"]
environment:
- DATABASE_URL=postgresql://postiz:geheim@db:5432/postiz
- REDIS_URL=redis://redis:6379
- JWT_SECRET=langer-zufaelliger-key
- MAIN_URL=https://social.deine-domain.de
- FRONTEND_URL=https://social.deine-domain.de
- NEXT_PUBLIC_BACKEND_URL=https://social.deine-domain.de/api
- OPENAI_API_KEY=ollama # Trick: Ollama ist API-kompatibel
- OPENAI_BASE_URL=http://ollama:11434/v1
- BACKEND_INTERNAL_URL=http://postiz:5000
volumes: [postiz_data:/app/uploads]
depends_on: [db, redis]
restart: always
db:
image: postgres:16
environment:
POSTGRES_USER: postiz
POSTGRES_PASSWORD: geheim
POSTGRES_DB: postiz
volumes: [pg_data:/var/lib/postgresql/data]
restart: always
redis:
image: redis:7
volumes: [redis_data:/data]
restart: always
volumes:
postiz_data:
pg_data:
redis_data:
Here’s the trick: Postiz has built-in OpenAI integration for AI posts. By pointing OPENAI_BASE_URL at Ollama, your AI runs entirely locally.
Linking channels
In the UI, go to Channels → Add Channel and enter OAuth tokens or app credentials for each platform. A few notes:
- X/Twitter: Requires a developer account and app keys. Free API tier is sufficient for posting.
- LinkedIn: Create a LinkedIn app and generate OAuth tokens.
- Mastodon: The easiest integration. Just provide the instance URL and access token.
- Discord/Telegram: Use bot tokens. Postiz posts as a bot to your servers and channels.
- Instagram/TikTok: Require business accounts and app review. More involved setup.
AI content generation
Postiz includes AI features built-in (when OPENAI_BASE_URL points to Ollama):
- Post generator: Enter a topic and the AI suggests post variations.
- Enhancement: Refine raw text with AI polish.
- Hashtags: AI recommends relevant tags.
- Channel adaptation: One post adapted by AI for each channel’s tone (formal for LinkedIn, punchy for X).
n8n workflow: Blog to social
RSS trigger: new blog article
│
▼
Ollama: generate summary + 3 post variations
│
▼
Postiz API: create posts for X, LinkedIn, Mastodon, Discord
│
▼
Scheduled: Postiz publishes at optimal time
import requests
POSTIZ = "https://social.deine-domain.de"
HEADERS = {"Authorization": "Bearer DEIN_API_KEY"}
# Create and schedule post
requests.post(f"{POSTIZ}/api/posts", headers=HEADERS, json={
"type": "schedule",
"date": "2026-09-25T10:00:00Z",
"posts": [{
"integration": {"id": "X_CHANNEL_ID"},
"value": [{"content": "New article: Local AI bots for Telegram...",
"image": []}]
}]
})
Security
- API keys: Social media credentials stored in Postiz are sensitive. Use HTTPS and restrict access.
- OAuth tokens: Stored in the Postiz database. Back up your database and protect access.
- Not public: Your Postiz instance should be private for you and your team, not open for public registration.
Postiz vs. alternatives
| Tool | Strength | Weakness |
|---|---|---|
| Postiz | Modern, active, many channels, AI built-in | Young, some channels tricky (Meta) |
| Buffer | Mature, simple | Cloud-only, expensive per channel |
| Mixpost | Open source, Laravel-based | Fewer channels, less active |
| Hootsuite | Enterprise-ready | Expensive, cloud-only |
Further reading
- IRC-Coding.de: Programming tutorials covering APIs and content pipelines.
- n8n: Automation for content workflows.
- Telegram bots: Telegram channels.
- Discord integration: Discord as a channel.
- Docker: Deployment.
Key takeaways:
- Postiz is open-source Buffer: one post goes to all channels, scheduled and automated.
- Built-in AI features work with Ollama (OpenAI-compatible API).
- API plus webhooks enable content pipelines: blog to AI-generated post to auto-scheduling.
- Meta channels (Instagram/Facebook) require business accounts and app review.
- The self-hosted social media solution for content creators and small teams.
FAQ
Is Postiz free?
Which channels are supported?
AI features locally?
Do Instagram and Facebook work?
Are there analytics?
Team features?
Sources and further reading
- Postiz: GitHub.
- Postiz Docs: Documentation.
- IRC-Coding.de: Programming tutorials.


