lift env
Manage environment variables on your server with secure storage, automatic backups, and push/pull support.
lift env
Manage environment variables on your server. Variables are stored in /opt/lift/envs/<app>.env with strict permissions (mode 600, owned by root). Before every write, a timestamped backup is created automatically.
Subcommands
lift env set <KEY=value...>
Set one or more environment variables. If the key already exists, it is updated. New keys are appended.
lift env set PORT=3000 NODE_ENV=production
lift env set DATABASE_URL=postgres://user:pass@localhost:5432/mydb
lift env unset <KEY...>
Remove one or more environment variables by key name.
lift env unset DEBUG LEGACY_TOKEN
lift env list
List all environment variable keys (values are hidden for security).
$ lift env list
Environment variables for my-api:
PORT
NODE_ENV
DATABASE_URL
REDIS_URL
4 variable(s)
lift env push
Upload a local .env file to the server, replacing all existing variables.
| Flag | Description | Default |
|---|---|---|
-f, --file <path> | Path to local env file | .env |
lift env push
lift env push -f .env.production
lift env pull
Download the server's env file to a local file.
| Flag | Description | Default |
|---|---|---|
-f, --file <path> | Output file path | .env |
lift env pull
lift env pull -f .env.local
Info: After changing env variables, restart your containers to apply:
lift push --no-build