Docker Compose Setup
The easiest way to deploy Postiz is using Docker Compose. This guide will walk you through setting up a complete Postiz instance with all required services.Prerequisites
Install Docker
Install Docker Engine and Docker Compose on your system:
Quick Start
The first startup may take a few minutes as Docker downloads all the required images and initializes the databases.
Docker Compose Configuration
Thedocker-compose.yaml file configures all services needed to run Postiz:
Services Overview
Service Descriptions
Main application container running the Postiz frontend and backend
- Image:
ghcr.io/gitroomhq/postiz-app:latest - Port:
4007:5000(host:container) - Volumes:
/config/- Application configuration/uploads/- Media uploads (if using local storage)
PostgreSQL 17 database for persistent data storage
- Image:
postgres:17-alpine - Healthcheck: Ensures database is ready before starting Postiz
- Volume:
postgres-volume:/var/lib/postgresql/data
Redis cache for sessions and temporary data
- Image:
redis:7.2 - Healthcheck: Ensures Redis is responding before starting Postiz
- Volume:
postiz-redis-data:/data
Temporal workflow orchestration engine for background jobs
- Image:
temporalio/auto-setup:1.28.1 - Port:
7233:7233 - Dependencies: temporal-postgresql, temporal-elasticsearch
Environment Variables
The Docker Compose file includes essential environment variables. Here are the key ones:Required Settings
Database Credentials
Persistent Storage
Postiz uses Docker volumes to persist data:Backup Volumes
To backup your data:Port Configuration
By default, Postiz exposes these ports:| Service | Host Port | Container Port | Description |
|---|---|---|---|
| Postiz | 4007 | 5000 | Main application |
| Temporal | 7233 | 7233 | Temporal gRPC |
| Temporal UI | 8080 | 8080 | Temporal web UI |
Changing the Default Port
To run Postiz on a different port (e.g., 8080):Production Deployment
For production deployments, consider these additional configurations:1. Use Environment File
Create a.env file instead of inline environment variables:
2. Configure Reverse Proxy
Use Nginx or Traefik as a reverse proxy:3. Enable SSL/TLS
Update URLs to use HTTPS:4. Set Resource Limits
Managing Services
Start Services
Stop Services
View Logs
Restart Service
Update to Latest Version
Troubleshooting
Container Won’t Start
Check the logs:Database Connection Issues
Verify PostgreSQL is healthy:Port Already in Use
Change the host port indocker-compose.yaml:
Reset Everything
Monitoring
Health Checks
Postiz includes health checks for critical services:Temporal UI
Access the Temporal UI to monitor workflows:Sentry Integration (Optional)
Enable Sentry for error tracking:http://localhost:8969.
Next Steps
Configure Storage
Set up storage configuration for media uploads
Add Social Media OAuth
Configure authentication for social media platforms
Review All Variables
Check the complete environment variables reference