No results for ""
EXPAND ALL
  • Home
  • API docs

Create environments

Read time: 3 minutes
Last edited: Aug 16, 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:

  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 Add environment. The "Create an environment" panel appears.
Make sure you're in the right project

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.

  1. Give your environment a human-readable Name.
  2. (Optional) Give your environment a unique Key. This field populates automatically based on your name, but you can change it now if you wish.
  3. (Optional) Add Tags.
  4. (Optional) Select the Critical environment checkbox to indicate this environment affects your customers or the health of your systems.
  5. (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.
Comments help establish a change history

Requiring members to leave comments when they change flags or segments helps your organization understand why flags or segments look and behave certain ways.

Required comments are only enforced from the Flags list

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.

  1. (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.
Confirm changes helps prevent mistakes

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.

  1. (Optional) Select the Enable secure mode checkbox to ensure an end user of a client-side SDK cannot impersonate another end user.
  2. (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.
  3. (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.
Specify a TTL if you use the PHP SDK

The TTL setting checkbox only applies to environments using the PHP SDK. To learn more, read TTL settings.

  1. (Optional) Choose a Color to differentiate this environment from other environments.
  2. Click Create environment:
The "Create an environment" panel.
The "Create an environment" panel.


The new environment appears on the Account settings page.

Environment limits

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