POSTARYX

Docker Compose

Install Postiz using Docker Compose

Watch the Tutorial for docker-compose install: https://m.youtube.com/watch?v=A6CjAmJOWvA&t=5s

Warning: Please read this migration guide, on how to upgrade from v2.11.2 to v2.12.0+ for Temporal: https://docs.postiz.com/installation/migration

Docker Compose

This guide assumes that you have Docker installed, with a reasonable amount of resources to run Postiz. This Docker Compose setup has been tested with;

  • Virtual Machine, Ubuntu 24.04, 2Gb RAM, 2 vCPUs.

Installation Prerequisites

This section will ask you to install & configure several services explained below.

Network Requirements

HTTPS / HTTP Requirement

Postiz marks it's login cookies as Secure, this is called "secure context" in modern web browsers.

If you want to use a secure Login Process, you need to set up a Certificate, which can be done via Reverse Proxy like Caddy or Nginx.

If you cannot use a certificate (HTTPS), add the following environment variable to your .env file:

NOT_SECURED=true

Security Warning: Setting NOT_SECURED=true disables secure cookie requirements. This should only be used in development environments or when you fully understand the security implications. Not recommended for production use.

Network Ports

  • 5000/tcp: for a single single entry point for Postiz when running in a container. This is the one port your reverse proxy should talk to.
  • 4200/tcp: for the Frontend service (the web interface). Most users do not need to expose this port publicly.
  • 3000/tcp: for the Backend service (the API). Most users do not need to expose this port publicly.
  • 5432/tcp: for the Postgres container. Most users do not need to expose this port publicly.
  • 6379/tcp: for the Redis container. Most users do not need to expose this port publicly.

If you are using Docker images, we recommend just exposing port 5000 to your external proxy. This will reduce the likelihood of misconfiguration, and make it easier to manage your network.

graph TD;
	A[Your Browser] -->|HTTPS 443/tcp| B[Your Reverse Proxy]
	B -->|HTTP 5000/tcp| C["Internal Proxy (Caddy)"]

	subgraph "Postiz Container"
	C -->|4200/tcp| D[Frontend Service]
	C -->|3000/tcp| E[Backend Service]
    C -->|/api| H[uploads]
	end

	E -->|5432/tcp| F[Postgres Container]
	E -->|6379/tcp| G[Redis Container]

Configuration uses environment variables

The Docker containers for Postiz are entirely configured with environment variables.

  • Option A - environment variables in your docker-compose.yml file
  • Option B - environment variables in a postiz.env file mounted in /config for the Postiz container only
  • Option C - environment variables in a .env file next to your docker-compose.yml file (not recommended).

... or a mixture of the above options!

Installation

Clone the Docker Compose repository

git clone https://github.com/gitroomhq/postiz-docker-compose

Configure your Docker Compose

Configure your Docker Compose variables

Run the docker-compose command

docker compose up

Wait for it to load

  1. Access your frontend at: http://localhost:4007 (unless changed in variables)
  2. Visualize and monitor your workflows with temporal at: http://localhost:8080

There is a configuration reference page with a list of configuration settings.

The docker-compose.yaml file

The full, up-to-date Docker Compose file is maintained in the gitroomhq/postiz-docker-compose repository. Cloning that repository (see the steps above) gives you the docker-compose.yaml together with the dynamicconfig directory that the Temporal service mounts, so there is nothing to copy by hand.

Always pull the file from the repository rather than copying a snapshot. The services, images, and environment variables change between releases, and the repository is the canonical source.

How to use Docker Compose

From the cloned repository directory, run docker compose up to start the services.

Note When you change variables, you must run docker compose down and then docker compose up to recreate these containers with these updated variables.

Look through the logs for startup errors, and if you have problems, check out the support page.

If everything looks good, then you can access the Postiz web interface at https://postiz.your-server.com

Controlling container services

When the environment variable POSTIZ_APPS is not set, or is set to an empty string, all services will be started in a single container. This is normally fine for small, personal deployments.

However, you can only start specific services within the Docker container by changing this environment variable.

If you need to scale, you can experiment with having multiple containers defined like;

  • Frontend only: POSTIZ_APPS="frontend"
  • Backend only: POSTIZ_APPS="backend"
  • Worker and Cron only: POSTIZ_APPS="worker cron"

Next Steps