# 《Ai Agent》第3-21节:在云服务器部署上线
作者:小傅哥
博客:https://bugstack.cn (opens new window)
视频:https://t.zsxq.com/wfgDS (opens new window)
沉淀、分享、成长,让自己和他人都能有所收获!😄
# 一、本章诉求
在云服务器(2c4g)部署 Ai Agent 前端页面(html)、管理页面(react)、后端服务(java)、基础环境(MySql、PG向量库)。
# 二、部署过程
如图,为本次的部署过程

- 推荐2c4g云服务器购买,http://618.gaga.plus/ (opens new window) 选个便宜的购买就可以。
- 本次会进行本地构建镜像,之后 push 到阿里云私有个人镜像库(免费的可以申请)。这个可以代替 Docker Hub 作为代理使用。教程;https://t.zsxq.com/XdoWr (opens new window)
- 云服务器部署教程:https://t.zsxq.com/19osWS4qj (opens new window) - 需要云服务器安装 Docker、Portainer,以及配置镜像地址 https://t.zsxq.com/2DGGY (opens new window)
- 记得在云服务器安全组开放端口 9000(Portainer)、8099(服务端)、3002(管理端)、8899(mysql管理端) 等你需要对外的端口。