Skip to main content

Configuration Sources

Loom server loads configuration from multiple sources with the following precedence (highest to lowest):
  1. Environment variables (LOOM_SERVER_*)
  2. Configuration file (/etc/loom/server.toml)
  3. Built-in defaults
All configuration can be set via environment variables, NixOS module options, or TOML file.

HTTP Server

Basic Settings

string
default:"127.0.0.1"
Address to bind the HTTP server to. Use 0.0.0.0 to listen on all interfaces.
integer
default:"8080"
Port to listen on.
string
default:"http://localhost:8080"
Base URL of the server (e.g., https://loom.example.com). Used for OAuth redirect URIs and email links.

Example

Database

string
default:"sqlite:loom.db"
SQLite database connection string. Must start with sqlite:.

SQLite Options

Database migrations run automatically on server startup. The server will fail to start if migrations fail.

LLM Providers

Configure at least one LLM provider. The server supports Anthropic, OpenAI, Vertex AI, and Z.ai.

Anthropic Claude

string
Anthropic API key (starts with sk-ant-).
string
default:"claude-sonnet-4-20250514"
Model identifier to use.
boolean
default:"false"
Enable OAuth pool mode for Claude Max subscriptions (mutually exclusive with API_KEY).
string
default:"/var/lib/loom-server/anthropic-credentials.json"
Path to OAuth credential store when using pool mode.

OpenAI

string
OpenAI API key (starts with sk-).
string
default:"gpt-4o"
Model identifier to use.
string
OpenAI organization ID for enterprise accounts.

Vertex AI (Google)

string
Path to Google Cloud service account credentials JSON file.
string
Google Cloud project ID.
string
default:"us-central1"
Google Cloud region.

Z.ai (ZhipuAI)

string
Z.ai API key.
string
default:"glm-4.7"
Model identifier to use.

Authentication

General Settings

boolean
default:"false"
Disable new user signups. Existing users can still log in.
boolean
default:"false"
Enable development mode (auto-authenticate without OAuth). Never use in production.
string
default:"en"
Default locale for emails and user-facing content (en, es, ar).

GitHub OAuth

string
GitHub OAuth application client ID.
string
GitHub OAuth application client secret.
string
OAuth callback URL. Defaults to {baseUrl}/auth/github/callback.

Google OAuth

string
Google OAuth application client ID.
string
Google OAuth application client secret.
string
OAuth callback URL. Defaults to {baseUrl}/auth/google/callback.

Okta OAuth (Enterprise SSO)

string
Okta domain (e.g., your-org.okta.com).
string
Okta OAuth application client ID.
string
Okta OAuth application client secret.

Weaver Provisioning

boolean
default:"false"
Enable Kubernetes-based weaver provisioning.
string
default:"loom-weavers"
Kubernetes namespace for weavers.
string
default:"/etc/rancher/k3s/k3s.yaml"
Path to kubeconfig file.
integer
default:"1800"
Interval in seconds between cleanup runs for expired weavers.
integer
default:"4"
Default TTL in hours for weavers.
integer
default:"48"
Maximum TTL in hours for weavers.
integer
default:"64"
Maximum number of concurrent weavers.
integer
default:"60"
Timeout in seconds waiting for weaver to become ready.
string
Comma-separated list of Kubernetes secret names for pulling private images (e.g., ghcr-secret).

Audit Sidecar

boolean
default:"true"
Enable eBPF audit sidecar for weavers.
string
default:"ghcr.io/ghuntley/loom-audit-sidecar:latest"
Container image for audit sidecar.
integer
default:"100"
Event batch interval in milliseconds.
integer
default:"268435456"
Maximum local buffer size in bytes (256 MB).

SMTP Email

string
default:"127.0.0.1"
SMTP server hostname.
integer
default:"2525"
SMTP server port.
string
SMTP username for authentication.
string
SMTP password for authentication.
string
Email address to send from (e.g., noreply@example.com).
string
default:"Loom"
Display name for sent emails.
boolean
default:"false"
Use TLS for SMTP connection.

GitHub App Integration

string
GitHub App ID.
string
GitHub App private key (PEM format).
string
GitHub webhook secret for verifying payloads.
string
default:"loom"
GitHub App slug (appears in installation URLs).
string
default:"https://api.github.com"
GitHub API base URL (for GitHub Enterprise Server).

Search Providers

Google Custom Search Engine

string
Google API key.
string
Google Custom Search Engine ID.

Serper.dev

string
Serper API key.

Background Jobs

boolean
default:"false"
Enable email alerts for job failures.
string
Comma-separated list of email recipients for job failure alerts.
integer
default:"90"
Number of days to retain job run history.
integer
default:"3600"
Interval in seconds between session cleanup runs.
integer
default:"900"
Interval in seconds between OAuth state cleanup runs.

Git Repository Maintenance

boolean
default:"true"
Enable periodic git maintenance (gc, prune, repack, fsck) on SCM repositories.
integer
default:"86400"
Interval in seconds between maintenance runs (24 hours).
integer
default:"100"
Delay in milliseconds between processing each repository.

SCIM Provisioning

boolean
default:"false"
Enable SCIM 2.0 provisioning for enterprise IdP integration.
string
SCIM bearer token shared with your IdP (e.g., Okta).Generate with: openssl rand -base64 32
string
UUID of the organization to provision users into.

Weaver Secrets System

string
Path to file containing master encryption key (256-bit, base64-encoded).Generate with: openssl rand -base64 32 > /run/secrets/loom-master-key
string
Path to file containing SVID signing key (Ed25519 PEM). Auto-generated if not set.Generate with: openssl genpkey -algorithm Ed25519 -out /run/secrets/svid-signing-key.pem
integer
default:"900"
TTL in seconds for issued SVID tokens (15 minutes).
boolean
default:"true"
Verify weaver Pods exist in Kubernetes before issuing SVIDs.

GeoIP Lookup

string
default:"/var/lib/GeoIP/GeoLite2-City.mmdb"
Path to MaxMind GeoIP database file.

Logging

string
default:"info"
Log level: trace, debug, info, warn, error.

Structured Logging

Loom uses structured logging with automatic secret redaction:

Paths

string
default:"/var/lib/loom"
Base directory for data storage (repos, uploads, etc.).
string
Directory containing CLI binaries for distribution at /bin/{platform}.
string
Path to docs-index.json for documentation search.

NixOS Configuration

All environment variables can be set via the NixOS module:
configuration.nix

Validation

The server validates configuration on startup:
  • Dev mode + production: Fails if LOOM_SERVER_AUTH_DEV_MODE=1 and LOOM_SERVER_ENV=production
  • Missing secrets: Fails if required API keys are not provided
  • Invalid paths: Warns if paths don’t exist or aren’t writable

Next Steps

Server Setup

Deploy loom-server

Database Migrations

Manage schema changes