Self-hosted feature flags. One Go binary, Postgres, no cloud and no vendor lock-in.
  • HTML 63.3%
  • Go 36.1%
  • Dockerfile 0.6%
Go to file
ibotzhub b73aff8e15 docs: fix clone dir (flag-forge), repo URL, LICENSE link
- README: GitHub URL; sentence-case intro; cd flag-forge after clone
- README: local dev notes, backtick config keys, contributing steps
- README: compare table markdown separator row; link MIT to LICENSE
- .gitignore: ignore .env.*
2026-05-13 02:59:01 -07:00
cmd/server Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
internal Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
migrations Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
ui Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
.gitignore docs: fix clone dir (flag-forge), repo URL, LICENSE link 2026-05-13 02:59:01 -07:00
docker-compose.yml Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
Dockerfile Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
go.mod Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
go.sum Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
LICENSE Initial commit: FlagForge self-hosted feature flags 2026-03-06 09:34:54 -08:00
README.md docs: fix clone dir (flag-forge), repo URL, LICENSE link 2026-05-13 02:59:01 -07:00

FlagForge

https://github.com/ibotzhub/flag-forge

Self-hosted feature flags. No cloud, no vendor lock, no four hundred dollar a month invoice.

docker compose up -d

done. you have a flag service.

why this exists

launchdarkly costs a fortune. unleash is heavy. flagsmith wants you to run k8s. flagforge is one go binary, postgres, and a UI. does one thing

FlagForge LaunchDarkly Unleash
self-hosted yes no yes
single binary yes no no
gradual rollout yes yes yes
targeting rules yes yes yes
audit log yes yes yes
price free free or $
setup 2 min 30 min 1 hr

features

toggle flags on and off per project. targeting rules with eq, neq, in, nin, contains, prefix. gradual rollouts with FNV bucketing so same user same result. projects for separate apps or envs. audit log for every change. SSE so clients can subscribe instead of polling. dashboard to create edit toggle set rules. tiny SDK, plain HTTP, no deps, any language

quick start

docker compose (easiest)

git clone https://github.com/ibotzhub/flag-forge
cd flag-forge
docker compose up -d

API on 8080, dashboard on 5173

or run locally: start Postgres, load migrations/001_init.sql (or use compose so init scripts run), then run the server with DATABASE_URL and ADDR. See docker-compose.yml for env shape.

API

all SDK calls need X-API-Key with your project key

evaluate one flag: POST /sdk/v1/evaluate with flag_key and context. you get enabled and reason (disabled, rule_match, rollout, default). bulk: POST /sdk/v1/evaluate/bulk with flag_keys and context. all flags for caching: GET /sdk/v1/flags

targeting rules

evaluated in order, first match wins. eq, neq, in, nin, contains, prefix. examples: plan eq "pro", country neq "CN", plan in ["pro","enterprise"], email contains "@acme.com", user_id prefix "internal_"

rollouts

percentage plus sticky key (e.g. user_id). FNV hash so deterministic, no db hit per request. same user same result. roll 0 to 100 at your pace

SDK

its just HTTP. POST to evaluate with JSON, read enabled. go, js, python, whatever. no magic SDK required

config

DATABASE_URL for Postgres. ADDR for listen address, default :8080.

roadmap

multivariate flags, flag dependencies, scheduled changes, webhooks on toggle, import from launchdarkly JSON, official SDK packages, eval counts, SSO for the dashboard. PRs welcome

contributing

Clone the repo, cd flag-forge, then e.g. docker compose up -d postgres and DATABASE_URL=postgres://flagforge:flagforge@localhost:5432/flagforge?sslmode=disable go run ./cmd/server, or bring your own Postgres and apply migrations/001_init.sql. Open the UI (e.g. port 5173 when using full docker compose up -d).

license

MIT