GeekAI User ManualGeekAI User Manual
  • Guide

    • Introduction
    • Quick Deployment
    • Advanced Deployment
  • Configuration

    • AI Drawing Configuration
    • Music and Video
    • File Storage Configuration
  • Upgrade

    • Smooth Upgrade
  • Development

    • Development and Build
    • How to Skip License Verification
  • Guide

    • Introduction
    • Deployment
  • Configuration

    • Coze Agent
    • Dify Agent
    • Alibaba Cloud Bailian Agent
  • Upgrade

    • Geek-Agent v1.0.2
    • Geek-Agent v1.0.3
  • GeekAI-PLUS (With Admin Panel)
  • GeekAI-Agent (With Admin Panel)
  • AI Study Notes

    • 01-Basic Concepts of Stable Diffusion
    • 02-Core Technology Decryption of DeepSeek R1
    • 03-DeepSeek R1 User Guide (Continuously Updated)
    • 03-Some Personal Thoughts on AI Agent
    • 04-Understanding MCP and A2A Protocols
  • Tech Community
  • GitHub
  • Gitee
  • GitCode
  • 简体中文
  • en-US
GitHub
  • Guide

    • Introduction
    • Quick Deployment
    • Advanced Deployment
  • Configuration

    • AI Drawing Configuration
    • Music and Video
    • File Storage Configuration
  • Upgrade

    • Smooth Upgrade
  • Development

    • Development and Build
    • How to Skip License Verification
  • Guide

    • Introduction
    • Deployment
  • Configuration

    • Coze Agent
    • Dify Agent
    • Alibaba Cloud Bailian Agent
  • Upgrade

    • Geek-Agent v1.0.2
    • Geek-Agent v1.0.3
  • GeekAI-PLUS (With Admin Panel)
  • GeekAI-Agent (With Admin Panel)
  • AI Study Notes

    • 01-Basic Concepts of Stable Diffusion
    • 02-Core Technology Decryption of DeepSeek R1
    • 03-DeepSeek R1 User Guide (Continuously Updated)
    • 03-Some Personal Thoughts on AI Agent
    • 04-Understanding MCP and A2A Protocols
  • Tech Community
  • GitHub
  • Gitee
  • GitCode
  • 简体中文
  • en-US
GitHub
  • GeekAI-Plus

    • Introduction
    • Quick Deployment
    • Advanced Deployment
    • Windows System Deployment
    • Deploy with Baota
    • Common Errors
  • Configuration

    • API Token Configuration
    • AI Drawing Configuration
    • Music and Video
    • File Storage Configuration
    • Payment Configuration
    • Gitee AI API Integration Guide
    • Other Service Configurations
    • Operational Strategies
  • Upgrade

    • Smooth Upgrade
    • GeekAI-PLUS-v4.1.6
    • GeekAI-PLUS-v4.1.8
    • GeekAI-PLUS-v4.1.9
    • GeekAI-PLUS-v4.2.1
    • GeekAI-PLUS-v4.2.2
    • GeekAI-PLUS-v4.2.3
    • GeekAI-PLUS-v4.2.4
  • Development

    • Development and Build
    • How to Skip License Verification

Guide

Our GeekAI Quick Deployment Tutorial is designed for new installations only, as it will clear all existing data tables. However, if you have already installed GeekAI and only need a smooth upgrade, what should you do? It's simple—just follow these two steps.

1. Upgrade the Database

If there is a database upgrade, we will prepare a update-x.x.x.sql file for each version.

Upgrade Database

You only need to execute the SQL file for the version you are upgrading to.

Non-Container Deployment

First, you need to install the MySQL client (skip this step if already installed):

sudo apt install mysql-client

Connect to the database. By default, our MySQL container maps to port 3307, so you need to pass the --port parameter as 3307. If you changed the port, use your custom port:

mysql -h127.0.0.1 --port 3307 -u username -p password # Connect to the database
use chatgpt_plus
source update-x.x.x.sql # Replace with the version you are upgrading to

Container Deployment

docker exec -i geekai-mysql sh -c 'exec mysql -uroot -p12345678 -D chatgpt_plus' < update-x.x.x.sql

Note:

If you are upgrading across multiple versions, you need to execute the intermediate update SQL files in order. For example, if upgrading from 3.2.0 to 3.2.3, you need to execute update-v3.2.1.sql, update-v3.2.2.sql, and update-v3.2.3.sql in sequence.

2. Upgrade the Image

Modify the docker-compose.yaml file to update the version numbers for geekai-api and geekai-web:

version: '3'
services:
  # mysql
  geekai-mysql:
    image: mysql:8.0.33
    container_name: geekai-mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=12345678
    ports:
      - '3307:3306'
    volumes:
      - ./mysql/conf/my.cnf:/etc/mysql/my.cnf
      - ./mysql/data:/var/lib/mysql
      - ./mysql/logs:/var/log/mysql
      - ./mysql/init.d:/docker-entrypoint-initdb.d/

  # redis
  geekai-redis:
    image: redis:6.0.16
    restart: always
    container_name: geekai-redis
    command: redis-server --requirepass 12345678
    volumes:
      - ./redis/data:/data
    ports:
      - '6380:6379'

  # Backend API
  geekai-api:
    image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-api:v4.0.9-amd64 # Update the version here
    container_name: geekai-api
    restart: always
    depends_on:
      - geekai-mysql
      - geekai-redis
    environment:
      - DEBUG=false
      - LOG_LEVEL=info
      - CONFIG_FILE=config.toml
    ports:
      - '5678:5678'
      - '9999:9999'
    volumes:
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
      - ./conf/config.toml:/var/www/app/config.toml
      - ./logs:/var/www/app/logs
      - ./static:/var/www/app/static

  # Frontend Application
  geekai-web:
    image: registry.cn-shenzhen.aliyuncs.com/geekmaster/geekai-web:v4.0.9-amd64 # Update the version here
    container_name: geekai-web
    restart: always
    depends_on:
      - geekai-api
    ports:
      - '8080:8080'
    volumes:
      - ./logs/nginx:/var/log/nginx
      - ./conf/nginx/conf.d:/etc/nginx/conf.d
      - ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./ssl:/etc/nginx/ssl

3. Add New Configurations

If this upgrade includes new configurations, you also need to modify the conf/config.toml file. You can compare it with the default configuration file deploy/conf/config.toml to identify any new configuration options.

4. Restart the Services

# Stop the services
docker-compose down
# Start the services
docker-compose up -d
Edit this page on GitHub
Next
GeekAI-PLUS-v4.1.6
极客学长 © 2022-2025 版权所有 粤ICP备19122051号-1