Skip to Content
Self HostingConfiguration

Configuration

Each service is configured via a .env file in its directory. Copy the example files and edit them.

elster-terminal-backend

cd elster-terminal-backend cp .env.example .env

Required Variables

VariableDescriptionExample
HOSTBind address0.0.0.0
PORTListen port8000
NEXTAUTH_SECRETShared secret with frontend (must match)Random 32+ char string
FRONTEND_URLFrontend URL for CORShttp://localhost:3000
ALLOWED_ORIGINSJSON array of allowed CORS origins["http://localhost:3000"]
BUILDS_PATHDirectory for git worktrees during builds/home/user/elster-builds
BUILD_ISO_REPO_URLSSH URL for build-iso-public repogit@github.com:org/build-iso-public.git
BUILD_ISO_UBUNTU_REPO_URLSSH URL for build-iso-ubuntu repogit@github.com:org/build-iso-ubuntu.git
CLAUDE_CODE_PATHPath to Claude Code CLI binaryclaude
CLAUDE_WORKING_DIRWorking directory for Claude subprocesses/home/user/elster-builds
LIBVIRT_BACKEND_URLURL of cto-gui-libvirt-backendhttp://localhost:8001

Optional Variables

VariableDescriptionDefault
DEBUGEnable debug modefalse
DATA_FILE_PATHPath to users.json./data/users.json
LOG_DIR_PATHLog directory./data/logs
GIT_SSH_KEY_PATHSSH key for git operationsSystem default
WORKER_CONCURRENCYMax concurrent builds4
ORCHESTRATOR_ENABLEDEnable build orchestratortrue
INSTRUCTIONS_DIRAI instruction templates./instructions
OBS_API_URLOpen Build Service URL (Elster OS only)
OBS_API_USEROBS username
OBS_API_PASSWORDOBS password
OPENQA_API_URLopenQA URL
GITHUB_CLIENT_IDGitHub OAuth app ID
GITHUB_CLIENT_SECRETGitHub OAuth secret
SMTP_HOSTSMTP server for notifications
SMTP_PORTSMTP port465
SMTP_USERSMTP username
SMTP_PASSWORDSMTP password
NOTIFICATIONS_ENABLEDEnable email notificationsfalse
SUPER_ADMIN_EMAILSComma-separated admin emails
GUEST_MAX_AGE_DAYSAuto-cleanup guest accounts after N days30

cto-gui-libvirt-backend

cd cto-gui-libvirt-backend cp .env.example .env
VariableDescriptionExample
HOSTBind address0.0.0.0
PORTListen port8001
KVM_URILibvirt connection URIqemu:///system
NEXTAUTH_SECRETMust match frontend and backendSame secret
ALLOWED_ORIGINSCORS origins["http://localhost:3000"]
ELSTER_API_URLURL of elster-terminal-backendhttp://localhost:8000
BENCHMARK_DIRCIS benchmark definitions./benchmarks
BENCHMARK_STORAGE_DIRBenchmark results./data/benchmarks
TEST_STORAGE_DIRTest results./data/tests
LOG_DIR_PATHLog directory./data/logs

For remote KVM hosts, use an SSH URI:

KVM_URI=qemu+ssh://user@kvm-host/system

web-terminal-backend

cd web-terminal-backend cp .env.example .env
VariableDescriptionExample
PORTListen port8002
NEXTAUTH_SECRETMust match other servicesSame secret
HOSTS_FILESSH host definitions./data/hosts.json
SSH_KEYS_DIRSSH private keys directory./data/keys

elster-terminal (frontend)

cd elster-terminal cp .env.local.example .env.local
VariableDescriptionExample
NEXTAUTH_SECRETMust match all backendsSame secret
NEXTAUTH_URLPublic URL of the frontendhttp://localhost:3000
API_URLBackend API URL (server-side)http://localhost:8000
NEXT_PUBLIC_API_URLBackend API URL (client-side)http://localhost:8000
GOOGLE_CLIENT_IDGoogle OAuth (optional)
GOOGLE_CLIENT_SECRETGoogle OAuth (optional)

Shared Secret

The NEXTAUTH_SECRET value must be identical across all services. Generate one:

openssl rand -base64 32

Next Steps

With configuration complete, proceed to Running Services.