Skip to main content

Self-hosted (Community Edition)

Available now

AICP Community Edition, a self-hosted, source-available distribution, is available today via Docker Compose. Contact us if you want a managed/enterprise deployment instead, or need help getting set up.

What "self-hosted" actually means

Normally, when you use AICP Cloud, your requests travel to our computers. We run everything, and you just call our API. Self-hosting means you run AICP yourself, on your own computer or server, instead. Nothing about your traffic ever leaves your own infrastructure. You own it, you run it, it's free.

Think of it like the difference between using a shared washing machine at a laundromat (Cloud) versus buying your own washing machine and keeping it in your house (Community Edition). Same machine, same job, it's just yours now, and nobody else's clothes are ever in it.

What you need before you start

Just one thing: Docker installed on your computer. Docker is a tool that packages up an entire application, all its pieces, all its dependencies, into neat little boxes called containers, so it runs the same way on any machine. AICP is made of about a dozen small services (the gateway, the router, the database, and so on); Docker Compose is what starts all of them together, wired up to talk to each other, with one command.

You do not need to install Node.js, Python, PostgreSQL, or anything else separately. Docker handles all of that inside its containers.

The easy way: one script does everything

git clone https://github.com/aicp/community.git
cd community
./scripts/setup-community.sh

That's it. Here's exactly what that script does for you, in plain English:

  1. Copies a settings file. It copies .env.community.example to .env. This is where all the configuration lives (database passwords, secret keys, etc.).
  2. Generates real secrets. The settings file ships with placeholder values like change_me_in_production. The script replaces those with real, randomly generated secret values (using openssl rand -hex 32, a standard way to generate a long random string). It only touches values that are still placeholders, so running it again later never overwrites a secret you've already customized.
  3. Builds and starts everything. It runs docker compose up, which builds each service from source and starts them all: the database, the routing engine, the API gateway, the dashboard, all of it.
  4. Waits for the database, then sets it up. It waits until PostgreSQL is ready to accept connections, then creates all the tables AICP needs (this is called running migrations).
  5. Tells you what to do next. See below.

After it finishes: 3 steps to your first request

  1. Open the dashboard at http://localhost:3001 and sign up. This creates your organization and your first user account. You're the owner.
  2. Connect a provider. Go to Model Catalog → Providers and paste in an API key for at least one AI provider you already have (OpenAI, Anthropic, etc.). This is called BYOK, Bring Your Own Key: AICP never gives you its own provider keys in this edition, you plug in your own, and only you ever see them (they're encrypted before they're stored).
  3. Send a request to the gateway and let AICP pick the model for you:
curl http://localhost:3000/v1/chat/completions \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"model": "auto", "messages": [{"role": "user", "content": "Hello"}]}'

Look at the _routing field in the response. It tells you exactly which model AICP picked and why (cost, quality, latency), the same explanation you'd see in the dashboard's Request Explorer.

To stop everything: docker compose -f docker-compose.community.yml down. To see what's happening under the hood: docker compose -f docker-compose.community.yml logs -f.

The manual way (if you'd rather see every step yourself)

The script above is just a shortcut for these commands, useful if you want to understand (or customize) each step instead of running a script blindly:

git clone https://github.com/aicp/community.git
cd community
cp .env.community.example .env
# Open .env and replace the change_me_* / all-zero placeholder values with real secrets.
# `openssl rand -hex 32` generates a good one for each.
docker compose -f docker-compose.community.yml up -d
./scripts/migrate-community.sh

Then follow the same 3 steps above (open the dashboard, connect a provider, send a request).

What it includes

The full gateway, real ML-based routing (a stable, periodically refreshed release of our classifier, not the continuously retrained version Cloud runs), bring-your-own-key provider connections, usage tracking, and basic request logging.

What it doesn't include

A platform-admin UI (this edition is designed for one organization per deployment, so you connect your own provider keys directly, no admin needed), usage-based billing (there's no bill in a self-hosted install), or the model-training pipeline itself (you get the trained artifact and the code that serves it, not the code that trains it).

Licensing

Community Edition ships under the Business Source License 1.1, source-available (not OSI open source), free for your own production use, with each release converting to Apache-2.0 four years later. It won't permit reselling it as a hosted service.

Detailed guides coming soon for

  • PostgreSQL, Redis, ClickHouse, and NATS internals (Kubernetes/Helm support is a later milestone; Docker Compose is the only supported deployment today)
  • Full environment variables reference
  • Upgrades and migrations between releases