返回列表 发布新帖
查看: 1|回复: 0

Ai中转站

202

主题

0

回帖

608

积分

高级会员

积分
608
发表于 昨天 14:25 | 查看全部 |阅读模式
服务器要求
系统:Ubuntu 22.04 或 Ubuntu 20.04(64 位)
配置:最低 1 核 2G,建议 2 核 2G 或以上
硬盘:至少 40G
网络:有公网 IP
权限:能用 root,或有 sudo 权限
# 1. 更新系统
apt update && apt upgrade -y

# 2. 常用工具
apt install -y curl wget ca-certificates gnupg lsb-release git nano ufw openssl

# 3. 安装 Docker
install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

chmod a+r /etc/apt/keyrings/docker.gpg

echo “deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable“ > /etc/apt/sources.list.d/docker.list

apt update

apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

systemctl enable --now docker

docker --version

# 4. 放行端口(云安全组也要开 22 和 3000)
ufw allow 22/tcp
ufw allow 3000/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw --force enable

# 5. 目录 + 密钥
mkdir -p /opt/new-api/data /opt/new-api/logs

cd /opt/new-api

openssl rand -hex 32 > /opt/new-api/SESSION_SECRET.txt

chmod 600 /opt/new-api/SESSION_SECRET.txt

# 6. 启动 New API
docker rm -f new-api 2>/dev/null || true
docker run -d \
--name new-api \
--restart always \
-p 3000:3000 \
-e TZ=Asia/Shanghai \
-e SESSION_SECRET=“$(cat /opt/new-api/SESSION_SECRET.txt)“ \
-v /opt/new-api/data:/data \
-v /opt/new-api/logs:/app/logs \
calciumion/new-api:latest

公益自营中转站
http://ipv4.1314mi.top:3000

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright © 2001-2026 52线报网 版权所有 All Rights Reserved. |网站地图 闽ICP备19006036号-4
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表