v0.11.0

Configuration

Last updated


This page lists every environment variable the CLI and the API server read, and how .env is loaded.

Loading Rules


Both the CLI and the API server call godotenv.Load() on startup to read .env from the current working directory. A missing file only logs a warning, and system environment variables still apply.
  1. cp .env.expample .env

CLI Variables


VariableRequiredDescription
PODRUN_SERVERYesRemote hostname or IP
PODRUN_USERNAMEYesRemote SSH user
PODRUN_PASSWORDYesRemote SSH password, passed to sshpass -p

If any is missing, CheckENV() returns missing required environment: <variables> and the CLI aborts. The SSH address is $PODRUN_USERNAME@$PODRUN_SERVER.

API Server Variables


VariableRequiredDefaultDescription
DB_PATHNoInside a container: /data/database.db; otherwise ~/.podrun/database.dbSQLite file path
ALLOW_EMAILSNo—Listed in .env.expample; the matching user-management code is currently disabled

Fixed Values


These values are hard-coded and cannot be configured:
ItemValue
Remote root folder/home/podrun
API server listen address:8080
CLI report addresshttp://localhost:8080
Schema filesql/create.sql (relative to the working directory)
SSH connection test timeoutConnectTimeout=3

Example


  1. PODRUN_SERVER=192.168.1.100
  2. PODRUN_USERNAME=podrun
  3. PODRUN_PASSWORD=yourpassword
  4. DB_PATH=/var/lib/podrun/database.db
中文