Skip to Content
Self HostingConfiguration

Configuration

The public self-hosted configuration is the checked-in cto-gui/docker-compose.self-hosted.yml plus settings read by the cto-gui-libvirt-backend. This page documents that evaluation surface. It does not invent a generic Enterprise environment contract.

Compose Contract

SettingChecked-in valuePurpose
SELF_HOSTEDtrueSelect local-console mode and disable cloud-dependent routes
KVM_URIqemu:///systemConnect to the host system libvirt daemon
TEST_STORAGE_DIR/app/data/testsRetain test state, locks, and cleanup journals in cto-data
SOURCE_ISO_DIRHost source-ISO pathResolve read-only source artifacts at the same absolute path visible to host libvirt
SOURCE_GOLDEN_IMAGE_DIRHost promoted-image pathResolve immutable installed QCOW2 inputs at the same absolute path visible to host libvirt
TRUST_PROXY_HEADERStrue in the Compose filePermit proxy-derived client information subject to the backend’s trusted-proxy rules

The backend also defaults ISO uploads to /var/lib/libvirt/images and limits uploads to 10 GB unless the backend setting is deliberately changed.

Host Path Overrides

Two shell environment variables affect Compose bind mounts:

export SOURCE_ISO_HOST_DIR=/srv/openfactory/source-isos export SOURCE_GOLDEN_IMAGE_HOST_DIR=/srv/openfactory/golden-images docker compose -f docker-compose.self-hosted.yml up --build -d

Create and permission those directories first. The container path is kept identical to the host path because host libvirt, not the container, opens image files for QEMU. A path that exists only inside the container will fail at guest launch time.

Persistent and Non-Persistent Data

LocationOwnership and lifecycle
/var/lib/libvirt/imagesHost-managed uploaded ISOs, guest disks, and overlays
Source ISO directoryOperator-managed, mounted read-only
Golden-image directoryOperator-promoted immutable inputs, mounted read-only
cto-data named volumeBackend state including test records and cleanup journals
Container filesystem outside mountsDisposable; do not rely on it for recovery

Back up or snapshot only after identifying which resources must be retained. The Compose file does not schedule backups.

Exposure and Proxy Settings

The frontend maps host port 80. TRUST_PROXY_HEADERS does not provide TLS or authentication; it only changes how the backend accepts forwarded connection metadata from explicitly trusted proxy ranges. If you add a reverse proxy, configure its network path and trusted proxies narrowly and verify spoofed forwarding headers are rejected from untrusted peers.

Do not place the evaluation console directly on the public internet. A production identity, TLS, secrets, and authorization design is a separate deployment decision.

Validate Every Change

After changing paths or settings:

  1. recreate the affected container;
  2. verify self_hosted: true through the mode endpoint;
  3. upload and launch a disposable ISO;
  4. stop and delete the guest;
  5. restart the stack and confirm cleanup state and inventory survive.