Postiz logo

Postiz

Social media scheduling tool to manage posts, build an audience, and grow a business

Alternative to: buffer, hypefury


Postiz is a self-hosted social media scheduling and management platform that lets you plan and publish posts across X, Instagram, LinkedIn, Facebook, TikTok, YouTube, Mastodon, Bluesky, Discord, Slack, and more from a single content calendar. It includes AI-assisted content generation, team workspaces, and an analytics dashboard, all deployable with Docker Compose.

Postiz Docker Compose example

Self-host Postiz on your own server, homelab, or VPS starting from this Docker Compose example. It runs Postiz in Docker containers using the official ghcr.io/gitroomhq/postiz-app:latest, postgres:17-alpine, redis:7.2, postgres:16, temporalio/auto-setup:latest images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  postiz:
    image: ghcr.io/gitroomhq/postiz-app:latest
    restart: unless-stopped
    environment:
      # Public URL of this Postiz instance (no trailing slash)
      MAIN_URL: "http://localhost:5000"
      # Public URL of the web frontend (same as MAIN_URL)
      FRONTEND_URL: "http://localhost:5000"
      # Public URL of the backend API (MAIN_URL + /api)
      NEXT_PUBLIC_BACKEND_URL: "http://localhost:5000/api"
      # Secret used to sign login tokens; a long random string unique to this install
      JWT_SECRET: "changeme"
      # PostgreSQL connection string
      DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local"
      # Redis connection string
      REDIS_URL: "redis://postiz-redis:6379"
      # Internal URL the frontend uses to reach the backend inside the container
      BACKEND_INTERNAL_URL: "http://localhost:3000"
      # Temporal server address (workflow engine for scheduled posts)
      TEMPORAL_ADDRESS: "temporal:7233"
      # Self-hosted mode (keep "true")
      IS_GENERAL: "true"
      # Block new sign-ups after the first account is created
      DISABLE_REGISTRATION: "false"
      # Run the scheduled-post cron jobs in this container
      RUN_CRON: "true"
      # Where uploaded media is stored (local or cloudflare)
      STORAGE_PROVIDER: "local"
      # Upload directory inside the container
      UPLOAD_DIRECTORY: "/uploads"
      # Upload directory exposed to the frontend
      NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads"
      # X (Twitter) API key
      X_API_KEY: ""
      # X (Twitter) API secret
      X_API_SECRET: ""
      # LinkedIn OAuth client ID
      LINKEDIN_CLIENT_ID: ""
      # LinkedIn OAuth client secret
      LINKEDIN_CLIENT_SECRET: ""
      # Reddit OAuth client ID
      REDDIT_CLIENT_ID: ""
      # Reddit OAuth client secret
      REDDIT_CLIENT_SECRET: ""
      # GitHub OAuth client ID
      GITHUB_CLIENT_ID: ""
      # GitHub OAuth client secret
      GITHUB_CLIENT_SECRET: ""
      # Threads app ID
      THREADS_APP_ID: ""
      # Threads app secret
      THREADS_APP_SECRET: ""
      # Facebook / Instagram app ID
      FACEBOOK_APP_ID: ""
      # Facebook / Instagram app secret
      FACEBOOK_APP_SECRET: ""
      # YouTube OAuth client ID
      YOUTUBE_CLIENT_ID: ""
      # YouTube OAuth client secret
      YOUTUBE_CLIENT_SECRET: ""
      # TikTok client key
      TIKTOK_CLIENT_ID: ""
      # TikTok client secret
      TIKTOK_CLIENT_SECRET: ""
      # Pinterest app ID
      PINTEREST_CLIENT_ID: ""
      # Pinterest app secret
      PINTEREST_CLIENT_SECRET: ""
      # Discord OAuth client ID
      DISCORD_CLIENT_ID: ""
      # Discord OAuth client secret
      DISCORD_CLIENT_SECRET: ""
      # Discord bot token
      DISCORD_BOT_TOKEN_ID: ""
      # Slack app client ID
      SLACK_ID: ""
      # Slack app client secret
      SLACK_SECRET: ""
      # Slack app signing secret
      SLACK_SIGNING_SECRET: ""
      # Mastodon instance to connect to
      MASTODON_URL: "https://mastodon.social"
      # Mastodon app client ID
      MASTODON_CLIENT_ID: ""
      # Mastodon app client secret
      MASTODON_CLIENT_SECRET: ""
      # OpenAI API key for AI-assisted post writing (optional)
      OPENAI_API_KEY: ""
      # Public API requests allowed per hour
      API_LIMIT: "30"
    volumes:
      - postiz-config:/config/
      - postiz-uploads:/uploads/
    healthcheck:
      test: ["CMD", "node", "-e", "const r=require('http').get('http://localhost:5000/',res=>process.exit(res.statusCode<500?0:1));r.on('error',()=>process.exit(1));r.setTimeout(4000,()=>{r.destroy();process.exit(1)})"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 120s
    depends_on:
      postiz-postgres:
        condition: service_healthy
      postiz-redis:
        condition: service_healthy
      temporal:
        condition: service_healthy

  postiz-postgres:
    image: postgres:17-alpine
    restart: unless-stopped
    environment:
      # Database password (internal only, must match DATABASE_URL)
      POSTGRES_PASSWORD: "postiz-password"
      # Database user (must match DATABASE_URL)
      POSTGRES_USER: "postiz-user"
      # Database name (must match DATABASE_URL)
      POSTGRES_DB: "postiz-db-local"
    volumes:
      - postgres-volume:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postiz-user -d postiz-db-local"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s

  postiz-redis:
    image: redis:7.2
    restart: unless-stopped
    volumes:
      - postiz-redis-data:/data
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping | grep -q PONG"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 5s

  temporal-postgresql:
    image: postgres:16
    restart: unless-stopped
    environment:
      # Temporal database password (internal only)
      POSTGRES_PASSWORD: "temporal"
      # Temporal database user
      POSTGRES_USER: "temporal"
    volumes:
      - temporal-postgres-data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U temporal"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s

  temporal:
    image: temporalio/auto-setup:latest
    restart: unless-stopped
    environment:
      # Temporal persistence driver
      DB: "postgres12"
      # Temporal database port
      DB_PORT: "5432"
      # Temporal database user
      POSTGRES_USER: "temporal"
      # Temporal database password (internal only)
      POSTGRES_PWD: "temporal"
      # Temporal database host
      POSTGRES_SEEDS: "temporal-postgresql"
      # Temporal namespace Postiz uses
      TEMPORAL_NAMESPACE: "default"
    healthcheck:
      test: ["CMD", "temporal", "operator", "cluster", "health", "--address", "temporal:7233"]
      interval: 10s
      timeout: 5s
      retries: 10
      start_period: 30s
    depends_on:
      temporal-postgresql:
        condition: service_healthy

volumes:
  postgres-volume:
  postiz-redis-data:
  postiz-config:
  postiz-uploads:
  temporal-postgres-data:

Values set to changeme are required — replace them with your own values before starting Postiz.

Prefer a managed setup? WinterFlow installs, configures, and updates Postiz for you using this same Docker Compose configuration.