Skip to main content

Self-Hosting and Open Source

Beta

Experimentation is in beta.

Experimentation works in both the Open Source version and the Enterprise Edition, with no edition restriction. Self-hosted Flagsmith can store experiment events in two ways.

Flagsmith database​

Events are stored in the PostgreSQL database Flagsmith already runs on, and the SDKs send them to your Flagsmith API.

  • Needs only the Flagsmith API; there is nothing extra to run.
  • Only works when your Flagsmith database is PostgreSQL.
  • Events share your application database, so they add to its size, backups and load.

To set it up, see Self-hosted: use the Flagsmith database.

Your own warehouse​

Events are delivered to your own ClickHouse, Databricks or PostgreSQL.

Turning it on​

Set EXPERIMENTATION_ENABLED=true on the Flagsmith API. The Warehouse tab doesn't appear without it. See environment variables.

SDK events URL​

By default, the SDKs send events to Flagsmith Cloud. Set each SDK's events URL to:

  • Flagsmith database: your Flagsmith API URL ending in /api/, for example https://flagsmith.example.com/api/.
  • Your own warehouse: your event ingestion service's public URL, for example https://events.flagsmith.example.com/.

The SDKs append v1/events themselves. See Initialise for each SDK.

Things to know​

  • Events with a timestamp more than 10 days in the past or 24 hours in the future are rejected.
  • A batch over 2 MiB is rejected whole.
  • Flagsmith never deletes events. Monitor the size of your database or warehouse.

Deploying​

The source for the event ingestion service and warehouse delivery is on GitHub.