Background
TechNova Solutions, a mid-sized web development agency, was struggling with complex and time-consuming deployment processes across multiple client projects.
The Challenge
The team needed a secure, efficient deployment solution that leveraged HestiaCP's SFTP capabilities.
Implementing the Solution
Step 1: Server Setup
- Linode 4GB instance with Ubuntu 20.04
- HestiaCP installed (following official HestiaCP installation guide)
Step 2: HestiaCP SFTP Configuration
Referencing HestiaCP User Management Docs:
- Create dedicated web hosting accounts
- Generate unique SFTP credentials
- Configure specific web directories for each client site
SFTP User Creation Process
# HestiaCP CLI user creation example
v-add-user username email password
v-add-domain username domain.com
Step 3: DeployHQ Integration
Configured SFTP connection based on HestiaCP SFTP Access Guidelines:
Deployment Method: SFTP
Host: server.example.com
Port: 22
Username: hestia_generated_sftp_user
Authentication: Password/Key-based
Remote Path: /home/username/web/example.com/public_html
Step 4: Security Configuration
Following HestiaCP Security Best Practices:
- Implemented SSH key authentication
- Configured firewall rules
- Set up fail2ban for additional protection
Sample SSH Key Setup
# Generate SSH key
ssh-keygen -t rsa -b 4096
# Add key to HestiaCP user
v-add-user-ssh-key username /path/to/public/key
Step 5: Deployment Workflow
DeployHQ configuration:
- Connect a git repository (GitHub, GitLab, Bitbucket, etc)
- Set up SFTP credentials
- Define deployment triggers
- Create deployment scripts
Deployment Script
#!/bin/bash
# DeployHQ SFTP Deployment Script
# Composer dependencies
composer install --no-dev
# Database migrations
php artisan migrate --force
# Clear application cache
php artisan cache:clear
Results
Deployment Metrics
- Deployment time reduced from 10 to 2 minutes
- 99.7% deployment success rate
- 70% reduction in deployment-related issues
Security Enhancements
Leveraging HestiaCP Security Documentation:
- Unique SFTP credentials per project
- Limited user permissions
- Encrypted file transfers
- Isolated deployment environments
Technical Deep Dive
Referencing HestiaCP Advanced Configuration Docs:
- Implemented granular access controls
- Configured multi-site deployments
- Optimized server performance
Conclusion
By combining Linode, HestiaCP's SFTP, and DeployHQ, TechNova Solutions created a robust, secure deployment ecosystem.
Recommended Resources
About the Tools
- Linode: Reliable cloud hosting
- HestiaCP: Secure, open-source control panel
- DeployHQ: Continuous deployment service