Skip to main content
Docker lets you run the AgentRail API server as a container. This is a server-only path — it starts the API process but does not create agent credentials, configure routing, or set up providers. You complete those steps with the CLI after the container is running.
The CLI-managed path (agentrail initagentrail server start) is recommended for most setups because it handles agent credentials, routing, and provider state automatically. Use Docker when you specifically want to run the server process in a container.

Start the server

From the root of the AgentRail repository, run:
The API starts and listens on http://127.0.0.1:3000 by default. You should see output like:
Keep this terminal running.

Complete setup with the CLI

With the container running, open a second terminal and complete the CLI setup steps:
1

Install the CLI

If you have not already installed the CLI globally:
2

Run init

Point init at the running container:
This writes local config to ~/.agentrail/ and creates operator bootstrap state.
3

Create your first agent

The agent wizard creates scoped credentials, writes ~/.agentrail/agent.env, and configures starter routing for your repo.
4

Verify with doctor

Doctor checks that the API is reachable, your agent credentials are valid, routing state exists, and assigned work is visible. Do not treat setup as complete until doctor passes.

Connect providers (optional)

After doctor passes, connect your providers to enable live issue intake, CI, and review:
Each command walks you through credential setup and ends with readiness checks.
Run agentrail provider doctor after connecting providers to confirm they are correctly configured and ready for the agent lifecycle.

Load agent credentials

Before starting a coding agent manually, source the agent env file:
For managed local agents, agentrail server start handles this automatically. In the Docker path, your coding agent needs the env vars set manually or through whatever environment management your container setup uses.