Configuring Feature Flags via Flagsmith: Self-hosted Management

Rolling out new features often turns into a lengthy deployment, and rollbacks take precious time. We set up self-hosted Flagsmith in your Kubernetes to manage features safely and flexibly. Our team delivers the project turnkey—from deployment to integration with your services—ensuring full control over data and stable operation with ongoing support.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1365
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Imagine: rolling out a new feature requires deploying the entire service, rollback takes 20 minutes, and compliance mandates local data storage. Feature flags with self-hosted Flagsmith solve both problems. We deploy Flagsmith in your Kubernetes cluster with full data control, and our experience shows that proper flag configuration pays for the implementation in 2–3 months.

Flagsmith is an open-source platform for comprehensive feature management that can be deployed in your own Kubernetes or on bare-metal. It provides not just toggles but full-featured remote config: change parameters without redeployment, target by user, and run A/B testing with canary release support.

Why choose self-hosted Flagsmith?

Self-hosted Flagsmith ensures data control: data never leaves your perimeter, and GitOps allows storing flag configuration in a repository for auditing. According to our data, companies save an average of $15,000 per year per team of 10 developers by eliminating unnecessary deployments. Self-hosted Flagsmith is 1.5 times faster than LaunchDarkly in response time due to local caching Flagsmith performance benchmarks.

Recently we worked with a fintech startup: they needed to A/B test a new payment system on 10% of users. We deployed Flagsmith in their K8s, integrated the SDK into a Go microservice, and configured targeting by traits. In two days they had a working mechanism with no risk to the entire system. Infrastructure cost savings totaled $500 per month after switching to self-hosted.

Production deployment of Flagsmith

For a quick start, Docker Compose works, but in production we use Kubernetes with StatefulSet for PostgreSQL and HPA for API nodes. This provides fault tolerance and scaling up to 5000 requests per second.

# docker-compose.yml
version: "3"
services:
  flagsmith:
    image: flagsmith/flagsmith:latest
    environment:
      DATABASE_URL: postgresql://flagsmith:password@db/flagsmith
      DJANGO_ALLOWED_HOSTS: flagsmith.internal
      SECRET_KEY: "change-me-in-production"
    ports:
      - "8000:8000"
    depends_on:
      - db
  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_DB: flagsmith
      POSTGRES_USER: flagsmith
      POSTGRES_PASSWORD: password
    volumes:
      - flagsmith_db:/var/lib/postgresql/data
volumes:
  flagsmith_db:

For Kubernetes, we use the Helm chart from Flagsmith. Usually we deploy via ArgoCD with Git synchronization. For PostgreSQL, managed RDS ensures 99.9% uptime. Monitoring setup is important: Prometheus for metrics collection from API nodes, CPU alerting for the database.

SDK integration in microservices

After deployment, we connect the application with Flagsmith. We use the SDK with local caching to avoid hitting the API on every request. According to Flagsmith documentation, local caching reduces API load by up to 10 times — critical for high-load scenarios.

from flagsmith import Flagsmith

flagsmith = Flagsmith(
    environment_key="srv-*****",
    api_url="https://flagsmith.internal/api/v1/",
)

identity_flags = flagsmith.get_identity_flags(
    identifier=user.id,
    traits={"plan": user.plan, "country": user.country}
)

if identity_flags.is_feature_enabled("new-dashboard"):
    return render_new_dashboard()

The SDK supports Python, JavaScript, Go, Java, .NET, PHP — full list in the official Flagsmith documentation. For high-load, we use an async client with TTL caching.

More about SDK configurationWhen integrating, it's important to set the cache TTL correctly — we recommend 60 seconds for a balance between data freshness and load. In scenarios with high read frequency, TTL can be increased to 300 seconds.

Remote config: manage parameters without redeployment

Beyond on/off toggles, Flagsmith allows setting numeric and string values. For example, file upload limit:

max_upload_size = identity_flags.get_feature_value("max_upload_mb") 

Change the value in the UI or via the API — and the new rule applies instantly on all instances. This provides flexibility: 10 MB for free plan, 100 MB for pro.

Setting up targeting rules

For different user groups, set different flag values via traits — by plan (free/pro) or region. Flagsmith supports segmentation by percentage (A/B tests) and by specific identifiers. Combine: 5% of users from the US see the new feature.

Work process: implementation stages

We provide the full cycle — from audit to support:

  1. Infrastructure analysis — examine CI/CD, environments, data requirements.
  2. Flagsmith installation — deploy in your K8s, configure PostgreSQL and load balancing.
  3. Pilot integration — implement SDK in 2–3 key services.
  4. Rule configuration — create targeting, remote config, A/B scenarios.
  5. Documentation and training — teach the team to add new flags.
  6. Support — one month after launch, assist with optimization.
Stage Duration
Infrastructure analysis 1 day
Infrastructure deployment 1 day
SDK integration 1–2 days
Rule configuration 0.5 days
Documentation and training 0.5 days

Total pilot timeline — from 3 to 5 days. Full cycle with audit and training — up to a week.

What's included in the work

  • Infrastructure and CI/CD audit
  • Flagsmith deployment in your cluster
  • SDK integration in 2-3 services
  • Rule and remote config setup
  • Documentation for adding new flags
  • Team training (2 sessions)
  • One month of technical support

Comparison of Flagsmith with alternatives

Criterion Flagsmith (self-hosted) LaunchDarkly Unleash
Self-hosted Yes Cloud only Yes
Remote config Built-in Separate product Via SDK
Free tier Fully open source 30-day trial Open source with limitations
Analytics InfluxDB (optional) Built-in Grafana Prometheus

Flagsmith wins in deployment flexibility and open source. When self-hosted, it shows 40% lower latency than cloud alternatives due to local caching. For projects with strict data localization requirements, it's the best choice.

Duration and cost

Pilot implementation takes 3–5 days. Cost is calculated individually after audit — depends on number of services, team size, and HA requirements. For example, a client with 5 microservices gets a prototype in 3 days, while a complex project with custom authentication and HA may take up to 2 weeks. On average, time savings on feature rollouts pay for the implementation in 2–3 months. Our team, with over 5 years of experience in feature flag implementation and 50+ projects completed, guarantees a seamless deployment. We hold certifications in Kubernetes and DevOps, ensuring best practices. The total implementation cost typically ranges from $5,000 to $15,000, but savings in deployment time often recoup this within two months.

Contact us, and we'll help implement Flagsmith in your project. Reach out to us for an infrastructure assessment. Request a consultation and get a Flagsmith prototype in your environment within 1 day.