CoAI LogoCoAI.Dev

Baota Panel Deployment

Deploy CoAI.Dev using Baota Panel with one-click installation from the app store

Baota Panel Deployment

Baota Panel (宝塔面板) is a popular Chinese server management panel that provides a graphical interface for server administration. CoAI.Dev offers one-click deployment through Baota Panel's app store, making it easy for Chinese users to deploy and manage their instances.

Requirements

This deployment method requires Baota Panel version 9.2.0 or higher with Docker support.

Overview

Deployment Benefits:

  • 🎯 One-Click Installation: Install directly from Baota Panel app store
  • 🖥️ GUI Management: Visual interface for all configurations
  • 🔧 Integrated Tools: Built-in monitoring, logs, and SSL management
  • 🇨🇳 Chinese-Friendly: Native Chinese language support
  • 📊 Unified Dashboard: Manage CoAI.Dev alongside other applications

Best For:

  • Chinese users familiar with Baota Panel
  • Existing Baota Panel infrastructure
  • Users preferring GUI over command line
  • Small to medium deployments

Prerequisites

System Requirements

Minimum Server Specifications:

  • CPU: 2 cores
  • RAM: 4GB
  • Storage: 10GB available space
  • OS: Linux (CentOS 7+, Ubuntu 18.04+, Debian 9+)

Network Requirements:

  • Bandwidth: 10Mbps+ recommended
  • Ports: 80, 443, and custom app ports
  • Domain: Optional but recommended for production

Install Baota Panel

Download and Install Baota Panel

Install Baota Panel on your server:

For CentOS/RHEL:

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

For Ubuntu/Debian:

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

For Debian:

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh

Access Baota Panel

After installation:

  1. Note the Panel URL: Displayed at the end of installation
  2. Access Panel: Open the URL in your browser
  3. Login: Use the provided username and password
  4. Update Panel: Follow prompts to update to latest version

Install Docker Support

Install Docker Management:

  1. Go to Software StoreSystem Tools
  2. Find and install Docker Manager
  3. Wait for Docker and Docker Compose installation
  4. Verify installation in Docker menu

One-Click Deployment

Install CoAI.Dev

Access App Store

Navigate to CoAI.Dev in the app store:

  1. Login to Baota Panel
  2. Go to App Store: Click Software Store in left menu
  3. Search for CoAI: Use search bar to find "CoAI"
  4. Select CoAI.Dev: Click on the CoAI.Dev application

Configure Deployment

Basic Configuration:

Configure the following settings:

Application Settings:

  • Application Name: chatnio (or custom name)
  • Domain: Your domain name (optional)
  • Port: 8000 (default) or custom port
  • Version: Latest stable version

Advanced Settings (Optional):

  • Memory Limit: Adjust based on server capacity
  • CPU Limit: Set CPU usage limits
  • Environment Variables: Custom configurations
  • Volume Mounts: Custom data persistence paths

Example Configuration:

# Basic settings that will be configured in the GUI
APP_NAME: chatnio
DOMAIN: your-domain.com
PORT: 8000
VERSION: latest
 
# Database settings (handled automatically)
MYSQL_DATABASE: chatnio
REDIS_ENABLED: true

Deploy Application

Start Deployment:

  1. Review Settings: Verify all configuration options
  2. Click Install: Start the deployment process
  3. Wait for Initialization: First deployment may take 1-2 minutes
  4. Monitor Logs: Check deployment logs for any issues

Deployment Process:

  • Downloads CoAI.Dev Docker images
  • Sets up MySQL and Redis databases
  • Configures network and storage
  • Initializes application with default settings

Verify Installation

Check Application Status:

  1. Access Application: Go to your configured domain or http://[server-ip]:[port]
  2. Login: Use default credentials:
    • Username: root
    • Password: chatnio123456
  3. Change Password: Immediately update the default password
  4. Test Functionality: Verify basic features work correctly

Management and Monitoring

Application Management

Using Baota Panel:

Start/Stop/Restart:

  1. Go to DockerContainers
  2. Find your CoAI.Dev containers
  3. Use control buttons for management

View Logs:

  1. Click on container name
  2. Select Logs tab
  3. Monitor real-time application logs

Resource Monitoring:

  1. Go to Monitoring section
  2. View CPU, memory, and network usage
  3. Set up alerts for resource thresholds

Configuration Management

Environment Variables:

# Access through Baota Panel → Docker → Container → Environment
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=chatnio
MYSQL_USER=root
MYSQL_PASSWORD=chatnio123456
REDIS_HOST=localhost
REDIS_PORT=6379
SECRET=your-secret-key
SERVE_STATIC=true

Volume Management:

  • Database: ~/db - MySQL data persistence
  • Redis: ~/redis - Redis data persistence
  • Config: ~/config - Application configuration files
  • Logs: ~/logs - Application logs
  • Storage: ~/storage - File uploads and generated content

SSL Certificate Setup

Using Baota Panel SSL:

Configure Domain

  1. Add Site: Go to WebsitesAdd Site
  2. Enter Domain: Add your domain name
  3. Set Document Root: Point to CoAI.Dev installation
  4. Create Site: Confirm site creation

Install SSL Certificate

Using Let's Encrypt (Free):

  1. Go to SSL Settings: Click SSL tab in site settings
  2. Select Let's Encrypt: Choose free certificate option
  3. Verify Domain: Ensure domain points to your server
  4. Install Certificate: Click apply to install SSL

Using Custom Certificate:

  1. Upload Certificate: Add your SSL certificate files
  2. Configure Private Key: Add corresponding private key
  3. Apply Settings: Save and apply SSL configuration

Configure HTTPS Redirect

Enable Force HTTPS:

  1. Site Settings: Go to your site configuration
  2. SSL Settings: Find redirect options
  3. Enable Redirect: Force HTTP to HTTPS
  4. Test Access: Verify HTTPS works correctly

Updates and Maintenance

Updating CoAI.Dev

Using Baota Panel:

  1. Check for Updates: Go to DockerImages
  2. Pull Latest Image: Update to newest version
  3. Recreate Container: Deploy with new image
  4. Verify Update: Test functionality after update

Manual Update Process:

# Through Baota Panel terminal
docker-compose down
docker-compose pull
docker-compose up -d

Backup and Recovery

Database Backup:

  1. Go to Databases: Access MySQL management
  2. Select CoAI.Dev DB: Choose your database
  3. Export Backup: Create backup file
  4. Store Safely: Keep backups in secure location

Full System Backup:

  1. Backup Volumes: Copy data directories
  2. Export Configuration: Save Docker compose files
  3. Document Settings: Record custom configurations

Troubleshooting

Common Issues:

Application Won't Start:

  • Check Baota Panel Docker service status
  • Verify port availability (not used by other services)
  • Check system resources (RAM, disk space)
  • Review application logs in Docker management

Database Connection Issues:

  • Verify MySQL service is running
  • Check database credentials in environment variables
  • Ensure network connectivity between containers

Performance Issues:

  • Monitor resource usage in Baota Panel
  • Adjust container resource limits
  • Consider upgrading server specifications
  • Enable application caching features

WebSocket Issues:

  • Verify proxy configuration in Baota Panel
  • Check firewall settings for WebSocket ports
  • Ensure proper nginx configuration if using reverse proxy

Security Note

Always change the default password immediately after deployment and regularly update your Baota Panel and CoAI.Dev installations for security.

Baota Panel deployment provides an excellent way to manage CoAI.Dev with a user-friendly interface, making it ideal for users who prefer GUI-based server management over command-line operations.