How it works
Each runner:- Registers with the main server using a Runner Token (Better Auth API key)
- Sends periodic heartbeats to report availability
- Polls for pending tasks
- Executes reviews inside an isolated Docker container
- Reports task status and results back to the server
Prerequisites
- Docker installed and accessible on the runner host
- Network connectivity from the runner host to the main server
- A valid API key created in the main server (used as
RUNNER_TOKEN)
Environment variables
Setup
1
Create a Runner Token
In the main server’s admin interface, create a Better Auth API key. This value will be used as
RUNNER_TOKEN.2
Configure environment variables
Set the required variables for the runner. Example:
3
Build the runner and executor images
ai-review-runner image and the ai-review-executor image used for isolated task execution.4
Start the runner
5
Verify registration
Check the admin dashboard to confirm the runner appears as registered and is sending heartbeats.
Docker socket requirement
Network requirements
The runner must be able to reach the main server atRUNNER_SERVER_URL. When running locally with Docker, http://host.docker.internal:3000 resolves to the host machine. For remote deployments, use the server’s actual hostname or IP address.
Scaling runners
To run multiple runner instances, start additional containers with uniqueRUNNER_NAME values. Each instance registers independently and picks up tasks from the shared queue.
Task concurrency
Control how many review jobs a single runner processes at the same time usingRUNNER_MAX_CONCURRENT_JOBS. Tune this based on available CPU, memory, and the Docker resource limits configured for executor containers.