For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • Contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
      • Create environments
      • Edit environment settings
      • Delete environments
      • Clone environments
      • SDK credentials
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Overview
  • Edit environment settings
  • TTL settings
Your accountEnvironments

Edit environment settings

Was this page helpful?
Previous

Delete environments

Next
Built with

Overview

This topic explains how to edit environment settings in LaunchDarkly.

Each environment has its own settings that control how LaunchDarkly behaves for that stage of your development lifecycle. You can configure safeguards to protect critical environments, manage SDK credentials, and set flag change approval requirements. Keeping these settings configured correctly helps your team ship with confidence and reduces the risk of unintended changes reaching production.

Edit environment settings

To view or update environment settings:

  1. Click the project dropdown. The project menu appears:

The project menu.

The project menu.
  1. Select Project settings.
  2. Select Environments. The Environments list appears.
  3. Click the three-dot overflow menu next to your environment.
  4. Select Edit environment.
  5. Update settings using the Overview, Approvals, or SDK keys tabs.
  6. Save or cancel your changes before changing tabs or leaving the page.

Use the SDK keys tab to view, create, and manage SDK credentials for the environment. Customers on an Enterprise or Guardian plan can use multiple SDK keys and multiple mobile keys within one environment at the same time. To learn more, read SDK credentials.

The Overview tab includes the following settings:

SettingDescriptionLearn more
NameThe environment name
TagsCustomizable labels used for categorizationTags
Critical environmentAn environment that affects your customers or the health of your systemsCritical environments
Require commentsWhether to require a comment before saving flag or segment changesRequired comments
Require confirmationWhether to require entering the name of the environment before saving flag or segment changesRequired confirmation
Enable secure modeEnsures that one end user cannot inspect flag variations for another end user when you use some client-side SDKsSecure mode
Send detailed events to Data Export destinationsWhether to export evaluation events for end users that encounter the flagData Export
TTLNumber of minutes that the PHP SDK can cache feature flag rules locallyTTL settings
Environment ColorThe color used to indicate this environment in the LaunchDarkly UI

Manage flag change and segment approval settings from the Approvals tab. To learn more, read Configuring approvals for an environment.

Use the SDK keys tab to create new SDK or mobile keys. To learn more, read Environment and SDK keys.

TTL settings

TTL settings are only used in the PHP SDK

This setting controls how long the PHP SDK can cache feature flag rules locally. You only need to configure this if you are using the PHP SDK.

Each environment also has a time-to-live (TTL) setting. This sets the number of minutes that the PHP SDK can cache feature flag rules locally. The TTL is only used in the PHP SDK, because PHP’s shared-nothing architecture makes LaunchDarkly’s streaming model impossible. To learn more, read the PHP SDK reference.

For customers using PHP, we recommend setting your TTL to at least five minutes in production environments. This lets the PHP SDK cache feature flag rules for five minutes, so most calls to variation will not make a remote request. The tradeoff is that changes you make to your feature flag rules on your Flags list will not take effect for five minutes.

If your site has relatively low traffic (fewer than one request per minute), you may wish to increase the TTL to five minutes or more to take better advantage of the local cache.

If the TTL is set to zero minutes, the SDK will not use a local cache, and every call to variation will make a remote request to our CDN. You can set your TTL to zero in testing environments so it reflects changes immediately, but we do not recommend a zero minute TTL in production.

In high volume PHP environments, we strongly recommend using our Relay Proxy. To learn more, read The Relay Proxy.

To set the TTL:

  1. Click the project dropdown. The project menu appears.
  2. Select Project settings.
  3. Select Environments. The Environments list appears.
  4. Click the three-dot overflow menu next to your environment.
  5. Select Edit environment.
  6. Click the Overview tab if it is not already selected.
  7. Enter a value in the TTL input (0-60 minutes) field.
  8. Click Save environment.