Overview
Coolify is an open-source, self-hostable Platform as a Service (PaaS) that simplifies application deployment. It provides a user-friendly interface for managing Docker-based applications like PhotoFlow.What is Coolify?
Coolify offers:Web Interface
Manage deployments through a clean UI instead of command line
Automatic Deployments
Deploy from Git repos with automatic rebuilds on push
Built-in Monitoring
View logs, resource usage, and health status
Zero Downtime
Rolling updates without service interruption
Backup Management
Scheduled database backups with easy restoration
SSL Certificates
Automatic HTTPS with Let’s Encrypt
Prerequisites
Before deploying with Coolify:- Server with Linux (Ubuntu 22.04+ recommended)
- 2 GB RAM minimum (4 GB recommended)
- 20 GB disk space minimum
- Docker installed (Coolify can install it for you)
- Domain name (optional, for SSL/HTTPS)
- SSH access to your server
Install Coolify
Run Installation Script
Install Coolify with one command:This installs:
- Docker (if not present)
- Docker Compose
- Coolify application
- Required dependencies
Coolify installation takes 5-10 minutes depending on your server speed.
PhotoFlow Coolify Configuration
PhotoFlow includes a Coolify-specific Docker Compose file:docker-compose.coolify.yml
docker-compose.coolify.yml
- Environment variables: Uses
${POSTGRES_PASSWORD}instead of hardcoded values - No port mappings: Coolify handles port exposure
- COOLIFY_URL: Automatically set to your deployment URL
- Defaults: Uses
:-syntax for fallback values
Deploy PhotoFlow to Coolify
Create New Resource
In Coolify dashboard:
- Click ”+ New Resource”
- Select “Docker Compose”
- Choose “From Repository” or “Upload File”
Configure Repository
If deploying from Git:
- Repository:
https://github.com/DomenicWalther/PhotoFlow.git - Branch:
main - Docker Compose file:
docker-compose.coolify.yml
Set Environment Variables
In Coolify’s environment configuration, add:Coolify automatically provides:
COOLIFY_URL- Your app’s public URL
Configure Domain (Optional)
For custom domain:
- Add domain in Coolify settings
- Point DNS A record to your server IP
- Enable “Generate SSL Certificate”
Deploy
Click “Deploy” button.Coolify will:
- Clone the repository
- Build Docker images
- Start containers
- Run database migrations
- Configure networking
Managing PhotoFlow in Coolify
View Logs
Access logs through Coolify UI:- Go to your PhotoFlow application
- Click “Logs” tab
- Select service (app or postgres)
- View real-time logs
Restart Services
- Navigate to your application
- Click “Actions” dropdown
- Select “Restart”
Update PhotoFlow
For automatic updates:- Enable “Auto Deploy” in settings
- Coolify monitors Git repository
- Automatically rebuilds on new commits
- Click “Redeploy” button
- Coolify pulls latest code
- Rebuilds and restarts containers
Database Backups
Coolify can automate backups:- Go to “Backups” section
- Enable automatic backups
- Set schedule (daily, weekly, etc.)
- Choose backup retention period
- Click “Backup Now”
- Download backup file
Environment Variables
Update environment variables:- Go to “Environment” tab
- Edit variables
- Click “Save”
- Redeploy for changes to take effect
Network Configuration
Custom Domain
Set up a custom domain:Add Domain in Coolify
- Application settings → Domains
- Add your domain (e.g.,
photoflow.yourdomain.com)
Internal Network Access
For local network deployment without internet:- Don’t configure a public domain
- Access via server IP:
- Update
VITE_SOCKET_URLmanually in environment variables
Monitoring and Health Checks
Resource Usage
Coolify dashboard shows:- CPU usage
- Memory usage
- Disk space
- Network traffic
Health Checks
Coolify monitors:- Container status
- PostgreSQL health
- Application responsiveness
- Deployment failures
- Service downtime
- Resource limits exceeded
Configure Alerts
- Go to Settings → Notifications
- Add email or webhook
- Choose alert types
- Test notifications
Troubleshooting
Deployment failed
Deployment failed
Check logs for errors:
- View build logs
- Look for:
- Missing environment variables
- Build errors
- Port conflicts
- Fix issues and redeploy
Database connection errors
Database connection errors
Verify:
- Environment variables are set correctly
- PostgreSQL container is healthy
- DATABASE_URL format is correct
- No typos in password
SSL certificate issues
SSL certificate issues
If HTTPS isn’t working:
- Verify DNS is pointing to correct IP
- Wait for DNS propagation (up to 24 hours)
- Check port 80 and 443 are open
- Try regenerating certificate
Can't access from network
Can't access from network
For internal network access:
- Use server IP, not localhost
- Update VITE_SOCKET_URL to server IP
- Ensure firewall allows connections
- Redeploy after environment changes
Coolify vs Manual Docker
| Feature | Coolify | Manual Docker |
|---|---|---|
| Ease of use | ✓ Web UI | Command line |
| Auto updates | ✓ Built-in | Manual |
| SSL/HTTPS | ✓ Automatic | Manual setup |
| Backups | ✓ Scheduled | Manual scripts |
| Monitoring | ✓ Dashboard | External tools |
| Learning curve | Low | Moderate |
| Flexibility | Limited to UI | Full control |
| Resource overhead | Higher | Lower |
Cost Considerations
Coolify itself is free and open-source. Costs:- Server hosting - $5-20/month (VPS providers)
- Domain name - $10-15/year (optional)
- SSL certificate - Free (Let’s Encrypt)
- DigitalOcean
- Linode/Akamai
- Hetzner
- Vultr
Best Practices
Secure Passwords
Use strong, unique passwords for:
- Coolify admin
- PostgreSQL database
- Server SSH access
Regular Backups
Enable automated backups:
- Daily database backups
- Store off-server
- Test restoration
Monitor Resources
Check regularly:
- Disk space usage
- Memory consumption
- CPU load
Update Strategy
Keep software current:
- Enable auto-deploy
- Test in staging first
- Review changelogs
Advanced Configuration
Custom Build Arguments
Add build arguments in Coolify:Multiple Environments
Deploy staging and production:- Create two applications in Coolify
- Use different branches:
- Production:
main - Staging:
develop
- Production:
- Use different environment variables
Scaling
Coolify supports scaling:- Go to application settings
- Adjust replica count
- Coolify manages load balancing
For PhotoFlow, ensure Socket.io is configured for multiple instances (requires sticky sessions or Redis adapter).
Migration from Manual Docker
Moving existing deployment to Coolify:Next Steps
Production Checklist
Ensure your deployment is production-ready
Network Setup
Configure multi-PC network access
Environment Variables
Learn about all configuration options
Docker Deployment
Alternative: Manual Docker deployment