Standalone Deployment

Standalone deployment is the simplest deployment method for GPT-Load, suitable for individual users and small teams to get started quickly. Supports from lightweight quick start to optional deployment with full functionality.

Quick Start

Lightweight Deployment

Uses SQLite database and memory storage, best for personal use and quick experience

System Requirements

  • Docker 20.10+ and Docker Compose
  • Linux/macOS/Windows operating systems
  • At least 128MB memory and 1GB disk space

Installation Steps

🚨

Critical Security Warning

You must change the default management key before deployment, otherwise there are serious security risks!

Security Key Requirements:

  • At least 20 characters
  • Include uppercase letters, lowercase letters, numbers, and special symbols
  • Avoid using dictionary words or personal information
  • Recommended format: sk-prod-[32-character random string]

⚠️ Using weak keys may lead to malicious system access, causing data leaks or service abuse!

1

Create Working Directory

# Create directory and enter
mkdir -p gpt-load && cd gpt-load
2

Download and Configure Security Parameters

# Download Docker Compose configuration
wget https://raw.githubusercontent.com/tbphp/gpt-load/refs/heads/main/docker-compose.yml

# Download environment variable configuration
wget -O .env https://raw.githubusercontent.com/tbphp/gpt-load/refs/heads/main/.env.example
⚠️
Must Execute: Modify Management Key

Immediately edit .env file, change:

AUTH_KEY=sk-123456

to a secure key:

AUTH_KEY=sk-prod-AbCdEfGh123456$#@!XyZabc789012
Reminder:Please generate your own random key, do not use the example key above!
3

Start Services

# Start GPT-Load service
docker compose up -d
4

Verify Deployment

Access admin interface:

http://localhost:3001
🔐

Login with your custom management key

That is, the .env value set in theAUTH_KEY file

💡

Security Tip:Please keep your management key safe and do not store it in plain text in logs, documents, or code.

Common Commands

Check Status

docker compose ps

View Logs

docker compose logs -f

Restart Service

docker compose down && docker compose up -d

Update Version

docker compose pull && docker compose down && docker compose up -d

Optional Deployment

Enhanced Performance

Configure MySQL/PostgreSQL database and Redis cache to improve system performance and reliability

Database Configuration

MySQL Configuration

1. Edit docker-compose.yml, uncomment MySQL service:

depends_on: mysql: condition: service_healthy restart: true mysql: image: mysql:8.2 container_name: gpt-load-mysql restart: always environment: MYSQL_ROOT_PASSWORD: 123456 MYSQL_DATABASE: gpt-load volumes: - ./data/mysql:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 5s timeout: 5s retries: 10

2. Configure database connection in .env file:

DATABASE_DSN=root:123456@tcp(mysql:3306)/gpt-load?charset=utf8mb4&parseTime=True&loc=Local

PostgreSQL Configuration

1. Edit docker-compose.yml, uncomment PostgreSQL service:

depends_on: postgres: condition: service_healthy restart: true postgres: image: "postgres:16" container_name: gpt-load-postgres environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: 123456 POSTGRES_DB: gpt-load volumes: - ./data/postgres:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d "] interval: 5s timeout: 5s retries: 10

2. Configure database connection in .env file:

DATABASE_DSN=postgres://postgres:123456@postgres:5432/gpt-load?sslmode=disable

Redis Configuration

1. Editdocker-compose.yml, uncomment Redis service:

depends_on: redis: condition: service_healthy restart: true redis: image: redis:latest container_name: gpt-load-redis restart: always healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 3

2. Configure Redis connection in .env file:

REDIS_DSN=redis://redis:6379/0

Restart Services

After configuration is complete, restart all services:

# Stop services
docker compose down

# Restart services
docker compose up -d

Troubleshooting

Common Issues

Cannot login to admin interface

Please check if you are using the correct management key:

  • Confirm that AUTH_KEY in .env file has been modified
  • The new key takes effect after restarting the service: docker compose restart
  • Keys are case-sensitive, please ensure correct input

Port conflict

If port 3001 is occupied, you can modify it in .env file:

PORT=3002

Database connection failed

Check if database service is running normally:

docker compose logs mysql

Insufficient memory

Ensure the system has sufficient memory resources. After enabling database services, at least 1GB of available memory is recommended

Next Steps

After deployment is complete, you can:

  • Configure proxy keys and manage AI service groups
  • Add and manage AI service provider API keys
  • Adjust system configuration and performance parameters
  • Start using API proxy services