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!
Create Working Directory
# Create directory and enter
mkdir -p gpt-load && cd gpt-loadDownload 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.exampleMust Execute: Modify Management Key
Immediately edit .env file, change:
AUTH_KEY=sk-123456to a secure key:
AUTH_KEY=sk-prod-AbCdEfGh123456$#@!XyZabc789012Start Services
# Start GPT-Load service
docker compose up -dVerify Deployment
Access admin interface:
http://localhost:3001Login 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 psView Logs
docker compose logs -fRestart Service
docker compose down && docker compose up -dUpdate Version
docker compose pull && docker compose down && docker compose up -dOptional 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: 102. Configure database connection in .env file:
DATABASE_DSN=root:123456@tcp(mysql:3306)/gpt-load?charset=utf8mb4&parseTime=True&loc=LocalPostgreSQL 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: 102. Configure database connection in .env file:
DATABASE_DSN=postgres://postgres:123456@postgres:5432/gpt-load?sslmode=disableRedis 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: 32. Configure Redis connection in .env file:
REDIS_DSN=redis://redis:6379/0Restart Services
After configuration is complete, restart all services:
# Stop services
docker compose down
# Restart services
docker compose up -dTroubleshooting
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=3002Database connection failed
Check if database service is running normally:
docker compose logs mysqlInsufficient 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