🚀 Getting Started with Crate CE
This guide will walk you through downloading and running Crate Community Edition (CE) for the first time.
Prerequisites
- Linux, macOS, or Windows (amd64 or arm64)
- Docker: Optional, but recommended for quick deployment.
- Curl: For testing your setup.
No runtime dependencies required — Crate CE ships as a single, self-contained binary.
Installation Options
1. Download the Prebuilt Binary
Download the latest release for your platform from the Crate CE Releases page.
# Example: Linux amd64
curl -L -o crate-ce https://gitlab.com/cratecc/ce/-/releases/latest/downloads/crate-ce-linux-amd64
# Make it executable
chmod +x crate-ce
Available binaries:
| Platform | Binary Name |
|---|---|
| Linux (amd64) | crate-ce-linux-amd64 |
| Linux (arm64) | crate-ce-linux-arm64 |
| macOS (amd64) | crate-ce-darwin-amd64 |
| macOS (arm64) | crate-ce-darwin-arm64 |
2. Using Docker (Recommended)
The easiest way to run Crate CE is via Docker. We provide a lightweight image that contains everything you need.
# Pull the latest image
docker pull cratecc/ce:latest
# Run the container
docker run -d \
-p 9980:9980 \
-v $(pwd)/config:/etc/crate/config \
--name crate-ce \
cratecc/ce:latest
Running Crate CE
Start the gateway by running the binary directly:
./crate-ce
Crate CE will start listening on port 9980 by default.
Command Line Options
| Flag / Env Var | Default | Description |
|---|---|---|
-port |
9980 |
Port the gateway listens on. |
CONFIG_STORAGE_DIR |
/etc/crate/config |
Directory for YAML configuration files. |
MIRROR_PORT |
8081 |
Port for the built-in mirror/echo service. |
Example with custom config directory:
CONFIG_STORAGE_DIR=./my-config ./crate-ce
Configuration
Crate CE loads YAML configuration files from the config directory at startup.
- Create a config directory:
mkdir -p config - Add a sample configuration — create a file in your
configdirectory (the filename can be anything ending in.yaml):name: "My Local Organization" domains: - host: "api.local.crate.cc" details: routing: type: "round-robin" destinations: - "http://localhost:8080"
Testing Your Setup
Use the built-in Mirror Service to verify that Crate CE is routing correctly.
- Start Crate CE — the mirror service runs automatically alongside the gateway.
- Send a test request:
curl -H "Host: api.local.crate.cc" http://localhost:9980 - Expected result: You should receive a JSON response echoing back your request headers and path, confirming the gateway is routing traffic.
Next Steps
- Learn more about the YAML Configuration.
- Understand the Crate CE Architecture.
- Explore Docker Deployment.