Skip to content

Production

Run your application with one platform secret: ENVLET_TOKEN. The token identifies one project environment, so your host does not need more Envlet configuration.

At startup, Envlet resolves the values that the token’s identity may read. Shared values stay shared, overrides replace them, and withheld values do not enter the workload.

  1. Open the Envlet dashboard and create a token for the production environment.

  2. Choose the token TTL. Every token expires, and the maximum TTL is 366 days.

  3. Copy the token when Envlet shows it. Envlet shows the raw token once and stores only its digest.

  4. Add the token to your host platform as ENVLET_TOKEN. Do not put it in your image or repository.

  5. Start the workload with one of the methods below.

Install the SDK:

Terminal window
npm install @envlet/sdk

Inject values before you import the rest of your application:

import { inject } from "@envlet/sdk";
await inject();
await import("./app.js");

inject() sets process.env in Node. Values already set by the host win by default. Use await inject({ override: true }) when Envlet must replace them.

The SDK fetches values once at boot. Restart the process to pick up changes. It retries briefly after network errors and server errors, then throws a typed error instead of returning stale or partial values.

See the Node SDK reference for load(), get(), and the error types.

Envlet emails your organization 30, 7, and 1 days before a token expires. Use that time to replace the token before the workload loses access.

For a planned rotation:

  1. Create a replacement token for the same environment and choose its TTL.

  2. Replace ENVLET_TOKEN in the host platform.

  3. Restart or redeploy the workload so it starts with the replacement token.

  4. Revoke the old token in the dashboard.

Revocation is immediate. A leaked token can open only the project environment that it identifies, and it cannot be used after revocation or expiry.

Keep production credentials away from coding agents

Section titled “Keep production credentials away from coding agents”

Give each coding agent its own Envlet identity and token. Do not give an agent the production workload token.

Set each variable to shared, overridden, or withheld for that agent. Withhold production credentials that the agent does not need, or give it a separate value for the same variable name.

Each agent token works for one project environment and expires. This keeps the agent’s access separate from human, CI, and production runtime access.

Review Security for encryption, token storage, and resolution audit details.