Env Files

An env file stores a list of KEY=VALUE environment variables in the Bahriya platform. The content is validated on upload, versioned, and delivered to your containers as environment variables.

Updated 23 Jun 20262 min read

An env file stores a list of KEY=VALUE environment variables in the Bahriya platform. The content is validated on upload, versioned, and delivered to your containers as environment variables.

When to use an env file

  • Your application reads configuration from environment variables and you have more than a handful to manage
  • You want to share the same set of variables across multiple containers without re-entering them on each container form
  • You need to change configuration values without rebuilding your container image
  • You want to version and roll back environment variable changes

For one-off variables on a single container, use the container's inline Env Vars accordion instead — those stay free. Env files are billable because they're a reusable, version-managed resource.

What Bahriya stores

When you upload an env file, Bahriya validates the syntax (one KEY=VALUE per line, comments and blank lines allowed) and stores the content alongside metadata:

FieldDescription
NameA human-readable display name
HandleA DNS-1123-compliant identifier (immutable after creation)
ContentThe full env-file content, validated as KEY=VALUE lines
Entry countThe number of variables parsed from the content

Env file content is shown back in the console, API responses, and CLI output when you view the detail of an env file.

Injecting into containers

When you attach an env file to a container, every variable in the file is injected as a separate environment variable at runtime. There is no file mount — your application reads the variables the same way it reads any other environment variable.

For example, an env file containing:

DB_HOST=db.example.com
DB_PORT=5432
LOG_LEVEL=info

Makes DB_HOST, DB_PORT, and LOG_LEVEL available inside the container process. No file path to configure.

Rotation

Rotation creates a new version of the env file. The previous version is retained for rollback. After rotation:

  • Containers must restart to pick up new environment variable values. Environment variables are read once at process start.
  • Use the Redeploy button on the Consumers panel to restart all attached containers, or redeploy individual containers manually.

Pricing

Env files are billed at $0.01 per month while they exist, plus $0.05 per region per month when attached to a project.

See also