Create environments
Read time: 3 minutes
Last edited: Oct 03, 2024
Overview
This topic explains how to create environments in LaunchDarkly.
Create environments
You can manage your environments from a project's Environments page. Here, you can add new environments to a project, for example, to give each developer on your team their own environment for local testing.
To add a new environment:
- Click the project dropdown. The project menu appears:
- Select Project settings.
- Select Environments. The Environments list appears.
- Click Add environment. The "Create an environment" panel appears.
Confirm you're creating the environment in the project where you want it to live. You cannot move an environment from one project to another.
- Give your environment a human-readable Name.
- (Optional) Give your environment a unique Key. This field populates automatically based on your name, but you can change it now if you wish.
- (Optional) Add Tags.
- (Optional) Select the Critical environment checkbox to indicate this environment affects your customers or the health of your systems.
- (Optional) Select the Require comments for flag and segment changes checkbox to force members who modify flags and segments to leave a comment to explain their changes.
Requiring members to leave comments when they change flags or segments helps your organization understand why flags or segments look and behave certain ways.
When Require comments is enabled, members must leave a comment to explain their changes when they make changes from the Flags list in the LaunchDarkly user interface (UI). Comments are not required for changes made with the LaunchDarkly API.
Required comments is available to customers on an Enterprise plan. To learn more, read Required comments.
- (Optional) Select the Require confirmation for flag and segment changes checkbox to force members who modify flags and segments to verify they wish to make these changes.
Requiring members to confirm that they wish to make changes may help them from changing the wrong flag or segment inadvertently. To learn more, read Required confirmation.
- (Optional) Select the Enable secure mode checkbox to ensure an end user of a client-side SDK cannot impersonate another end user.
- (Optional) Select the Send detailed events to data export destinations checkbox to enable Data Export for every flag created in this environment after this checkbox is selected. To learn more, read Data Export.
- (Optional) Specify a TTL between 0 and 60 minutes. TTL, or Time to Live, is a setting in DNS records that dictates how long the record should be cached by nameservers and browsers.
The TTL setting checkbox only applies to environments using the PHP SDK. To learn more, read TTL settings.
- (Optional) Choose a Color to differentiate this environment from other environments.
- Click Create environment:
The new environment appears on the Account settings page.
By default, LaunchDarkly allows you to create 300 environments per project, for Foundation or Enterprise plans. You can create more upon request, free of charge. To learn more, read How to right size when you are over LaunchDarkly system resource count limits.
If you are on a Developer plan, your account may be limited to three environments. If you are on a legacy Starter plan, your account may be limited to two environments.
You can also use the REST API: Create environment