Documentation renewed! For old docs, visit doc.newapi.pro
New APINew API
User GuideInstallationAPI ReferenceAI ApplicationsHelp & SupportBusiness Cooperation

Docker Deployment

This document provides detailed steps for deploying New API using Docker.

Highly Recommended

We highly recommend using the Docker Compose installation method instead of manually starting Docker containers. The Docker Compose method offers better configuration management, service orchestration, and deployment experience.

Basic Requirements

  • Docker environment installed
  • Port: Default port 3000 is used

Deploy Directly Using Docker Image

docker run --name new-api -d --restart always \
  -p 3000:3000 \
  -e TZ=Asia/Shanghai \
  -v /your/data/path:/data \
  calciumion/new-api:latest

Note

Please replace /your/data/path with your desired local path for data storage.

Using MySQL Database

docker run --name new-api -d --restart always \
  -p 3000:3000 \
  -e SQL_DSN="用户名:密码@tcp(数据库地址:3306)/数据库名" \
  -e TZ=Asia/Shanghai \
  -v /your/data/path:/data \
  calciumion/new-api:latest

Note

Please replace the database connection information in the parameters.

Accessing the System

After deployment, accessing http://Server_IP:3000 will automatically redirect you to the initialization page. Follow the on-screen instructions to manually set up the administrator account and password (only required for the first installation), and upon completion, you can log in to the system with the newly set administrator account.

How is this guide?

Last updated on