├── .gitignore ├── README.md ├── deploy.sh ├── docker-compose.yml └── quick-install.sh /.gitignore: -------------------------------------------------------------------------------- 1 | /data/ 2 | /upload/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ChatGPT Share Max - 优雅、多功能的AI服务聚合平台 2 | ## 联系方式 3 | ![](https://raw.githubusercontent.com/1198722360/picture/main/20251009051633332.png) 4 | 5 | ## 部署要求 6 | - 熟悉chatgpt-share-server等镜像服务的使用方法 7 | - 2c2g以上的服务器 8 | 9 | ## 快速预览 10 | https://demo.xxsxx.fun 11 | ![](https://raw.githubusercontent.com/1198722360/picture/main/20251009051536971.png) 12 | 13 | ## 功能 14 | - [x] ChatGPT镜像 (@xyhelper) 15 | - [x] Claude镜像 (@lyy0709) 16 | - [x] Grok镜像 (@lyy0709) 17 | - [x] 在线支付(当面付、易支付),各种权限任意搭配,灵活定价 18 | - [x] 激活码 19 | - [x] 优惠券 20 | - [x] 邀请返利 21 | - [x] 站内公告 22 | - [x] 镜像内部接入API 23 | - [x] 虚拟车队 24 | - [ ] Codex 25 | - [ ] Claude Code 26 | - [ ] Grok Code 27 | - [ ] Gemini Code 28 | - [ ] 邮件推送(会员临期、站内优惠...) 29 | - [ ] ...... 30 | 31 | ## 新机快速部署 32 | ``` 33 | wget https://raw.githubusercontent.com/1198722360/chatgpt-share-max/refs/heads/main/quick-install.sh && bash quick-install.sh 34 | ``` 35 | 36 | ## 访问地址 37 | http://ip:6777/list 38 | 39 | ## 管理员账号 40 | admin 41 | 42 | 123456 43 | 44 | 45 | 46 | 47 | ------------ 48 | 49 | 50 | 51 | 52 | 53 | ## 进阶 54 | ### Claude 55 | ``` 56 | cd ~ 57 | # 拉取修改配置文件后的ddclaude 58 | git clone https://github.com/1198722360/ddclaude-share-server-deploy.git 59 | cd ddclaude-share-server-deploy 60 | chmod +x ./deploy.sh 61 | # 部署ddclaude 62 | ./deploy.sh 63 | ``` 64 | 65 | ### Grok 66 | ``` 67 | cd ~ 68 | # 拉取修改配置文件后的grok-share-server 69 | git clone https://github.com/1198722360/grok-share-server-deploy.git 70 | cd grok-share-server-deploy 71 | chmod +x ./deploy.sh 72 | # 部署grok-share-server 73 | ./deploy.sh 74 | ``` 75 | 76 | ## 反向代理 77 | ### Caddy 78 | ``` 79 | # 粘贴到/etc/caddy/Caddyfile 80 | demo.xxsxx.fun { 81 | reverse_proxy /max-login 127.0.0.1:6777 82 | reverse_proxy /max-register 127.0.0.1:6777 83 | reverse_proxy /list 127.0.0.1:6777 84 | reverse_proxy /list/chatgpt 127.0.0.1:6777 85 | reverse_proxy /list/claude 127.0.0.1:6777 86 | reverse_proxy /list/grok 127.0.0.1:6777 87 | reverse_proxy /codex 127.0.0.1:6777 88 | reverse_proxy /claude-code 127.0.0.1:6777 89 | reverse_proxy /grok-code 127.0.0.1:6777 90 | reverse_proxy /gemini-code 127.0.0.1:6777 91 | reverse_proxy /mall 127.0.0.1:6777 92 | reverse_proxy /docs 127.0.0.1:6777 93 | reverse_proxy /contact 127.0.0.1:6777 94 | reverse_proxy /profile 127.0.0.1:6777 95 | reverse_proxy /max-admin* 127.0.0.1:6777 96 | reverse_proxy /job* 127.0.0.1:6777 97 | 98 | # 嵌入API 99 | reverse_proxy /backend-api/models 127.0.0.1:6777 100 | reverse_proxy /backend-api/f/conversation 127.0.0.1:6777 101 | 102 | # 其余转给share 103 | reverse_proxy 127.0.0.1:8300 104 | } 105 | 106 | demo-claude.chatgpt-share-max.com { 107 | reverse_proxy 127.0.0.1:8400 108 | } 109 | 110 | demo-grok.chatgpt-share-max.com { 111 | reverse_proxy 127.0.0.1:8500 112 | } 113 | ``` 114 | 115 | 116 | ## 致谢 117 | https://github.com/xyhelper/chatgpt-share-server-deploy 118 | 119 | https://github.com/lyy0709/ddclaude-share-server-deploy 120 | 121 | https://github.com/lyy0709/grok-share-server-deploy -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | docker compose pull 6 | docker compose up -d --remove-orphans 7 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | max-mysql: 5 | container_name: max-mysql 6 | image: mysql:8 7 | command: --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --binlog-expire-logs-seconds=259200 8 | restart: always 9 | volumes: 10 | - ./data/mysql/:/var/lib/mysql/ 11 | ports: 12 | - 33366:3306 13 | environment: 14 | TZ: Asia/Shanghai 15 | MYSQL_ROOT_PASSWORD: "123456" 16 | MYSQL_DATABASE: "max" 17 | MYSQL_USER: "max" 18 | MYSQL_PASSWORD: "123456" 19 | 20 | chatgpt-share-max: 21 | container_name: chatgpt-share-max 22 | image: wxyin/chatgpt-share-max:latest 23 | environment: 24 | TZ: Asia/Shanghai # 指定时区 25 | MAX_DATABASE_URL: jdbc:mysql://max-mysql:3306/max 26 | MAX_DATABASE_USERNAME: root 27 | MAX_DATABASE_PASSWORD: 123456 28 | ports: 29 | - "6777:6777" 30 | volumes: 31 | - ./upload:/app/upload 32 | restart: always 33 | 34 | networks: 35 | default: 36 | external: true 37 | name: max -------------------------------------------------------------------------------- /quick-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd ~ 3 | git clone https://github.com/xyhelper/chatgpt-share-server-deploy.git 4 | git clone https://github.com/1198722360/chatgpt-share-max.git 5 | 6 | 7 | echo "version: '3.8' 8 | services: 9 | mysql-chatgpt: 10 | image: mysql:8 11 | command: --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci 12 | restart: always 13 | volumes: 14 | - ./data/mysql/:/var/lib/mysql/ 15 | - ./docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/ 16 | environment: 17 | TZ: Asia/Shanghai # 指定时区 18 | MYSQL_ROOT_PASSWORD: "123456" # 配置root用户密码 19 | MYSQL_DATABASE: "cool" # 业务库名 20 | MYSQL_USER: "cool" # 业务库用户名 21 | MYSQL_PASSWORD: "123123" # 业务库密码 22 | redis-chatgpt: 23 | image: redis 24 | # command: --requirepass "12345678" # redis库密码,不需要密码注释本行 25 | restart: always 26 | environment: 27 | TZ: Asia/Shanghai # 指定时区 28 | volumes: 29 | - ./data/redis/:/data/ 30 | chatgpt-share-server: 31 | image: xyhelper/chatgpt-share-server:latest 32 | restart: always 33 | ports: 34 | - 8300:8001 35 | environment: 36 | TZ: Asia/Shanghai # 指定时区 37 | # 接入网关地址 38 | CHATPROXY: "https://123.xyhelper-gateway.com" 39 | # 接入网关的authkey 40 | AUTHKEY: "xyhelper" 41 | # 内容审核及速率限制 42 | AUDIT_LIMIT_URL: "http://chatgpt-share-max:6777/job/audit_limit" 43 | OAUTH_URL: "http://chatgpt-share-max:6777/job/chatgpt/oauth" 44 | volumes: 45 | - ./config.yaml:/app/config.yaml 46 | - ./data/chatgpt-share-server/:/app/data/ 47 | labels: 48 | - "com.centurylinklabs.watchtower.scope=xyhelper-chatgpt-share-server" 49 | auditlimit: 50 | image: xyhelper/auditlimit 51 | restart: always 52 | # ports: 53 | # - 9611:8080 54 | environment: 55 | LIMIT: 40 # 限制每个userToken允许的次数 56 | PER: "3h" # 限制周期 1s, 1m, 1h, 1d, 1w, 1y 57 | labels: 58 | - "com.centurylinklabs.watchtower.scope=xyhelper-chatgpt-share-server" 59 | watchtower: 60 | image: containrrr/watchtower 61 | volumes: 62 | - /var/run/docker.sock:/var/run/docker.sock 63 | command: --scope xyhelper-chatgpt-share-server --cleanup 64 | restart: always 65 | environment: 66 | - TZ=Asia/Shanghai 67 | labels: 68 | - "com.centurylinklabs.watchtower.scope=xyhelper-chatgpt-share-server" 69 | 70 | networks: 71 | default: 72 | name: max 73 | driver: bridge" > ~/chatgpt-share-server-deploy/docker-compose.yml 74 | 75 | echo "database: 76 | default: # 数据源名称,当不指定数据源时 default 为默认数据源 77 | type: "mysql" # 数据库类型 78 | host: "mysql-chatgpt" # 数据库地址 79 | port: "3306" # 数据库端口 80 | user: "root" # 数据库用户名 81 | pass: "123456" # 数据库密码 82 | name: "cool" # 数据库名称 83 | charset: "utf8mb4" # 数据库编码 84 | timezone: "Asia/Shanghai" # 数据库时区 85 | # debug: true # 是否开启调试模式,开启后会打印SQL日志 86 | createdAt: "createTime" # 创建时间字段 87 | updatedAt: "updateTime" # 更新时间字段 88 | 89 | redis: 90 | cool: 91 | address: "redis-chatgpt:6379" 92 | db: 0 93 | 94 | 95 | cool: 96 | autoMigrate: true 97 | eps: true 98 | file: 99 | mode: "local" 100 | domain: "http://127.0.0.1:8300" 101 | 102 | modules: 103 | base: 104 | jwt: 105 | sso: false 106 | secret: "chatgpt-share-server" 107 | token: 108 | expire: 7200 # 2*3600 109 | refreshExpire: 1296000 # 24*3600*15 110 | middleware: 111 | authority: 112 | enable: 1 113 | log: 114 | enable: 1" > ~/chatgpt-share-server-deploy/config.yaml 115 | 116 | cd ~/chatgpt-share-server-deploy 117 | ./deploy.sh 118 | 119 | cd ~/chatgpt-share-max 120 | chmod +x ./deploy.sh 121 | ./deploy.sh 122 | --------------------------------------------------------------------------------