Deploying FeatBit
Introduction
FeatBit is a powerful open-source feature flag management platform that empowers development teams to deploy code confidently, test features safely, and control rollouts precisely. Built with modern architecture using .NET Core and Vue.js, FeatBit provides enterprise-grade feature management without vendor lock-in or per-seat pricing.
Feature flags (also called feature toggles) let you deploy code to production with features turned off, then enable them gradually for specific users, regions, or segments. This approach dramatically reduces deployment risk, enables A/B testing, and allows instant rollback without redeployment. FeatBit makes this workflow accessible to teams of any size.
Key Features
- Real-Time Flag Updates - Feature changes propagate instantly without application restarts
- Granular Targeting - Target features by user attributes, segments, percentages, or custom rules
- Multi-Environment Support - Separate flags for development, staging, and production environments
- A/B Testing & Experimentation - Run controlled experiments with statistical analysis
- Progressive Rollouts - Gradually release features with percentage-based targeting
- Team Collaboration - Role-based access control, approval workflows, and audit logs
- Multi-Project Management - Organize flags across multiple projects and teams
- SDK Support - Official SDKs for JavaScript, React, Node.js, .NET, Java, Python, Go, and more
- Real-Time Dashboard - Monitor flag status, user targeting, and rollout progress
- Webhook Integration - Trigger external systems when flags change
- Data Export - Export flag configurations and audit logs for compliance
- Self-Hosted - Complete control over your data and infrastructure
- Open Source - MIT licensed with active community development
- API-First Design - Comprehensive REST API for automation and integration
Why Deploy FeatBit on Klutch.sh?
Deploying FeatBit on Klutch.sh gives your team complete control over feature management infrastructure:
- Data Sovereignty - Your feature flags and user data stay on your infrastructure
- No Per-Seat Pricing - Unlimited team members without recurring per-user costs
- High Availability - Reliable infrastructure for mission-critical feature management
- Fast Deployment - Automatic Dockerfile detection gets FeatBit running in minutes
- Persistent Storage - Reliable storage for flag configurations and audit logs
- Custom Domains - Professional access at your own domain
- Automatic HTTPS - Built-in SSL certificates for secure flag delivery
- Scalable Architecture - Handle high-traffic applications with ease
- Environment Isolation - Deploy separate instances for dev, staging, and production
Prerequisites
Before deploying FeatBit on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your FeatBit project
- Basic understanding of Docker and feature flag concepts
- MongoDB instance deployed (for storing flag configurations)
- Redis instance deployed (for caching and real-time updates)
Preparing Your Repository
FeatBit consists of multiple services, but for a simplified deployment, we’ll focus on the core API and UI components. Create a new directory for your FeatBit deployment:
mkdir featbit-deploymentcd featbit-deploymentCreating the Dockerfile
Create a Dockerfile in the root of your repository. We’ll use FeatBit’s official Docker images:
# FeatBit API Server DockerfileFROM featbit/featbit-api-server:latest
# Set environment variablesENV ASPNETCORE_ENVIRONMENT=ProductionENV ASPNETCORE_URLS=http://+:5000
# MongoDB connectionENV MongoDb__ConnectionString=""ENV MongoDb__Database=featbit
# Redis connectionENV Redis__ConnectionString=""
# CORS settings (configure based on your UI domain)ENV CORS__Origins=http://localhost:8081,https://your-domain.klutch.sh
# JWT settings (change this to a secure random string)ENV JWT__SecretKey=YourSecretKeyHerePleaseChangeThis123456789ENV JWT__Issuer=featbit-apiENV JWT__Audience=featbit-client
# Feature flag settingsENV FeatureFlag__DefaultReturnValue=false
# LoggingENV Logging__LogLevel__Default=InformationENV Logging__LogLevel__Microsoft=Warning
# Health check settingsENV HealthChecks__Enabled=true
# Expose the API portEXPOSE 5000
# The base image already has the correct ENTRYPOINT# Start the FeatBit API serverCMD ["dotnet", "Api.dll"]Alternative: FeatBit UI Dockerfile
If you want to deploy the UI separately, create a Dockerfile.ui:
# FeatBit UI DockerfileFROM featbit/featbit-ui:latest
# Environment variables for API connectionENV API_URL=https://api-featbit.klutch.sh
# Nginx configurationENV NGINX_PORT=8081
# Expose the UI portEXPOSE 8081
# The base image already handles the entrypointCMD ["nginx", "-g", "daemon off;"]Docker Compose for Local Development
For local testing, create a docker-compose.yml file (not used for Klutch.sh deployment):
version: '3.8'
services: mongodb: image: mongo:7 ports: - "27017:27017" environment: MONGO_INITDB_ROOT_USERNAME: admin MONGO_INITDB_ROOT_PASSWORD: password volumes: - mongodb_data:/data/db
redis: image: redis:7-alpine ports: - "6379:6379" command: redis-server --requirepass yourredispassword
api-server: build: context: . dockerfile: Dockerfile ports: - "5000:5000" environment: MongoDb__ConnectionString: mongodb://admin:password@mongodb:27017 Redis__ConnectionString: redis:6379,password=yourredispassword CORS__Origins: http://localhost:8081 depends_on: - mongodb - redis
ui: build: context: . dockerfile: Dockerfile.ui ports: - "8081:8081" environment: API_URL: http://localhost:5000 depends_on: - api-server
volumes: mongodb_data:Test locally:
docker-compose up -dAccess FeatBit at http://localhost:8081 and the API at http://localhost:5000.
Initialize Git Repository
Initialize your repository and push to GitHub:
git initgit add Dockerfile docker-compose.ymlgit commit -m "Initial FeatBit configuration"git branch -M maingit remote add origin https://github.com/yourusername/featbit-deployment.gitgit push -u origin mainDeploying FeatBit API on Klutch.sh
-
Navigate to the Klutch.sh Dashboard
Go to klutch.sh/app and sign in to your account.
-
Create a New Project
Click “New Project” and give it a meaningful name like
featbit-productionorfeature-flags. -
Create a New App
Inside your project, click “New App” and select your GitHub repository containing the FeatBit configuration.
-
Configure Build Settings
Klutch.sh will automatically detect your Dockerfile and use it for deployment. No additional build configuration is needed.
-
Configure Environment Variables
In the Environment Variables section, add the following variables:
MongoDB Connection:
MongoDb__ConnectionString:mongodb://username:password@mongodb-app.klutch.sh:8000MongoDb__Database:featbit
Redis Connection:
Redis__ConnectionString:redis-app.klutch.sh:8000,password=yourredispassword
Security Settings:
JWT__SecretKey:YourVerySecureRandomStringHere123456789AbCdEf(generate a secure random string)JWT__Issuer:featbit-apiJWT__Audience:featbit-client
CORS Configuration:
CORS__Origins:https://featbit-ui.klutch.sh(adjust based on your UI domain)
Application Settings:
ASPNETCORE_ENVIRONMENT:ProductionASPNETCORE_URLS:http://+:5000FeatureFlag__DefaultReturnValue:false
Logging:
Logging__LogLevel__Default:InformationLogging__LogLevel__Microsoft:Warning
-
Configure Traffic Settings
Set the traffic type to HTTP and specify the internal port as 5000 (FeatBit API’s default port).
-
Deploy the Application
Click “Deploy” to start the deployment. Klutch.sh will build your Docker image and deploy FeatBit.
-
Access Your FeatBit API
Once deployed, your FeatBit API will be accessible at
https://your-app-name.klutch.sh.
Deploying FeatBit UI on Klutch.sh
-
Create a Separate App for the UI
In the same project, click “New App” and select your repository.
-
Use UI Dockerfile
If you created a separate
Dockerfile.ui, you’ll need to rename it toDockerfilein a separate branch or repository, as Klutch.sh only detectsDockerfilein the root.Alternatively, create a separate repository for the UI component.
-
Configure Environment Variables
Add the following environment variable:
API_URL:https://featbit-api.klutch.sh(URL of your deployed API)
-
Configure Traffic Settings
Set the traffic type to HTTP and specify the internal port as 8081.
-
Deploy the UI
Click “Deploy” to launch the FeatBit user interface.
Configuration
Database Setup
FeatBit requires MongoDB for persistent storage. The initial connection will automatically create the necessary collections. Make sure your MongoDB instance is deployed and accessible before starting FeatBit.
See our MongoDB deployment guide for detailed setup instructions.
Redis Configuration
Redis is used for caching and real-time flag updates. FeatBit uses Redis Pub/Sub for broadcasting flag changes across multiple API instances.
Configure Redis connection string format:
host:port,password=yourpassword,ssl=false,abortConnect=falseFor Klutch.sh deployed Redis instances:
redis-app.klutch.sh:8000,password=yourredispassword,ssl=falseSee our Redis deployment guide for detailed setup instructions.
JWT Security
The JWT secret key is critical for authentication security. Generate a strong random string:
# Generate a secure random string (Linux/macOS)openssl rand -base64 32
# Or using Node.jsnode -e "console.log(require('crypto').randomBytes(32).toString('base64'))"Use this value for the JWT__SecretKey environment variable.
CORS Configuration
Configure CORS to allow your UI domain to access the API. Set CORS__Origins to include all domains that will access your API:
https://featbit-ui.klutch.sh,https://featbit.yourdomain.comMultiple origins should be comma-separated with no spaces.
Initial Setup
First Login
When you first access FeatBit, you’ll need to create an admin account:
- Navigate to your FeatBit UI at `https://featbit-ui-app.klutch.sh`
- Click **"Sign Up"** to create the first administrator account
- Enter your email address and a strong password
- The first user created automatically becomes the system administrator
Creating Your First Organization
After logging in:
- Click **"Create Organization"** in the welcome screen
- Enter your organization name (e.g., "Acme Corp" or "Development Team")
- Choose a unique organization key (used in API calls)
- Click **"Create"** to set up your organization
Creating Projects and Environments
- Click **"Create Project"** to organize your feature flags
- Enter project name (e.g., "Web App" or "Mobile App")
- FeatBit automatically creates default environments: Development, Staging, Production
- Each environment has a unique SDK key for connecting applications
Creating Feature Flags
Basic Flag Creation
- Navigate to your project and select an environment
- Click **"Create Feature Flag"**
- Enter flag details: - **Name**: User-friendly name (e.g., "New Dashboard") - **Key**: Machine-readable identifier (e.g., "new-dashboard") - **Description**: What this flag controls - **Flag Type**: Boolean, String, Number, or JSON
- Set default values: - **Default Value**: Value when flag is off - **Variations**: Different values the flag can return
- Click **"Create"** to save the flag
Targeting Rules
Create sophisticated targeting rules:
Target by User Attributes:
// User object in your application{ "key": "user-123", "name": "John Doe", "email": "john@example.com", "customAttributes": { "plan": "premium", "region": "us-west", "betaUser": true }}Create Targeting Rule:
- In flag settings, go to **"Targeting"** tab
- Click **"Add Rule"**
- Set conditions: - If `plan` equals `premium` - AND `region` equals `us-west` - Then serve variation: `true`
- Set rule priority by drag-and-drop
Percentage Rollouts:
- Create a rollout rule
- Set percentage split (e.g., 10% true, 90% false)
- Users are consistently bucketed based on user key
- Gradually increase percentage as confidence grows
User Segments
Group users with common attributes:
- Navigate to **"Segments"** in your project
- Click **"Create Segment"**
- Define segment criteria: - **Name**: "Premium Users" - **Conditions**: `plan` equals `premium` OR `plan` equals `enterprise`
- Use segments in flag targeting rules
SDK Integration Examples
JavaScript/TypeScript SDK
Installation:
npm install @featbit/js-client-sdkBrowser Usage:
import { FeatBitClient } from '@featbit/js-client-sdk';
const client = new FeatBitClient({ sdkKey: 'your-client-side-sdk-key', apiUrl: 'https://featbit-api.klutch.sh', user: { key: 'user-123', name: 'John Doe', email: 'john@example.com', customProperties: { plan: 'premium', region: 'us-west' } }});
// Wait for SDK to initializeawait client.waitForInitialization();
// Check feature flagconst showNewDashboard = client.variation('new-dashboard', false);
if (showNewDashboard) { // Show new dashboard console.log('Rendering new dashboard');} else { // Show old dashboard console.log('Rendering classic dashboard');}
// Listen for flag changesclient.on('update', (changes) => { console.log('Flags updated:', changes); // Re-render UI with new flag values});React SDK
Installation:
npm install @featbit/react-client-sdkUsage:
import { FeatBitProvider, useFeatureFlag } from '@featbit/react-client-sdk';
// Wrap your app with providerfunction App() { const user = { key: 'user-123', name: 'John Doe', customProperties: { plan: 'premium' } };
return ( <FeatBitProvider sdkKey="your-client-side-sdk-key" apiUrl="https://featbit-api.klutch.sh" user={user} > <Dashboard /> </FeatBitProvider> );}
// Use flags in componentsfunction Dashboard() { const showNewDashboard = useFeatureFlag('new-dashboard', false);
return ( <div> {showNewDashboard ? ( <NewDashboard /> ) : ( <ClassicDashboard /> )} </div> );}Node.js Server SDK
Installation:
npm install @featbit/node-server-sdkUsage:
const { FeatBitClient } = require('@featbit/node-server-sdk');
const client = new FeatBitClient({ sdkKey: 'your-server-side-sdk-key', apiUrl: 'https://featbit-api.klutch.sh'});
// Wait for initializationawait client.waitForInitialization();
// Express.js middleware exampleapp.use(async (req, res, next) => { const user = { key: req.user.id, name: req.user.name, email: req.user.email, customProperties: { plan: req.user.subscription.plan, region: req.user.region } };
// Check feature flag for this user req.features = { newAPI: await client.variation('new-api-version', user, false), rateLimit: await client.variation('rate-limit-tier', user, 'standard'), betaFeatures: await client.variation('beta-features', user, false) };
next();});
// Use in route handlersapp.get('/api/data', async (req, res) => { if (req.features.newAPI) { // Use new API implementation return res.json(await getDataV2()); } else { // Use legacy API return res.json(await getDataV1()); }});Python SDK
Installation:
pip install featbit-python-sdkUsage:
from featbit import FeatBitClient
# Initialize clientclient = FeatBitClient( sdk_key='your-server-side-sdk-key', api_url='https://featbit-api.klutch.sh')
# Wait for initializationclient.wait_for_initialization()
# Define user contextuser = { 'key': 'user-123', 'name': 'John Doe', 'email': 'john@example.com', 'customProperties': { 'plan': 'premium', 'region': 'us-west' }}
# Check feature flagshow_new_feature = client.variation('new-feature', user, False)
if show_new_feature: print('New feature enabled')else: print('Old feature active')
# Get all flags for userall_flags = client.all_variations(user)print(f'All flags: {all_flags}')
# Clean upclient.close().NET SDK
Installation:
dotnet add package FeatBit.ServerSdkUsage:
using FeatBit.Sdk.Server;
// Initialize clientvar client = new FeatBitClient(new FeatBitOptions{ SdkKey = "your-server-side-sdk-key", ApiUrl = "https://featbit-api.klutch.sh"});
// Wait for initializationawait client.WaitForInitializationAsync();
// Define uservar user = new User{ Key = "user-123", Name = "John Doe", Email = "john@example.com", Custom = new Dictionary<string, string> { { "plan", "premium" }, { "region", "us-west" } }};
// Check boolean flagbool showNewFeature = await client.BoolVariationAsync("new-feature", user, false);
if (showNewFeature){ // Enable new feature Console.WriteLine("New feature enabled");}
// Check string flagstring theme = await client.StringVariationAsync("ui-theme", user, "light");
// Check number flagint rateLimit = await client.IntVariationAsync("rate-limit", user, 100);
// Get all flagsvar allFlags = await client.AllVariationsAsync(user);A/B Testing and Experiments
Creating an Experiment
- Navigate to **"Experiments"** in your project
- Click **"Create Experiment"**
- Configure experiment: - **Name**: "Checkout Button Color Test" - **Hypothesis**: "Green button increases conversions" - **Metric**: "checkout_completed" - **Variations**: - Control: "blue" (50%) - Treatment: "green" (50%)
- Set experiment duration and traffic allocation
- Click **"Start Experiment"**
Tracking Metrics
JavaScript SDK:
// Track conversion eventclient.track('checkout_completed', { value: 99.99, currency: 'USD'});
// Track custom eventclient.track('button_clicked', { buttonId: 'checkout-primary', buttonColor: client.variation('checkout-button-color', 'blue')});Node.js SDK:
// Track metric in backendawait client.track('api_call_completed', user, { endpoint: '/api/checkout', duration: 234, success: true});Analyzing Results
- Navigate to your experiment in the FeatBit dashboard
- View real-time metrics: - Conversion rate per variation - Statistical significance - Confidence intervals
- FeatBit calculates: - P-value (statistical significance) - Relative improvement - Sample size recommendations
- Stop experiment when significance reached
- Roll out winning variation to all users
Team Collaboration
User Roles and Permissions
FeatBit supports role-based access control:
Organization Roles:
- Owner: Full access to all organization settings
- Admin: Manage projects, environments, and users
- Member: Create and modify flags in assigned projects
- Reader: View-only access to flags and settings
Project-Level Permissions:
- Navigate to **"Team"** in organization settings
- Click **"Invite Member"**
- Enter email address and select role
- Choose which projects they can access
- Send invitation
Approval Workflows
Enable approval workflows for production changes:
- Navigate to **"Settings"** → **"Approval Workflows"**
- Enable approvals for production environment
- Configure: - **Required Approvers**: Minimum number of approvals - **Reviewers**: Who can approve changes - **Bypass**: Owners can bypass approvals
- When member changes production flag: - Change request created - Reviewers notified - Requires approval before applying
Audit Logs
Track all changes to feature flags:
- Navigate to **"Audit Logs"** in your project
- View complete history: - Who made the change - What was changed - When it occurred - Before/after values
- Filter by: - User - Flag - Environment - Date range
- Export logs for compliance
Production Best Practices
High Availability Setup
Deploy multiple FeatBit API instances behind a load balancer:
- Deploy 2+ FeatBit API instances on Klutch.sh
- Configure shared MongoDB and Redis instances
- Redis Pub/Sub ensures flag changes propagate across all instances
- Use external load balancer or Klutch.sh's built-in routing
SDK Best Practices
Client-Side SDKs:
// Use streaming updates for real-time flagsconst client = new FeatBitClient({ sdkKey: 'your-sdk-key', apiUrl: 'https://featbit-api.klutch.sh', streamingEnabled: true, // Enable WebSocket streaming startWaitTime: 3000 // Maximum wait for initialization});
// Always provide default valuesconst flagValue = client.variation('feature-key', defaultValue);
// Handle initialization failure gracefullyif (!client.isInitialized()) { console.warn('FeatBit not initialized, using defaults');}Server-Side SDKs:
// Initialize once at application startupconst client = new FeatBitClient({ sdkKey: 'your-server-sdk-key', apiUrl: 'https://featbit-api.klutch.sh', pollingInterval: 30000, // Poll for updates every 30 seconds connectTimeout: 5000});
// Reuse client across requestsapp.locals.featbit = client;
// Graceful shutdownprocess.on('SIGTERM', () => { client.close(); process.exit(0);});Flag Naming Conventions
Establish consistent naming patterns:
{project}-{feature}-{type}
Examples:- web-checkout-redesign- mobile-push-notifications- api-rate-limiting- all-maintenance-modeBest Practices:
- Use kebab-case for flag keys
- Include project prefix for multi-project organizations
- Use descriptive names that explain purpose
- Archive outdated flags regularly
Environment Strategy
Development Environment:
- Use for testing new flags
- Enable flags for all developers
- Rapid iteration and experimentation
Staging Environment:
- Mirror production configuration
- Test flag changes before production
- Validate targeting rules with production-like data
Production Environment:
- Require approvals for changes
- Use gradual rollouts
- Monitor metrics closely
- Enable audit logging
Monitoring and Alerting
Monitor Flag Usage:
// Track flag evaluation countclient.on('evaluation', (flag, value) => { metrics.increment('featbit.evaluation', { flag: flag.key, value: value });});
// Monitor SDK healthsetInterval(() => { if (!client.isInitialized()) { logger.error('FeatBit SDK not connected'); alerts.notify('FeatBit SDK connection lost'); }}, 60000);Set Up Alerts:
- SDK connection failures
- High flag evaluation latency
- Unexpected flag value changes
- Failed approval workflows
Security Hardening
API Security:
# Use strong JWT secrets (minimum 32 characters)JWT__SecretKey=$(openssl rand -base64 32)
# Enable HTTPS onlyASPNETCORE_URLS=https://+:5000
# Restrict CORS to known domainsCORS__Origins=https://app.yourdomain.com,https://admin.yourdomain.com
# Enable rate limiting (if supported)RateLimit__Enabled=trueRateLimit__RequestsPerMinute=1000SDK Key Management:
- Use client-side SDK keys for public applications (read-only)
- Use server-side SDK keys for backend services (full access)
- Rotate SDK keys quarterly
- Never commit SDK keys to version control
- Use environment variables for SDK keys
Database Security:
- Enable MongoDB authentication
- Use strong passwords (minimum 16 characters)
- Enable Redis password authentication
- Restrict network access to database ports
- Regular security updates for MongoDB and Redis
Backup and Disaster Recovery
MongoDB Backups:
# Backup all flag configurationsmongodump --uri="mongodb://user:pass@mongodb-app.klutch.sh:8000/featbit" --out=/backups/featbit-$(date +%Y%m%d)
# Restore from backupmongorestore --uri="mongodb://user:pass@mongodb-app.klutch.sh:8000" /backups/featbit-20250101Configuration Export:
- Navigate to project settings
- Click **"Export Configuration"**
- Download JSON file with all flags
- Store in version control or secure backup
Disaster Recovery Plan:
- Document MongoDB and Redis connection strings
- Backup flag configurations weekly
- Test restoration process quarterly
- Keep emergency contact list for team members
- Document rollback procedures
Troubleshooting
API Connection Issues
Problem: SDK cannot connect to FeatBit API
Solutions:
// Check API URL configurationconsole.log('API URL:', client.config.apiUrl);
// Verify network connectivityfetch('https://featbit-api.klutch.sh/health') .then(res => res.json()) .then(data => console.log('API Health:', data)) .catch(err => console.error('Connection failed:', err));
// Enable debug loggingconst client = new FeatBitClient({ sdkKey: 'your-sdk-key', apiUrl: 'https://featbit-api.klutch.sh', logger: { debug: (msg) => console.log('[DEBUG]', msg), error: (msg) => console.error('[ERROR]', msg) }});Check Environment Variables:
# Verify CORS configuration allows your domainecho $CORS__Origins
# Verify API is accessiblecurl https://featbit-api.klutch.sh/healthMongoDB Connection Errors
Problem: API cannot connect to MongoDB
Solutions:
- Verify MongoDB is running and accessible on port 8000
- Check connection string format: ```bash mongodb://username:password@mongodb-app.klutch.sh:8000/featbit?authSource=admin ```
- Test connection from API container: ```bash # Inside API container mongosh "mongodb://user:pass@mongodb-app.klutch.sh:8000/featbit" ```
- Check MongoDB authentication: ```javascript // Ensure user has proper permissions db.createUser({ user: "featbit", pwd: "securepassword", roles: [{ role: "readWrite", db: "featbit" }] }); ```
Redis Connection Issues
Problem: Real-time flag updates not working
Solutions:
- Verify Redis connection string format: ``` redis-app.klutch.sh:8000,password=yourpassword,ssl=false,abortConnect=false ```
- Test Redis connectivity: ```bash redis-cli -h redis-app.klutch.sh -p 8000 -a yourpassword PING ```
- Check Redis authentication: ```bash # In Redis configuration requirepass yourredispassword ```
- Monitor Redis Pub/Sub: ```bash redis-cli -h redis-app.klutch.sh -p 8000 -a yourpassword > SUBSCRIBE featbit:* ```
Flag Not Updating in Real-Time
Problem: Changes in FeatBit UI don’t reflect in application
Solutions:
- Verify SDK streaming is enabled: ```javascript const client = new FeatBitClient({ streamingEnabled: true, // Must be true for real-time updates pollingInterval: 30000 // Fallback polling }); ```
- Check WebSocket connection: ```javascript client.on('connection', (status) => { console.log('FeatBit connection status:', status); }); ```
- Verify Redis Pub/Sub is working between API instances
- Clear SDK cache: ```javascript await client.reinitialize(); ```
High Latency Issues
Problem: Flag evaluation takes too long
Solutions:
- Enable SDK caching: ```javascript // Client-side SDK caches flags locally // Server-side SDK keeps flags in memory ```
- Reduce polling interval for server SDKs: ```javascript const client = new FeatBitClient({ pollingInterval: 60000 // Poll every 60 seconds instead of default }); ```
- Optimize targeting rules: - Simplify complex rules - Reduce number of conditions - Use segments instead of repeated conditions
- Scale FeatBit API horizontally: - Deploy multiple API instances - Use load balancer - Scale MongoDB/Redis if needed
CORS Errors in Browser
Problem: Browser blocks API requests due to CORS
Solution:
# Update CORS__Origins to include all UI domainsCORS__Origins=https://featbit-ui.klutch.sh,https://app.yourdomain.com,http://localhost:8081
# Redeploy API with updated environment variableSDK Key Issues
Problem: “Invalid SDK key” error
Solutions:
- Verify you're using correct SDK key type: - **Client-side keys**: Start with `client-` (for browser/mobile) - **Server-side keys**: Start with `server-` (for backend)
- Check environment matches SDK key: - Development SDK key only works in dev environment - Production SDK key only works in production environment
- Generate new SDK key if compromised: - Navigate to environment settings - Click **"Generate New SDK Key"** - Update applications with new key
Additional Resources
- Official FeatBit Website
- FeatBit Documentation
- FeatBit GitHub Repository
- SDK Documentation
- Community Discussions
- MongoDB Deployment Guide
- Redis Deployment Guide
- Klutch.sh Persistent Volumes
- Klutch.sh Networking
With FeatBit deployed on Klutch.sh, you have complete control over your feature flag infrastructure. Start with simple boolean flags, then progress to sophisticated experiments, gradual rollouts, and data-driven feature development. The combination of FeatBit’s powerful feature management and Klutch.sh’s reliable infrastructure gives your team the foundation for confident, controlled deployments.