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.
Installation Prerequisites
This section will ask you to install & configure several services exaplained below.
Network Requirements
HTTPS is required (or localhost)
Postiz marks it's login cookies as Secure, which means you must run it either on localhost, or behind HTTPS - this is called a "secure context" in modern web browsers.
If you are not running either HTTPS or on localhost, then you will not be able to login, as your browser will refuse to send the login cookie.
Postiz will not generate your HTTPS certificates for you, and it's servers cannot yet be configured to use a HTTPS certificate. This means you must use a reverse proxy to handle HTTPS. Documentation on popular reverse proxies can be found in the reverse proxies section, and if you've never used a reverse proxy with docker compose before, then caddy is recommended.
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.
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://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.
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
andpostiz-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.