Start the instance with environment variables
Set the environment before you start the daemon to choose where it listens, which database it uses and where it keeps its files.
Where to set them
Set each variable in the environment of the process you start, before that process starts. Defaults below are for a local installation.
For an installed service, the installer writes the protected database URL and the pinned instance paths to /etc/elowen/instance.env, and the installed services load that file.
Warning: Keep connection credentials out of command arguments and logs.
elowen setup configures a local installation, and elowen doctor checks whether it is ready.
Variable reference
| Variable | Default | Purpose |
|---|---|---|
ELOWEN_HOST |
127.0.0.1 |
Daemon bind address. |
ELOWEN_PORT |
4400 |
Daemon HTTP port. |
ELOWEN_DATABASE_URL |
Required; no default | Protected PostgreSQL connection URL. |
ELOWEN_INSTANCE_ROOT |
$HOME/.config/elowen |
Absolute, canonical directory for instance files. |
ELOWEN_LOG_DIR |
<instance root>/logs |
Log directory. |
ELOWEN_LOG_LEVEL |
info |
Minimum file and console log level. |
ELOWEN_PROJECT |
elowen |
Default project name. |
ELOWEN_PROJECT_PATH |
$PWD; the service home for installed services |
Default project path. |
ELOWEN_DAEMON_URL |
unset for the CLI | Explicit daemon origin for direct CLI access and the web process. With ELOWEN_URL, it overrides CLI hooks and the live connection. |
ELOWEN_URL |
unset | Public CLI instance origin or its /api base. Without either URL variable, the CLI uses the local daemon. |
ELOWEN_AUTOSTART |
1 |
Set to 0 to stop the CLI from starting a daemon. |
ELOWEN_BOOTSTRAP_USER |
unset | Initial administrator username; requires the password variable too. |
ELOWEN_BOOTSTRAP_PASS |
unset | Initial administrator password; requires the username variable too. |
PI_OFFLINE |
unset | Any value stops the background worker from fetching public model catalogs. |
Web process and ports
The packaged launcher uses ELOWEN_WEB_PORT, 4500 by default. The web server itself reads PORT and HOSTNAME.
The daemon and the web interface are separate processes, so each one needs its own environment.
First administrator
ELOWEN_BOOTSTRAP_USER and ELOWEN_BOOTSTRAP_PASS create the first administrator without the setup page. Both are required together.
That account starts with every core tool, every tool of an enabled plugin, every user-grantable plugin and All models, because no other administrator exists yet to grant them.
Hosts without internet access
PI_OFFLINE set to any value stops the background worker from fetching the model catalog from pi.dev and the Fast-mode model list from models.dev.
Providers configured for chat are still asked for their own model lists, so a local or private provider keeps working.