Flagonic documentation

Flagonic is an OpenFeature-native feature flag service. Evaluation happens over OFREP, the OpenFeature Remote Evaluation Protocol — so your applications use the official OpenFeature SDKs and providers, never a proprietary one. This page gets a Flagonic server from zero to a working SDK key; the language guides take it from there.

Concepts

OrganizationA tenant. Created by the instance operator with the root key.
ProjectA codebase or application within an org. Flags are defined per project.
Environmentproduction (auto-created), staging, … Each flag carries separate targeting state per environment.
FlagKey, type (boolean, string, number, object), and named variants are shared across environments; rules and enabled state are per environment.
SDK keyBearer token pinned to one project + environment. It can only evaluate flags. This is what your application holds.

Server quickstart

Run the binary. First boot creates the SQLite database and prints a one-time root key:

$ flagonic
level=INFO msg="created instance root API key — store it now, …" token=fgn_root_…
level=INFO msg="flagonic listening" addr=:8016

Provision a tenant, a project, and a flag. You can do all of this in the dashboard instead of curl — sign in with the root key, create an org, then sign in with the org's admin key.

# 1. create an org — the response includes its one-time admin key
curl -X POST localhost:8016/api/v1/orgs \
  -H "Authorization: Bearer $ROOT_KEY" \
  -d '{ "slug": "acme", "name": "Acme Inc" }'

# 2. create a project (auto-creates the production environment)
curl -X POST localhost:8016/api/v1/projects \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -d '{ "key": "web", "name": "Web App" }'

# 3. create a flag
curl -X POST localhost:8016/api/v1/projects/web/flags \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -d '{
    "key": "new-checkout",
    "type": "boolean",
    "variants": { "on": true, "off": false },
    "environments": {
      "production": {
        "enabled": true,
        "defaultVariant": "off",
        "rules": [
          { "variant": "on",
            "conditions": [{ "attribute": "plan", "op": "eq", "value": "pro" }] },
          { "variant": "on", "percentage": 25 }
        ]
      }
    }
  }'

# 4. mint the SDK key your application will use
curl -X POST localhost:8016/api/v1/keys \
  -H "Authorization: Bearer $ADMIN_KEY" \
  -d '{ "name": "web-prod", "role": "sdk", "project": "web", "environment": "production" }'
One key per environment. The SDK key carries the project + environment scope, so the same code evaluates staging flags in staging and production flags in production — only the key differs.

Pick your SDK

Any OpenFeature SDK with an OFREP provider works with Flagonic, unchanged.

No guide for your language yet? The pattern is identical everywhere: install the OpenFeature SDK and its OFREP provider, point the provider at your Flagonic base URL with the SDK key as a bearer token, and evaluate.