Skip to content

ENV vars

xixo reads its configuration from the environment. This page lists every variable the web and worker processes and the Rake tasks read. The variables read by ./dev, the compose files, the seeds, and the test suite are on the Development page. A deployed server does not read them.

./dev reference fails when the code reads a variable that neither page lists, or a page lists one the code no longer reads.

Set these the same on the web and worker containers, and restart both after changing one. Values are strings. A switch is on for 1, true, yes, or on, and off for 0, false, no, off, or nothing, in any case. xixo refuses to boot when a switch holds any other value.

A production deployment sets all of these. See self-hosting for how to generate them.

Variable Default
SECRET_KEY_BASE none Signs and encrypts sessions and cookies. Read by Rails. xixo ships no credentials file, so without it Rails raises Missing secret_key_base in production.
ENCRYPTION_PRIMARY_KEY none Encrypts the columns that hold secrets: each resource’s credentials, and each tenant’s masks client secret and registration access token. bin/rails db:encryption:init prints a value. Without it, the first read or write of one of those columns raises ActiveRecord::Encryption::Errors::Configuration.
ENCRYPTION_DETERMINISTIC_KEY none Encrypts columns that are looked up by value. No column uses it, and Rails requires it.
ENCRYPTION_KEY_DERIVATION_SALT none Derives the per-column keys from the two above.
XIXO_PUBLIC_ORIGIN none The origin browsers and agents use to reach each tenant, with %{subdomain} standing in for the first label of the host, such as https://%{subdomain}.xixo.example.com. A single tenant uses an origin without the placeholder, such as https://xixo.example.com. The origin followed by /mcp is the audience every access token must name, and the sign-in callback is built from it. Production refuses to boot without it. In development and test, xixo builds both from the request’s Host header when it is unset.
MASKS_ISSUER_TEMPLATE none The issuer URL of a masks server run apart from xixo, with %{subdomain} standing in as it does in XIXO_PUBLIC_ORIGIN, such as https://%{subdomain}.auth.example.com. With XIXO_TENANT, %{subdomain} in either template is the pinned tenant, whatever host a request names. Unset, xixo serves its own masks at /id on each tenant’s origin, with its tables in a fifth database whose name ends in _masks. Read once at boot. See signing in.
Variable Default
XIXO_TENANT none Declares a single tenant, such as xixo, and serves it at every host.
XIXO_TENANTS none Declares several tenants, separated by commas or spaces, such as demo,acme. A request resolves to the tenant named by the first label of its host.
XIXO_HOST_SUFFIX none, or xixo.localhost in development The domain xixo answers under, such as xixo.example.com. Rails accepts that domain and its subdomains and answers 403 to any other Host, except at /up. Unset in production, Rails accepts every host. xixo also refuses an MCP resource whose URL points at a host under this domain, so it cannot call itself.

bin/rails xixo:tenants creates each declared tenant that does not exist, and the container entrypoint runs it before the server starts. Setting both variables stops that task with Tenant::TenancyConflict, and the container exits. Setting neither declares no tenants. A request resolves against the tenants in the database, so removing a name from XIXO_TENANTS neither deletes that tenant nor stops xixo from serving it. See multiple tenants.

xixo uses PostgreSQL databases for the primary data, a cache, a job queue, Action Cable, and the built-in masks. Production connects to xixo_production, xixo_production_cache, xixo_production_queue, xixo_production_cable, and xixo_production_masks as the role xixo. That role must hold neither SUPERUSER nor BYPASSRLS, because tenant isolation depends on row-level security. xixo refuses to enter any tenant when it connects as such a role.

Variable Default
POSTGRES_HOST localhost The PostgreSQL server’s host name.
POSTGRES_PORT 5432 The PostgreSQL server’s port.
XIXO_DATABASE_PASSWORD none The password of the xixo role in production. Unset, xixo connects without a password.
POSTGRES_USER xixo The role in development and test. Production ignores it and connects as xixo.
POSTGRES_PASSWORD xixo The password in development and test. Production ignores it.
PG_BIN_PATH none A directory put first on PATH, so db:schema:dump finds a pg_dump that matches the server’s PostgreSQL version when it writes db/structure.sql.
Variable Default
OPENSEARCH_URL http://127.0.0.1:9201 The OpenSearch server that holds the search index. The index’s alias is xixo_ followed by the Rails environment, and each tenant searches through an alias of its own. See search.
OPENSEARCH_USERNAME none The user xixo signs in to OpenSearch as, when its security plugin is on.
OPENSEARCH_PASSWORD none The password for OPENSEARCH_USERNAME.
XIXO_EMBEDDING_DIMENSIONS 768 The length of the vectors the index holds. The embedding model a tenant declares must return vectors of this length, and checking an inference resource fails when it does not. Changing it changes the index’s mapping, so RebuildSearchIndexJob builds a new index within ten minutes. See rebuilding.
XIXO_SEMANTIC_FLOOR 0.55 The lowest cosine similarity a semantic match may have. A match must also score within 0.12 of the best match. Raising it returns fewer, closer matches. See semantic search.

