Traditional Server Deployment
Deploy CoAI.Dev on traditional servers with manual compilation and system service configuration
Traditional Server Deployment
Traditional server deployment involves installing CoAI.Dev directly on your server infrastructure without containerization. This approach provides maximum control over the environment and is ideal for organizations with specific compliance requirements or existing infrastructure constraints.
When to Use Traditional Deployment
Choose traditional deployment when you need full control over the runtime environment, have specific compliance requirements, or need to integrate with existing monitoring and management tools.
Overview
Traditional Deployment Benefits:
- 🔧 Full Control: Complete control over the runtime environment
- 🏢 Compliance Ready: Easier to meet specific regulatory requirements
- 📊 Legacy Integration: Works with existing monitoring and backup systems
- ⚡ Performance: Direct hardware access for optimal performance
- 🔒 Security: Custom security configurations and hardening
Best For:
- Enterprise environments with strict compliance requirements
- Existing infrastructure with specific monitoring tools
- High-performance requirements with dedicated hardware
- Organizations preferring traditional system administration
Prerequisites
System Requirements
Minimum Requirements:
- CPU: 4 cores (2.0GHz+)
- RAM: 8GB
- Storage: 50GB available space
- OS: Linux (Ubuntu 20.04+, CentOS 8+, RHEL 8+)
Recommended for Production:
- CPU: 8+ cores (3.0GHz+)
- RAM: 16GB+
- Storage: 100GB+ SSD
- Network: 1Gbps+ connection
Required Software
Core Dependencies:
- Node.js: v18+ and npm/pnpm
- Go: v1.19+
- MySQL: v8.0+
- Redis: v6.0+
- Nginx: v1.18+ (for reverse proxy)
System Tools:
- Git: For source code management
- Systemd: For service management
- SSL Certificate: For HTTPS (Let's Encrypt or commercial)
Installation Process
Install Dependencies
Database Setup
Configure MySQL
Create Database and User:
Configure MySQL Settings (/etc/mysql/mysql.conf.d/mysqld.cnf
):
Restart MySQL:
Build CoAI.Dev
Configuration
Service Configuration
Create Systemd Service
Create /etc/systemd/system/chatnio.service
:
Enable and start service:
Nginx Reverse Proxy
Create /etc/nginx/sites-available/chatnio
:
Enable the configuration:
SSL Certificate Setup
Using Let's Encrypt
Monitoring and Logging
Log Management
Configure logrotate (/etc/logrotate.d/chatnio
):
System Monitoring
Create monitoring script (/usr/local/bin/chatnio-monitor.sh
):
Make executable and add to cron:
Backup and Recovery
Database Backup
Create backup script (/usr/local/bin/backup-chatnio.sh
):
Schedule backups:
Updates and Maintenance
Application Updates
Create update script (/usr/local/bin/update-chatnio.sh
):
Troubleshooting
Common Issues
Service Won't Start:
Database Connection Issues:
Performance Issues:
Security Note
Traditional deployments require careful attention to security. Regularly update all components, monitor logs, and follow security best practices for your operating system and applications.
Traditional server deployment provides maximum control and flexibility, making it ideal for enterprise environments where specific compliance requirements or existing infrastructure constraints make containerized deployments impractical.