Service Architecture
Prerequisites
- Docker: 20.10+
- Docker Compose: 2.0+
- System memory: 4GB+ recommended
- Disk space: 20GB+ recommended
Quick Start
Only 3 steps to run the complete AiToEarn locally.1
Clone and start
docker compose ps to confirm all services are healthy or running.2
Open the web interface
Once started, open http://localhost:8080 in your browser.An admin account is created automatically on first startup, and you are logged in automatically. No manual registration is required.
3
Configure Relay (strongly recommended)
AiToEarn needs to sign in to your social media accounts (TikTok, RedNote, YouTube, etc.) to publish content. These platforms require OAuth developer credentials for authorization.
- Without Relay: You need to apply for developer accounts on more than a dozen platforms one by one and obtain client_id/secret, which is tedious.
- With Relay: Authorization is completed using the official aitoearn.ai credentials. One API Key covers all platforms.
- Register and sign in on aitoearn.ai (international) or aitoearn.cn (China), go to Settings → API Key, and create an API Key.
- Open your deployed instance in a browser and go to Configuration Management.
- Select Server → Relay and configure the Relay used for platform authorization.
- To use AI models provided by the platform, select AI → Relay and configure the AI Relay.
- For providers like OpenAI, Gemini, and Anthropic, you can also enter the API Key and API address in AI → Model Providers.
- After saving, click Save and Restart to reload the corresponding services.
A China Key pairs with
https://aitoearn.cn/api, and an international Key pairs with https://aitoearn.ai/api. A mismatched environment and Key will result in a 401 error.Operations Reference
Auto login
Auto login
Auto login is enabled by default. On first startup, the
aitoearn-init service generates an admin token and saves it to a shared volume, and the aitoearn-web service reads the token to complete login automatically.Image pull policy
Image pull policy
All application images use
pull_policy: always, ensuring every docker compose up pulls the latest images.Internal service communication
Internal service communication
The following settings are used for inter-service communication over the internal Docker network and usually do not need to be changed:
Configuration files
Configuration files
Configuration files are mounted into containers as writable volumes. Modify them through the configuration management UI; restart the corresponding service after saving:
Configuration Cheat Sheet
aitoearn-ai and aitoearn-server no longer read runtime parameters from the environment section of docker-compose.yml. They read the mounted config.yaml instead, which is edited through the configuration management UI.

