This guide covers multiple installation methods for self-hosted Postiz deployments, from quick Docker Compose setups to production-ready configurations with security hardening and Ansible automation.
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores | 4+ cores |
| RAM | 4 GB | 8+ GB |
| Storage | 10 GB | 50+ GB SSD |
| OS | Debian 11, Ubuntu 20.04 | Debian 12, Ubuntu 24.04, RHEL 9+ |
For Docker Deployment:
For Manual Installation:
postiz.example.com)The fastest way to get Postiz running for testing or personal use.
Install Git to clone the project repository.
Debian/Ubuntu:
sudo apt-get update && sudo apt-get install -y git
RHEL/CentOS:
sudo dnf install -y git
Download the Postiz source code.
git clone https://github.com/gitroomhq/postiz-app postiz
cd postiz
Create a .env file with basic configuration.
cp .env.example .env
nano .env
Minimum required variables:
APP_ENV=production
APP_URL=https://postiz.example.com
POSTGRES_USER=postiz
POSTGRES_PASSWORD=your-secure-password-here
POSTGRES_DB=postiz
JWT_SECRET=your-random-secret-minimum-32-chars
Launch Postiz with Docker Compose.
docker compose up -d
Check container status and logs.
docker compose ps
docker compose logs -f app
Open your browser and navigate to:
https://postiz.example.com
Default admin account: Created on first login via registration.
For custom deployments or environments without Docker.
Debian/Ubuntu:
sudo apt-get update
sudo apt-get install -y nodejs npm postgresql postgresql-contrib redis-server git curl
Install Node.js 20.x (if not available in repos):
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
Install pnpm:
curl -fsSL https://get.pnpm.io/v6.js | node - add --global pnpm
RHEL/CentOS:
sudo dnf install -y nodejs postgresql postgresql-server redis git curl
sudo dnf module enable -y nodejs:20
git clone https://github.com/gitroomhq/postiz-app postiz
cd postiz
pnpm install
Create PostgreSQL database:
sudo -u postgres psql
CREATE DATABASE postiz;
CREATE USER postiz WITH PASSWORD 'your-secure-password';
GRANT ALL PRIVILEGES ON DATABASE postiz TO postiz;
\q
cp .env.example .env
nano .env
Configure database connection:
DATABASE_URL=postgresql://postiz:your-secure-password@localhost:5432/postiz
REDIS_URL=redis://localhost:6379
APP_ENV=production
APP_URL=https://postiz.example.com
JWT_SECRET=your-random-secret-minimum-32-chars
pnpm prisma migrate deploy
pnpm prisma generate
pnpm build
Create a systemd service file:
sudo nano /etc/systemd/system/postiz.service
[Unit]
Description=Postiz Social Media Scheduler
After=network.target postgresql.service redis.service
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/postiz
Environment=NODE_ENV=production
ExecStart=/usr/bin/pnpm start
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable postiz
sudo systemctl start postiz
sudo systemctl status postiz
Nginx configuration example:
sudo nano /etc/nginx/sites-available/postiz
server {
listen 80;
server_name postiz.example.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable site and obtain TLS certificate:
sudo ln -s /etc/nginx/sites-available/postiz /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
sudo certbot --nginx -d postiz.example.com
For production environments with security hardening and high availability.
Create a production-optimized docker-compose.prod.yml:
services:
app:
image: ghcr.io/gitroomhq/postiz-app:latest
container_name: postiz-app
restart: unless-stopped
environment:
- NODE_ENV=production
- APP_URL=https://postiz.example.com
- DATABASE_URL=postgresql://postiz:${POSTGRES_PASSWORD}@postgres:5432/postiz
- REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379
- JWT_SECRET=${JWT_SECRET}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- postiz-network
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
cap_drop:
- ALL
user: "1000:1000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
postgres:
image: postgres:15-alpine
container_name: postiz-postgres
restart: unless-stopped
environment:
- POSTGRES_USER=postiz
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=postiz
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- postiz-network
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postiz"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: postiz-redis
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis_data:/data
networks:
- postiz-network
security_opt:
- no-new-privileges:true
read_only: true
cap_drop:
- ALL
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
worker:
image: ghcr.io/gitroomhq/postiz-app:latest
container_name: postiz-worker
restart: unless-stopped
command: ["node", "dist/apps/workers/main.js"]
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://postiz:${POSTGRES_PASSWORD}@postgres:5432/postiz
- REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- postiz-network
security_opt:
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp
cap_drop:
- ALL
user: "1000:1000"
networks:
postiz-network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
volumes:
postgres_data:
driver: local
redis_data:
driver: local
Environment file (.env):
# Security - Generate strong random passwords
POSTGRES_PASSWORD=openssl rand -base64 32
REDIS_PASSWORD=openssl rand -base64 32
JWT_SECRET=openssl rand -base64 48
# Application
APP_URL=https://postiz.example.com
NODE_ENV=production
# Email (for notifications)
RESEND_API_KEY=your-resend-api-key
FROM_EMAIL=noreply@example.com
Deploy:
docker compose -f docker-compose.prod.yml up -d
Automate Postiz deployment across multiple servers.
See Postiz Ansible Setup for a complete playbook with:
Quick example:
ansible-playbook -i inventory.ini postiz-deploy.yml
Create Admin Account
Connect Social Accounts
Configure Email Notifications
Set Up First Content Calendar
Check container health:
docker compose ps
docker compose top
docker compose stats
View logs:
docker compose logs -f app
docker compose logs -f worker
docker compose logs -f postgres
Monitor database:
docker compose exec postgres psql -U postiz -d postiz -c "SELECT version();"
Container fails to start:
docker compose logs app
docker compose down && docker compose up -d
Database connection errors:
docker compose exec postgres pg_isready
docker compose logs postgres
Redis connection issues:
docker compose exec redis redis-cli ping
docker compose logs redis
Permission errors:
sudo chown -R 1000:1000 /path/to/postiz/data
Memory issues:
docker compose exec app node --max-old-space-size=4096
Complete reset (WARNING: Deletes all data):
docker compose down -v
rm -rf .env
# Reconfigure from scratch
Any questions?
Feel free to contact us. Find all contact information on our contact page.