Skip to main content
Warning: This current Documentation does not work in Coolify. We are working on a fix for this Issue.
1

Create a new project

  • Name: Postiz
  • Select the “production” environment.
2

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` this needs to be exactly the URL you're accessing Postiz on.
      MAIN_URL: "https://postiz.your-server.com"
      FRONTEND_URL: "https://postiz.your-server.com"
      NEXT_PUBLIC_BACKEND_URL: "https://postiz.your-server.com/api"
      JWT_SECRET: "random string that is unique to every install - just type random characters here!"

      # 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.

      # The container images are pre-configured to use /uploads for file storage.
      # You probably should not change this unless you have a really good reason!
      STORAGE_PROVIDER: "local"
      UPLOAD_DIRECTORY: "/uploads"
      NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads"
    volumes:
      - postiz-config:/config/
      - postiz-uploads:/uploads/
    ports:
      - 5000:5000
    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.
3

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.
4

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.