Fixes #7738

/claim #7738

What this does

Adds the ability to set environment variables on a per-server basis. These get injected into every application deployed on that server, so apps can tell which server they’re running on in multi-server deployments.

The priority order is: system defaults -> server env vars -> app env vars, meaning app-level vars can override server-level ones.

Also auto-injects COOLIFY_SERVER_NAME and COOLIFY_SERVER_UUID into all deployments by default (no config needed).

Changes

  • New server_environment_variables table + ServerEnvironmentVariable model
  • environmentVariables() relationship on the Server model
  • “Environment” tab in the server navbar with full CRUD UI
  • Injection into both runtime and buildtime env var generation in ApplicationDeploymentJob
  • Injection in parsers.php for service/compose-based deployments
  • Cleanup on server deletion

How to test

  1. Go to any server page, click “Environment” tab
  2. Add a variable like MY_SERVER=server-1
  3. Deploy any app on that server
  4. Check that MY_SERVER and COOLIFY_SERVER_NAME / COOLIFY_SERVER_UUID are available inside the container
  5. If the app also defines MY_SERVER, the app-level value should win

Claim

Total prize pool $111
Total paid $0
Status Pending
Submitted February 18, 2026
Last updated February 18, 2026

Contributors

28

285729101

@285729101

100%

Sponsors

PR

Praveen Pendyala

@pkpio

$111