Skip to main content
Every project unit loads <work_dir>/.env through EnvironmentFile=-<work_dir>/.env. The - prefix means the service still starts if the file does not exist. The panel edits this file for you.

Edit variables

1

Open the editor

Select a project and press .env (Edit .env) in the toolbar. The terminal switches to EDIT_ENV mode and loads the saved contents.
2

Edit and save

Write one KEY=value per line, the format systemd expects for EnvironmentFile=, then press SAVE_ENV. CANCEL discards your edits.
.env
3

Restart the service

systemd reads EnvironmentFile= only when the service starts. Press Restart or run a deploy to apply the new values.

How it is stored

Saving runs POST /api/projects/:id/env, which:
  1. Resolves the working directory (work_dir, or /opt/<service_name>) through validateWorkDir. System directories and the filesystem root are rejected.
  2. Saves the text in the env_vars column of the projects table in aeros.db.
  3. If the working directory exists, writes it to <work_dir>/.env with mode 0600.
Responses from both the read and write endpoints carry Cache-Control: no-store, so the browser does not cache your secrets. Values are never written to the panel’s logs.
The editor loads what the panel saved last, from SQLite. It does not read <work_dir>/.env from disk. If you edit the file by hand over SSH, the editor will not show those changes, and the next save from the panel overwrites them.

Protect the copies

The same values exist in two places, so protect both:
  • <work_dir>/.env, written as 0600 and owned by root. If the unit sets User=, systemd still reads the file as root before dropping privileges, so the service user does not need read access to it.
  • aeros.db, which the installer sets to 0600. Include it in a backup job and treat those archives as secrets too.
Add .env to your app’s .gitignore. An untracked .env is left alone by git pull and by the git reset --hard that rollback runs. A tracked one would be overwritten.