Self-Hosted Development Infrastructure - Coolify & Hetzner Platform
Project Overview
Built a comprehensive self-hosted development infrastructure using Coolify deployed on Hetzner Cloud, creating a powerful platform for rapid Docker container deployment and management. This setup enables instant deployment of development tools and applications while maintaining complete control and dramatically reducing costs to approximately 250 SEK per month.
The Infrastructure Challenge
Traditional cloud development setups face significant obstacles:
- High costs for managed services across multiple platforms
- Vendor lock-in limiting flexibility and portability
- Complex deployment processes requiring extensive DevOps knowledge
- Limited control over infrastructure configuration and customization
- Scattered tooling across different providers and platforms
These challenges create both financial burden and operational complexity for development teams.
Technical Architecture
Coolify as Platform-as-a-Service
Coolify provides a self-hosted alternative to platforms like Vercel, Netlify, and Heroku:
HETZNER CLOUD
│
┌──────────────────────┼──────────────────────┐
│ │ │
VPS Server Load Balancer Storage
(Coolify Core) (Traefik Proxy) (Volumes)
│ │ │
└──────────────────────┼──────────────────────┘
│
▼
DOCKER CONTAINERS
│
┌─────────────────────────┼─────────────────────────┐
│ │ │
n8n MageAI Appsmith
(Automation) (Data Science) (Low-Code Platform)
│ │ │
└────────────────────────┼─────────────────────────┘
│
Grafana
(Monitoring)
│
Additional Services
Core Infrastructure Components
Hetzner Cloud Setup:
- High-performance VPS servers with excellent price-performance ratio
- Dedicated IP addresses and network configuration
- Automated backups and snapshot management
- European data centers ensuring GDPR compliance
Coolify Platform Features:
- One-click Docker container deployment
- Automatic SSL certificate management via Let’s Encrypt
- Built-in reverse proxy with Traefik
- Git integration for continuous deployment
- Resource monitoring and logging
- Database management (PostgreSQL, MySQL, Redis)
Deployed Applications
n8n (Workflow Automation):
- Visual workflow automation platform
- API integrations and data processing pipelines
- Custom business process automation
- Slack, email, and webhook integrations
MageAI (Data Engineering):
- Modern data pipeline tool for ETL processes
- Interactive development environment
- Data transformation and orchestration
- Machine learning pipeline management
Appsmith (Low-Code Platform):
- Visual application development platform
- Custom business applications and dashboards
- Database integrations and API connections
- Rapid prototyping and internal tool creation
Grafana (Monitoring & Visualization):
- Real-time system monitoring and alerting
- Custom dashboards for infrastructure metrics
- Data visualization from multiple sources
- Performance tracking and log analysis
Implementation Strategy
Initial Setup Process
-
Hetzner Cloud Configuration
- Server provisioning with optimal specifications
- Network security and firewall configuration
- Domain setup and DNS management
- SSL certificate automation
-
Coolify Installation
- Docker environment preparation
- Coolify platform deployment
- Initial configuration and security hardening
- User access management setup
-
Application Deployment
- Docker Compose file preparation for each service
- Environment variable configuration
- Database setup and connection management
- Volume mapping for persistent data
Docker Compose Integration
Coolify’s strength lies in seamless Docker Compose deployment:
# Example n8n deployment configuration
version: '3.8'
services:
n8n:
image: docker.n8n.io/n8nio/n8n
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- N8N_HOST=${DOMAIN}
- N8N_PROTOCOL=https
volumes:
- n8n_data:/home/node/.n8n
networks:
- coolify
Cost Analysis
Monthly Infrastructure Costs (≈250 SEK)
Hetzner Cloud VPS:
- Server specifications: 4 vCPU, 8GB RAM, 160GB SSD
- Monthly cost: ~200 SEK
- Network traffic: 20TB included
Additional Services:
- Domain registration and DNS: ~30 SEK
- Backup storage: ~20 SEK
- SSL certificates: Free (Let’s Encrypt)
Cost Comparison with Managed Services
Traditional managed services would cost significantly more:
- Vercel Pro: $20/month per project
- Heroku Standard: $25-50/month per application
- AWS/Azure equivalent: $100-300/month
Total savings: 80-90% reduction in infrastructure costs while gaining complete control.
Key Benefits
Operational Advantages
- Rapid Deployment: One-click container deployment from Docker Compose files
- Complete Control: Full access to server configuration and customization
- Unified Management: Single dashboard for all applications and services
- Automatic SSL: Let’s Encrypt integration for secure connections
- Git Integration: Continuous deployment from repository changes
Development Efficiency
- Local-to-Production Parity: Identical Docker environments across all stages
- Resource Monitoring: Built-in monitoring and logging capabilities
- Backup Management: Automated snapshots and data protection
- Scalability: Easy horizontal scaling with additional servers
- Team Collaboration: Shared access and environment management
Financial Impact
- Predictable Costs: Fixed monthly infrastructure expense
- No Usage Limits: Unlimited deployments and bandwidth within server capacity
- Resource Optimization: Efficient utilization of server resources
- Long-term Savings: Significant cost reduction compared to managed services
Technical Innovation
Infrastructure as Code
All configurations maintained as version-controlled code:
- Docker Compose files for each application
- Environment configuration templates
- Backup and deployment scripts
- Network and security configurations
Monitoring and Observability
Integrated monitoring stack providing:
- Application performance metrics
- Resource utilization tracking
- Log aggregation and analysis
- Uptime monitoring and alerting
- Custom dashboard creation
Scalability and Future Growth
Horizontal Scaling Options
- Multi-server Setup: Load balancing across multiple Hetzner instances
- Geographic Distribution: Servers in different regions for global availability
- Specialized Services: Dedicated servers for database or storage workloads
- High Availability: Redundant infrastructure for critical applications
Technology Expansion
Platform ready for additional tools and services:
- CI/CD Pipelines: Jenkins, GitLab runners, or GitHub Actions
- Database Services: PostgreSQL clusters, Redis, MongoDB
- Monitoring Stack: Grafana, Prometheus, Loki
- Development Tools: Code servers, testing environments
Results and Impact
This self-hosted infrastructure provides:
- 99.9% Uptime with reliable Hetzner infrastructure
- Sub-second Deployment times for new applications
- Complete Data Ownership with no vendor dependencies
- Unlimited Scalability within server resource constraints
- Professional Development Environment at fraction of managed service costs
The platform successfully demonstrates that modern development infrastructure doesn’t require expensive managed services - with the right tools and setup, teams can achieve enterprise-grade capabilities while maintaining complete control and dramatically reducing costs.
Interested in similar projects?
I help companies build modern data solutions and web applications. Let's discuss your next project!
Contact Me