Skip to content

Set up feature flags

Ship features without sweating the launch. Roll out gradually, kill instantly if needed.

  1. 1
    PostHog

    Sign up for PostHog Cloud (or self-host) and install the posthog-js snippet. Go to Feature Flags and create a boolean flag. In your code, wrap the new feature in if (posthog.isFeatureEnabled('my-flag')). Start with a 0% rollout and increase gradually. PostHog automatically records which flag variant each user received alongside their analytics events.

    Open PostHog
  2. 2
    LaunchDarkly

    Create a LaunchDarkly account and project. Install the SDK for your language and initialize it with your SDK key. Create a feature flag in the dashboard and define targeting rules by user attribute (plan, beta tester, internal team). Use the kill switch to instantly disable a feature for all users if an issue is detected in production.

    Open LaunchDarkly
  3. 3
    Unleash

    Deploy Unleash via the official Docker image or Unleash Cloud. Create a feature toggle in the admin UI and install the Unleash client SDK in your application. Configure a gradual rollout strategy that starts at 10% of users. The Unleash Proxy can be deployed at the edge to reduce latency for flag evaluation.

    Open Unleash
  4. 4
    Flagsmith

    Sign up for Flagsmith and create a project with separate development and production environments. Each environment has its own API key so flag states are isolated. Add the flagsmith npm package and call flagsmith.hasFeature('my-flag') in your code. Use the Remote Config feature to store arbitrary string values (API endpoints, copy, thresholds) that you can change without a deployment.

    Open Flagsmith

Estimated Monthly Cost

Verified Apr 2026
PostHog

1M events/mo, 5K recordings, unlimited feature flags

Free

Free

1 tool free at this scale
Est. total$0/mo

Estimates based on publicly listed pricing. Actual costs may vary — always verify on each tool's pricing page.

Frequently asked questions

Costs depend on your scale. Most tools in this stack offer a free tier to start. Open the cost calculator on this page to estimate monthly cost based on your users and revenue.

This stack uses 4 tools: LaunchDarkly, PostHog, Unleash, Flagsmith. Each tool is picked to work well with the others and to cover a specific part of the workflow.

Yes. The stack is a recommended starting point. You can replace any tool with an alternative you already use. Check the setup guide first to confirm the integration points you'll need to rebuild.

Most makers finish the 4-step setup in under an hour. Creating accounts and connecting the first integration takes the most time.

Have a better stack?

Share your favorite tool combination and help other builders.

Suggest a stack