Skip to main content

Quickstart

This guide walks you through launching CoW Protocol Services locally using Docker Compose. The environment operates in “fork mode,” allowing developers to test against a forked blockchain with real token contracts while maintaining isolation.

Prerequisites

You will need:
  • Docker Desktop/Engine with Docker Compose
  • An Ethereum RPC endpoint (e.g., Alchemy, Infura, or a local node)
  • Rust toolchain (optional, for local development)
RPC demand is very high. Free tier RPC endpoints may rate-limit or perform poorly. We recommend either local nodes or paid services.

Setup Steps

1. Clone the Repository

git clone https://github.com/cowprotocol/services.git
cd services

2. Configure Environment Variables

Set your RPC endpoint and chain ID:
cp .env.example .env
# Edit .env with your RPC endpoint and desired chain ID

3. Launch Services

Start all services using Docker Compose:
docker compose up
On macOS/Windows, use the non-interactive compose file for better performance:
docker compose -f docker-compose.yml -f docker-compose.noninteractive.yml up

4. Monitor Logs

Wait until all services initialize properly. You should see logs from the orderbook, autopilot, driver, and solver services.

Access Points

Once running, you can reach the following interfaces:
ServiceURL
CoW Swap UIlocalhost:8000
CoW Explorerlocalhost:8001
Orderbook APIlocalhost:8080
Database UI (Adminer)localhost:8082
Otterscan Block Explorerlocalhost:8003
Anvil RPC Nodelocalhost:8545

Testing Workflow

Test Accounts

The playground provides test accounts with 10,000 ETH each, derived from the standard mnemonic:
test test test test test test test test test test test junk
Never use these keys on real networks! They are publicly known test accounts.

Place a Test Swap

  1. Wrap ETH to WETH using the Anvil RPC node
  2. Place a swap order through the CoW Swap UI or directly via the Orderbook API
  3. Monitor settlement through service logs and the block explorer

Network Support

The setup supports multiple chains by adjusting environment variables and restarting services:
  • Ethereum Mainnet
  • Gnosis Chain
  • Arbitrum One
  • Base
  • Polygon
Simply update the CHAIN_ID and RPC_URL in your .env file and restart Docker Compose.
Last modified on March 4, 2026