Installation
Coolify

NOTE: This page is marked "earlydoc", or "early documentation", which means it might be brief, or contain information about parts of the app that are under heavy development. If you encounter issues with instructions found here, please check out the support page for options.

Create a new project

  • Name: Postiz
  • Select the "production" environment.

Add Postiz as a "Docker Compose" resource.

Copy the Coolify docker-compose file here - and be careful to read the comments about variables you must change!;

services:
  postiz:
    image: ghcr.io/gitroomhq/postiz-app:latest
    container_name: postiz
    restart: always
    environment:
      # You must change these. `yourServerAddress` is what your web browser uses.
      MAIN_URL: "https://yourServerAddress:4200"
      FRONTEND_URL: "https://yourServerAddress:4200"
      NEXT_PUBLIC_BACKEND_URL: "https://yourServerAddress:3000"
      JWT_SECRET: "random string that is unique to every install - just type random characters here!"
 
      # These are totally fake values, you must change them with your own Cloudflare settings.
      CLOUDFLARE_ACCOUNT_ID: "QhcMSXQyPuMCRpSQcSYdEuTYgHeCXHbu"
      CLOUDFLARE_ACCESS_KEY: "dcfCMSuFEeCNfvByUureMZEfxWJmDqZe"
      CLOUDFLARE_SECRET_ACCESS_KEY: "zTTMXBmtyLPwHEdpACGHgDgzRTNpTJewiNriLnUS"
      CLOUDFLARE_BUCKETNAME: "postiz"
      CLOUDFLARE_BUCKET_URL: "https://QhcMSXQyPuMCRpSQcSYdEuTYgHeCXHbu.r2.cloudflarestorage.com/"
      CLOUDFLARE_REGION: "auto"
 
      # These defaults are probably fine, but if you change your user/password, update it in the 
      # postiz-postgres or postiz-redis services below.
      DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local"
      REDIS_URL: "redis://postiz-redis:6379"
      BACKEND_INTERNAL_URL: "http://localhost:3000/"
      IS_GENERAL: "true" # Required for self-hosting.
    volumes:
      - postiz-config:/config/
    ports:
      - 4200:4200
      - 3000:3000
    networks:
      - postiz-network
    labels:
      - "traefik.enable=true"
      - "traefik.https.routers.<unique_router_name>.rule=Host(`coolify.io`) && PathPrefix(`/`)"
      - "traefik.https.routers.<unique_router_name>.entryPoints=https"
    depends_on:
      postiz-postgres:
        condition: service_healthy
      postiz-redis:
        condition: service_healthy
 
  postiz-postgres:
    image: postgres:14.5
    container_name: postiz-postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: postiz-password
      POSTGRES_USER: postiz-user
      POSTGRES_DB: postiz-db-local
    volumes:
      - postgres-volume:/var/lib/postgresql/data
    ports:
      - 5432:5432
    networks:
      - postiz-network
    healthcheck:
      test: pg_isready -U postiz-user -d postiz-db-local
      interval: 10s
      timeout: 3s
      retries: 3
  postiz-redis:
    image: redis:7.2
    container_name: postiz-redis
    restart: always
    ports:
      - 6379:6379
    healthcheck:
      test: redis-cli ping
      interval: 10s
      timeout: 3s
      retries: 3
    volumes:
      - postiz-redis-data:/data
    networks:
      - postiz-network
 
 
volumes:
  postgres-volume:
    external: false
 
  postiz-redis-data:
    external: false
 
  postiz-config:
    external: false
 
networks:
  postiz-network:
    external: false

Save the configuration.

Check the configuration

  • In the "Service Stack" tab;
  • Suggest changing the "Service Name" to just "postiz" for clarity.
  • Click the "Connect to Predefined Network" tab.
  • Check that 3 services are defined - postiz, postiz-postgres and postiz-redis.
  • In the "Storages" tab, check that the 3 related volumes are created.

Start the deployment

Postiz is approximately 2.5Gb and several container layers, it will take some time to download, be patient. You should see "Downloading" and "Extracting" messages. The Postiz dependencies are almost 200k files, and this can take a while.

Hopefully you will see a message like Container postiz-dssc8gc880s88cg08cck884s Started. in the logs. Once you see this message, close the startup logs view.

Check that the services are running in the "Service Stack" tab, and make sure they are not constantly restarting, or failing to start.