Coolify
Coolify is an open-source, self-hostable alternative to Heroku, Netlify, and Vercel. It lets you deploy static sites, APIs, databases, and services to your own servers with Git push integration, automatic SSL via Let's Encrypt, and a beautiful dashboard. This stack includes the Coolify application server, PostgreSQL 15 for persistent storage, Redis 7 for caching and session management, and Soketi as a real-time WebSocket server for live updates. All services run on an isolated bridge network with health checks and restart policies. After deployment, access the web UI on port 8000 to create your admin account and start deploying applications.
Included Services
coolify
ghcr.io/coollabsio/coolify:latest
Environment Variables:
postgres
postgres:15-alpine
Environment Variables:
redis
redis:7-alpine
soketi
quay.io/soketi/soketi:1.6-16-debian
Environment Variables:
Generated YAML
# Generated by ComposeHub (composehub.dev)
name: coolify
services:
coolify:
image: ghcr.io/coollabsio/coolify:latest
restart: always
ports:
- 8000:80
volumes:
- /data/coolify/source/.env:/var/www/html/.env
- /data/coolify/ssh:/var/www/html/storage/app/ssh
- /data/coolify/applications:/var/www/html/storage/app/applications
- /data/coolify/databases:/var/www/html/storage/app/databases
- /data/coolify/services:/var/www/html/storage/app/services
- /data/coolify/backups:/var/www/html/storage/app/backups
- /var/run/docker.sock:/var/run/docker.sock
environment:
APP_ENV: production
APP_KEY: ${APP_KEY:-base64:generatemewith-php-artisan-key-generate}
APP_URL: ${APP_URL:-http://localhost:8000}
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: "5432"
DB_DATABASE: ${DB_DATABASE:-coolify}
DB_USERNAME: ${DB_USERNAME:-coolify}
DB_PASSWORD: ${DB_PASSWORD:-changeme}
REDIS_HOST: redis
REDIS_PORT: "6379"
REDIS_PASSWORD: ${REDIS_PASSWORD:-changeme}
PUSHER_APP_ID: ${PUSHER_APP_ID:-coolify}
PUSHER_APP_KEY: ${PUSHER_APP_KEY:-coolify-key}
PUSHER_APP_SECRET: ${PUSHER_APP_SECRET:-coolify-secret}
PUSHER_HOST: soketi
PUSHER_PORT: "6001"
networks:
- coolify
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
soketi:
condition: service_started
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost || exit 1
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: "2.00"
memory: 1024M
reservations:
cpus: "0.50"
memory: 256M
labels:
com.composehub.description: Coolify application server โ self-hosted PaaS
postgres:
image: postgres:15-alpine
restart: always
volumes:
- coolify_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DB_DATABASE:-coolify}
POSTGRES_USER: ${DB_USERNAME:-coolify}
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
networks:
- coolify
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${DB_USERNAME:-coolify} -d ${DB_DATABASE:-coolify}
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "1.00"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M
labels:
com.composehub.description: PostgreSQL 15 database for Coolify
redis:
image: redis:7-alpine
restart: always
command:
- redis-server
- "--requirepass"
- ${REDIS_PASSWORD:-changeme}
- "--save"
- "20"
- "1"
- "--loglevel"
- warning
- "--maxmemory"
- 256mb
- "--maxmemory-policy"
- allkeys-lru
volumes:
- coolify_redis:/data
networks:
- coolify
healthcheck:
test:
- CMD-SHELL
- redis-cli -a ${REDIS_PASSWORD:-changeme} ping | grep PONG
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
deploy:
resources:
limits:
cpus: "0.50"
memory: 320M
reservations:
cpus: "0.10"
memory: 64M
labels:
com.composehub.description: Redis 7 cache and session store for Coolify
soketi:
image: quay.io/soketi/soketi:1.6-16-debian
restart: always
ports:
- 6001:6001
- 6002:6002
environment:
SOKETI_DEBUG: ${SOKETI_DEBUG:-false}
SOKETI_DEFAULT_APP_ID: ${PUSHER_APP_ID:-coolify}
SOKETI_DEFAULT_APP_KEY: ${PUSHER_APP_KEY:-coolify-key}
SOKETI_DEFAULT_APP_SECRET: ${PUSHER_APP_SECRET:-coolify-secret}
SOKETI_DEFAULT_APP_ENABLE_CLIENT_MESSAGES: "true"
SOKETI_METRICS_SERVER_PORT: "6002"
networks:
- coolify
healthcheck:
test:
- CMD-SHELL
- wget --no-verbose --tries=1 --spider http://localhost:6001 || exit 1
interval: 15s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: "0.50"
memory: 256M
reservations:
cpus: "0.10"
memory: 64M
labels:
com.composehub.description: Soketi WebSocket server for real-time updates
networks:
coolify:
driver: bridge
volumes:
coolify_db:
driver: local
coolify_redis:
driver: local
Quick Info
- Services
- 4
- Networks
- 1
- Volumes
- 2
When to Use
This template is ideal for setting up a coolify environment. All services are pre-configured with healthchecks, resource limits, and sensible defaults. Customize environment variables before deploying to production.
Tips
- Change all default passwords before deploying
- Review resource limits for your hardware
- Add a reverse proxy for production HTTPS
- Configure backup strategies for data volumes