Deploying with Baota Panel
This document provides a graphical tutorial for deploying New API using the Baota Panel Docker feature.
Prerequisites
- Install Baota Panel version 9.2.0 or higher
- Recommended OS: CentOS 7+, Ubuntu 18.04+, Debian 10+
- Server Configuration: At least 1 core and 2GB RAM
Install Baota Panel
- Go to the Baota Panel Official Website to download the installation script suitable for your system.
- Run the installation script to install Baota Panel.
- After installation, use the provided address, username, and password to log in to Baota Panel.
Install Docker
- After logging in to Baota Panel, find and click Docker in the left sidebar.
- The first time you enter, you will be prompted to install the Docker service. Click Install Now.
- Follow the prompts to complete the Docker service installation.
Install New API
Method One: Using Baota App Store (Recommended)
- In the Baota Panel Docker feature, click App Store.
- Search for and find New-API.
- Click Install.
- Configure the following basic options:
- Container Name: Customizable, defaults to
new-api - Port Mapping: Defaults to
3000:3000 - Environment Variables: Add as needed (e.g., TZ=Asia/Shanghai)
- Directory Mapping: Ensure the
/datadirectory is mapped to a host directory.
- Container Name: Customizable, defaults to
- Click Submit to complete the installation.
Method Two: Using a Custom Image
It is strongly recommended to install via the "App Store" for automatic configuration. This section is for advanced users who have a clear understanding of Docker and Baota container configuration.
I confirm that I want to manually set up the image and will resolve any issues myself.
Only refer to the following steps to manually configure a custom image after you have checked and agreed to the above confirmation:
- In the Baota Panel Docker feature, click Image Management.
- Click Get Image -> Pull Image.
- Enter Image Name:
calciumion/new-api:latest - Click Submit and wait for the image pull to complete.
- After the pull is complete, go to Container List and click Create Container.
- Fill in the following information:
- Container Name:
new-api(customizable) - Image: Select the
calciumion/new-api:latestimage you just pulled. - Port Mapping: Add
3000:3000 - Directory Mapping: Add
/your/host/path:/data(replace with your host path) - Environment Variables: Add as needed (e.g., TZ=Asia/Shanghai)
- Container Name:
- Click Submit to complete the installation.
Configuration and Access
After installation, you can access New API at the following address:
The first visit will automatically guide you to the initialization page. Follow the on-screen instructions to set up an administrator account and password (only required for the first installation), then log in using the administrator account you set.
Common Issues
1. Unable to access New API interface
- Check if port mapping is correct.
- Confirm if the server firewall allows port 3000.
- Check if the container is running normally.
2. Data cannot be persisted
- Confirm if the
/datadirectory is correctly mapped. - Check if host directory permissions are correct.
How is this guide?
Last updated on