Uploads are staged through Active Storage before a job places them in a resource. See staging.

Variable Default
XIXO_STAGING_SERVICE local Where production stages uploads. local writes to /rails/storage, which the web and worker containers must share. s3 writes to the bucket named below. Any other name fails when Active Storage loads. Development always uses local.
XIXO_STAGING_BUCKET none The staging bucket, when XIXO_STAGING_SERVICE=s3.
XIXO_STAGING_ENDPOINT none The endpoint of an S3-compatible service, such as https://s3.example.com. Setting it addresses the bucket by path. Unset, xixo uses AWS.
XIXO_STAGING_REGION us-east-1 The staging bucket’s region.
XIXO_STAGING_ACCESS_KEY_ID none
XIXO_STAGING_SECRET_ACCESS_KEY none
XIXO_GIT_ROOT none The directory where git resources keep their shallow bare clones, at <root>/<tenant id>/<resource id>.git. Unset, every git resource is unusable.
XIXO_LOCAL_LINK none The directory the server shares with xixo link beside it. Each tenant whose xixo link runs there has a directory of its own under it, named by its subdomain. When it asks to enroll, the worker leaves it a single-use enrollment token readable by its user alone, and binds the client xixo link enrolled as to the local machine. Unset, nothing is extracted until xixo link on a machine is connected.
XIXO_LINK_DIR /opt/xixo-link Where the server finds the xixo link it hands to a machine that links up: the builds named xixo-link-<os>-<arch>, the systemd units, the launch agent, and version, the version those builds report. /link.sh offers each build it finds there. The server image holds builds for Linux and macOS on amd64 and arm64. Without version, the server offers the version in .release-please-manifest.json.

xixo refuses to connect to loopback, private, link-local, and other reserved addresses. These variables open exceptions. Each _ORIGINS variable lists origins separated by commas, such as http://minio:9000,https://search.internal.example.com. An origin is a scheme, a host, and a port, and a URL matches when all three match. See reaching addresses.

Variable Default
XIXO_S3_ORIGINS none S3 endpoints an s3 resource may reach at a private address, such as a MinIO container.
XIXO_MCP_ORIGINS none MCP servers an mcp resource may reach at a private address.
XIXO_SEARCH_ORIGINS none Search endpoints a search resource may reach at a private address, such as a self-hosted SearXNG. XIXO_ALLOW_PRIVATE_FETCH does not apply to search resources.
XIXO_INFERENCE_ORIGINS none Every origin an openai-compatible resource may reach, public or private, such as https://api.openai.com,http://ollama:11434. A resource whose base URL is outside the list is unusable, and with the list empty every one is, unless it is reached through a machine running xixo link.
XIXO_ALLOW_PRIVATE_FETCH false Lifts the address check for downloads, snapshots, and every resource that fetches URLs. The scheme check stays.
XIXO_GIT_PROTOCOLS https The transports git resources may use, separated by commas, such as https,ssh. xixo passes the list to git as GIT_ALLOW_PROTOCOL. Only http and https URLs go through the address check.
Variable Default
XIXO_TRANSCRIBE_SECONDS 3600 How many seconds of a recording are sent to the resource that serves transcription, at most 14400. A longer recording is heard in ten-minute parts spread across it. The signal is measured over this many seconds from the start.
XIXO_CHROME_PATH detected The Chrome or Chromium binary used to render snapshots. Unset, xixo looks in the usual places for the platform. The image includes Chromium. Without a browser, web resources report themselves unusable.
XIXO_CHROME_NO_SANDBOX false Starts Chrome with --no-sandbox, for a container that cannot give Chrome the namespaces its sandbox needs.
Variable Default
XIXO_MCP_LIMIT 120 MCP requests per minute, counted per tenant and per bearer token, or per IP address for a request without one. A request over the limit receives a 429. 0 refuses every request.
XIXO_RUN_BUDGET 20 Syncs, exports, analyses, and moves one person may start over MCP in a tenant per clock hour. 0 removes the limit. See budgets and gates.
XIXO_RUN_DEADLINE_HOURS 6 How long a run may stay open. Every 10 minutes, ExpireOverdueJob expires any run past its deadline, and any running analysis past its feed’s timeout. 0 sets no deadline.
XIXO_RUN_RETENTION_DAYS 14 How long finished runs are kept. SweepRunsJob deletes older ones at 4:20 a.m. 0 keeps them.
XIXO_AUDIT_RETENTION_DAYS 90 How long audit events are kept. SweepAuditEventsJob deletes older ones at 4 a.m. 0 keeps them.

