Coolify Self-hosted PaaS
Open-source Heroku/Netlify alternative for deploying applications.
Overview
Coolify is an open-source, self-hosted Platform-as-a-Service (PaaS) that provides an alternative to cloud services like Heroku, Netlify, and Vercel. Developed by Coollabs, it enables developers and organizations to deploy applications, databases, and services on their own infrastructure while maintaining the simplicity of modern PaaS offerings. Coolify supports multiple deployment methods including Git repositories, Docker images, and static sites, with built-in SSL management, monitoring, and scaling capabilities. This deployment creates a complete Coolify instance using three essential services: the main Coolify application server, a PostgreSQL database for storing application metadata and configurations, and Redis for caching and real-time features. The Coolify container handles the web interface, API, and deployment orchestration, while PostgreSQL maintains persistent data about projects, deployments, and user configurations. Redis provides session management, job queuing, and WebSocket support for real-time updates in the dashboard. This stack is ideal for development teams seeking complete control over their deployment pipeline, organizations with compliance requirements that prevent cloud PaaS usage, and infrastructure engineers building internal developer platforms. The combination provides enterprise-grade deployment capabilities while remaining cost-effective compared to managed PaaS solutions, especially for teams managing multiple applications and environments.
Key Features
- Multi-application deployment supporting Node.js, Python, PHP, Go, Rust, and static sites
- Git-based continuous deployment with webhook integration for GitHub, GitLab, and Bitbucket
- Built-in database provisioning for PostgreSQL, MySQL, MongoDB, and Redis instances
- Automatic SSL certificate management with Let's Encrypt integration
- Real-time deployment logs and application monitoring through WebSocket connections
- Docker Compose and Dockerfile support for complex multi-container applications
- Environment variable management with per-branch configuration support
- Team collaboration features with role-based access control and project sharing
Common Use Cases
- 1Development teams replacing Heroku due to pricing changes or feature limitations
- 2Enterprises requiring on-premises application deployment for compliance or security
- 3Startups building multiple microservices needing centralized deployment management
- 4Educational institutions providing students with self-hosted development platforms
- 5DevOps teams creating internal developer platforms for streamlined CI/CD
- 6Agencies managing client applications on dedicated infrastructure
- 7Open-source projects requiring free, scalable hosting without vendor lock-in
Prerequisites
- Minimum 2GB RAM and 10GB disk space for the complete stack
- Docker and Docker Compose installed on the host system
- Access to port 8000 for the web interface and ports 6001-6002 for WebSocket connections
- Domain name and DNS configuration for SSL certificate generation (optional but recommended)
- Understanding of Git workflows and Docker concepts for application deployment
- SSH access to target deployment servers if deploying to remote infrastructure
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 coolify: 3 image: ghcr.io/coollabsio/coolify:latest4 container_name: coolify5 environment: 6 - APP_ID=${APP_ID}7 - APP_KEY=${APP_KEY}8 - APP_NAME=Coolify9 - DB_USERNAME=coolify10 - DB_PASSWORD=${DB_PASSWORD}11 - REDIS_PASSWORD=${REDIS_PASSWORD}12 - PUSHER_APP_ID=${PUSHER_APP_ID}13 - PUSHER_APP_KEY=${PUSHER_APP_KEY}14 - PUSHER_APP_SECRET=${PUSHER_APP_SECRET}15 volumes: 16 - /var/run/docker.sock:/var/run/docker.sock17 - coolify-data:/data/coolify18 ports: 19 - "8000:80"20 - "6001:6001"21 - "6002:6002"22 depends_on: 23 - db24 - redis25 networks: 26 - coolify-network27 restart: unless-stopped2829 db: 30 image: postgres:15-alpine31 container_name: coolify-db32 environment: 33 - POSTGRES_USER=coolify34 - POSTGRES_PASSWORD=${DB_PASSWORD}35 - POSTGRES_DB=coolify36 volumes: 37 - postgres-data:/var/lib/postgresql/data38 networks: 39 - coolify-network40 restart: unless-stopped4142 redis: 43 image: redis:7-alpine44 container_name: coolify-redis45 command: redis-server --requirepass ${REDIS_PASSWORD}46 volumes: 47 - redis-data:/data48 networks: 49 - coolify-network50 restart: unless-stopped5152volumes: 53 coolify-data: 54 postgres-data: 55 redis-data: 5657networks: 58 coolify-network: 59 driver: bridge.env Template
.env
1# Coolify2DB_PASSWORD=secure_coolify_password3REDIS_PASSWORD=secure_redis_password45# Generate with: openssl rand -hex 166APP_ID=random_app_id78# Generate with: openssl rand -base64 329APP_KEY=base64:your_app_key1011# Pusher (for real-time updates)12PUSHER_APP_ID=coolify13PUSHER_APP_KEY=coolify14PUSHER_APP_SECRET=coolify_secretUsage Notes
- 1Web UI at http://localhost:8000
- 2Register first admin account
- 3Deploy apps from Git repos
- 4Supports Docker, static sites, databases
- 5Auto SSL with Let's Encrypt
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
coolify
coolify:
image: ghcr.io/coollabsio/coolify:latest
container_name: coolify
environment:
- APP_ID=${APP_ID}
- APP_KEY=${APP_KEY}
- APP_NAME=Coolify
- DB_USERNAME=coolify
- DB_PASSWORD=${DB_PASSWORD}
- REDIS_PASSWORD=${REDIS_PASSWORD}
- PUSHER_APP_ID=${PUSHER_APP_ID}
- PUSHER_APP_KEY=${PUSHER_APP_KEY}
- PUSHER_APP_SECRET=${PUSHER_APP_SECRET}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- coolify-data:/data/coolify
ports:
- "8000:80"
- "6001:6001"
- "6002:6002"
depends_on:
- db
- redis
networks:
- coolify-network
restart: unless-stopped
db
db:
image: postgres:15-alpine
container_name: coolify-db
environment:
- POSTGRES_USER=coolify
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=coolify
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- coolify-network
restart: unless-stopped
redis
redis:
image: redis:7-alpine
container_name: coolify-redis
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- redis-data:/data
networks:
- coolify-network
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 coolify:5 image: ghcr.io/coollabsio/coolify:latest6 container_name: coolify7 environment:8 - APP_ID=${APP_ID}9 - APP_KEY=${APP_KEY}10 - APP_NAME=Coolify11 - DB_USERNAME=coolify12 - DB_PASSWORD=${DB_PASSWORD}13 - REDIS_PASSWORD=${REDIS_PASSWORD}14 - PUSHER_APP_ID=${PUSHER_APP_ID}15 - PUSHER_APP_KEY=${PUSHER_APP_KEY}16 - PUSHER_APP_SECRET=${PUSHER_APP_SECRET}17 volumes:18 - /var/run/docker.sock:/var/run/docker.sock19 - coolify-data:/data/coolify20 ports:21 - "8000:80"22 - "6001:6001"23 - "6002:6002"24 depends_on:25 - db26 - redis27 networks:28 - coolify-network29 restart: unless-stopped3031 db:32 image: postgres:15-alpine33 container_name: coolify-db34 environment:35 - POSTGRES_USER=coolify36 - POSTGRES_PASSWORD=${DB_PASSWORD}37 - POSTGRES_DB=coolify38 volumes:39 - postgres-data:/var/lib/postgresql/data40 networks:41 - coolify-network42 restart: unless-stopped4344 redis:45 image: redis:7-alpine46 container_name: coolify-redis47 command: redis-server --requirepass ${REDIS_PASSWORD}48 volumes:49 - redis-data:/data50 networks:51 - coolify-network52 restart: unless-stopped5354volumes:55 coolify-data:56 postgres-data:57 redis-data:5859networks:60 coolify-network:61 driver: bridge62EOF6364# 2. Create the .env file65cat > .env << 'EOF'66# Coolify67DB_PASSWORD=secure_coolify_password68REDIS_PASSWORD=secure_redis_password6970# Generate with: openssl rand -hex 1671APP_ID=random_app_id7273# Generate with: openssl rand -base64 3274APP_KEY=base64:your_app_key7576# Pusher (for real-time updates)77PUSHER_APP_ID=coolify78PUSHER_APP_KEY=coolify79PUSHER_APP_SECRET=coolify_secret80EOF8182# 3. Start the services83docker compose up -d8485# 4. View logs86docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/coolify-paas/run | bashTroubleshooting
- Coolify container fails to start with permission errors: Ensure Docker socket has proper permissions with 'sudo chmod 666 /var/run/docker.sock'
- Database connection failed during initial setup: Verify DB_PASSWORD environment variable matches between coolify and db services
- Redis authentication errors in application logs: Check REDIS_PASSWORD is set and consistent across services
- SSL certificate generation fails: Verify domain DNS points to server and port 80/443 are accessible from internet
- Git webhook deployments not triggering: Confirm PUSHER_* environment variables are configured and ports 6001-6002 are accessible
- Out of disk space errors during deployment: Monitor Docker volumes and implement log rotation for coolify-data volume
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
coolifypostgresqlredis
Tags
#paas#deployment#coolify#heroku-alternative#self-hosted
Category
DevOps & CI/CDAd Space
Shortcuts: C CopyF FavoriteD Download