Docker Deployment
Docker deployment is the recommended method, supporting all platforms with simplicity and speed.
Step 1: Install Docker
If you haven't installed Docker yet:
- Windows / macOS: Download Docker Desktop
- Linux: Follow the official docs at Install Docker Engine
TIP
We recommend using Docker Compose for container management, making configuration and upgrades easier.
Step 2: Deploy with Docker Compose
Create a docker-compose.yml file:
yaml
version: '3.8'
services:
any-api:
image: calciumion/any-api:latest
container_name: any-api
restart: always
ports:
- "3000:3000"
volumes:
- ./data:/data
environment:
- SQL_DSN= # Leave empty to use SQLite
- REDIS_CONN_STRING= # Leave empty to use in-memory cacheStart the service:
bash
docker compose up -dStep 3: Access the Admin Dashboard
After deployment, visit http://localhost:3000 to open the admin dashboard.
Default admin credentials:
- Username:
root - Password:
123456
WARNING
Please change the default password immediately after your first login!
Step 4: Create an API Key
- Log in to the admin dashboard
- Go to the "Tokens" page
- Click "Add Token"
- Set a name and quota, then save
- Copy the generated API key
Environment Variables
Common environment variables:
| Variable | Description | Default |
|---|---|---|
SQL_DSN | Database connection string (empty = SQLite) | Empty |
REDIS_CONN_STRING | Redis connection string (empty = in-memory cache) | Empty |
SESSION_SECRET | Session encryption key | Random |
SYNC_FREQUENCY | Balance sync frequency (minutes) | 60 |
Upgrading
bash
docker compose pull
docker compose up -dData is automatically preserved in the ./data directory.