./bin/jobs runs Solid Queue with two worker pools, set in config/queue.yml. The first takes the sync, export, default, and move queues with 5 threads per process. The second takes the analysis queue.

Variable Default
BULK_CONCURRENCY 1 Processes for the sync, export, default, and move queues.
ANALYSIS_CONCURRENCY 1 Processes for the analysis queue.
ANALYSIS_THREADS 4 Threads per analysis process.
ANALYSIS_PER_TENANT 2 Analyses one tenant may run at the same time, across every process, so one tenant cannot fill the pool.
SOLID_QUEUE_IN_PUMA false Runs the job supervisor inside the web server, for a small host with no worker container.
XIXO_WORKER_QUIET_SECONDS 300 How long the workers can go without a heartbeat before /up reports worker failing and bin/jobs-healthy fails.
XIXO_ITERATORS_DISABLED false Closes every gate in every tenant, which stops every sync, analysis, export, and reindex, including ones in progress. See budgets and gates.

These connect the server to xixo-updater. Without an updater beside it, Settings > Updates says the server is updated by hand.

Variable Default
XIXO_UPDATES_STATE /var/lib/xixo-updates/state The updater’s state folder, mounted read-only. xixo reads status.json and events.jsonl from it.
XIXO_UPDATES_REQUEST /run/xixo-updates/requests/request.json The file xixo writes when an administrator asks the updater to update now, pause, resume, roll back, or follow another channel. The updater reads it.
XIXO_UPDATES_TENANT the XIXO_TENANT tenant The tenant whose administrators see and control the server’s updates. With several tenants and no XIXO_UPDATES_TENANT, no one controls them from xixo.

The image runs ./bin/thrust ./bin/rails server. Thruster listens on HTTP_PORT and forwards to Puma on TARGET_PORT.

Variable Default
RAILS_MAX_THREADS 3 Puma threads per process. Each database connection pool holds this many connections, or enough for an analysis process’s threads, ANALYSIS_THREADS + 5, whichever is more, so setting it for Puma never starves the worker.
WEB_CONCURRENCY 0 Puma worker processes. 0 runs one process without forking. Read by Puma.
PORT 3000 The port Puma listens on. Thruster sets it to TARGET_PORT.
PIDFILE none Where Puma writes its process ID.
HTTP_PORT 80 The port Thruster listens on. Read by Thruster.
TARGET_PORT 3000 The port Thruster forwards to. Read by Thruster.
TLS_DOMAIN none Has Thruster obtain a certificate from Let’s Encrypt for this domain and serve HTTPS itself. Read by Thruster, which reads more variables than are listed here.
Variable Default
RAILS_ENV production in the image production, development, or test.
RAILS_LOG_LEVEL info debug, info, warn, error, or fatal. Production only.
RAILS_ASSUME_SSL true Treats every request as HTTPS, for a server behind a proxy that terminates TLS. Production only.
RAILS_FORCE_SSL true Redirects HTTP to HTTPS and sends Strict-Transport-Security. Production only.
SECRET_KEY_BASE_DUMMY unset Boots with a throwaway secret, for build steps such as assets:precompile. Read by Rails. A server running with it set is not secure.

bin/rails inference:corpus analyzes the files in test/fixtures/corpus against a tenant’s default inference resource and prints each summary.

Variable Default
TENANT demo The subdomain of the tenant to run in. The task stops when the tenant does not exist or has no default inference resource.
ONLY none Analyzes only the corpus files whose path contains this text.