OrcAI
Self Hosting

Configuration

Required and optional environment variables for OrcAI.

Runtime configuration is loaded across app and package config modules. .env.example is the current baseline for self-hosted environments.

When SMTP is not configured, emails are not delivered. The local-testing fallback logs complete rendered messages, including password-reset, verification, and invitation links. Do not use log-only mode in production, and treat any captured output as credential-bearing sensitive data.

Self-hosting scope

Custom embedding and image-processing model definitions are supported only in self-hosted deployments. For managed/shared deployments, these are platform-level settings controlled by the hosting operator.

Primary config modules:

  • packages/ai/src/config.ts
  • packages/db/src/config.ts
  • packages/notifications/src/config.ts
  • packages/qdrant/src/config.ts
  • packages/s3/src/server/config.ts
  • packages/spice-db/src/config.ts
  • packages/valkey/src/config.ts
  • apps/app/src/lib/effect/services/config.ts

Public URLs

VariableRequiredNotes
BASE_URLRecommendedCompatibility fallback used by some auth tooling. Keep aligned with BETTER_AUTH_URL when set.
BETTER_AUTH_URLYesPublic auth callback base URL. Keep aligned with BASE_URL.
VITE_BASE_URLYesPublic frontend base URL used in client-side links.
VITE_WEB_URLNoPublic docs site base URL used in the app dashboard.

Authentication And Encryption

VariableRequiredNotes
BETTER_AUTH_SECRETYesBetter Auth signing secret.
ENCRYPTION_KEYYes32 to 64 character application encryption key.

Database And Cache

VariableRequiredNotes
POSTGRES_USERYesPostgreSQL user.
POSTGRES_PASSWORDYesPostgreSQL password.
POSTGRES_HOSTYesPostgreSQL host.
POSTGRES_PORTYesPostgreSQL port.
POSTGRES_DBYesPostgreSQL database name.
VALKEY_URLYesValkey connection URL.

Object Storage

VariableRequiredNotes
S3_ENDPOINTYesInternal S3-compatible endpoint.
S3_PUBLIC_ENDPOINTNoPublic endpoint used for presigned URLs.
S3_REGIONNoDefaults to eu-central-1.
S3_ACCESS_KEYYesS3 access key.
S3_SECRET_KEYYesS3 secret key.

AI And Retrieval

VariableRequiredNotes
OPENAI_COMPATIBLE_BASE_URLYesBase URL for an OpenAI-compatible API.
OPENAI_COMPATIBLE_API_KEYYesAPI key for the model endpoint.
EMBEDDING_MODELYesEmbedding model exposed by the endpoint.
EMBEDDING_DIMENSIONSYesPositive integer vector size for the embedding model and Qdrant collection.
GENERAL_MODELYesGeneral-purpose model used by worker image-description steps.
KREUZBERG_OCR_LANGUAGENoOCR languages for asset processing. Defaults to eng in host-oriented code and eng+deu in Compose examples.

Do not mix embeddings

Changing EMBEDDING_MODEL or EMBEDDING_DIMENSIONS after assets have already been indexed is not supported. Recreate the Qdrant collection and reprocess assets instead of mixing embeddings.

Qdrant

VariableRequiredNotes
QDRANT_URLYesQdrant HTTP endpoint.
QDRANT_API_KEYYesQdrant API key. Local development may use a placeholder.

SpiceDB

VariableRequiredNotes
SPICEDB_ENDPOINTYesSpiceDB gRPC endpoint.
SPICEDB_TOKENYesToken used by the app.
SPICEDB_SECURITYNoTransport mode for SpiceDB client. Defaults to insecure-plaintext. Valid values: secure, insecure-localhost, insecure-plaintext.
SPICEDB_GRPC_PRESHARED_KEYComposeUsed by the Compose-managed SpiceDB service.
SPICEDB_POSTGRES_USERComposeUser for the Compose-managed SpiceDB database.
SPICEDB_POSTGRES_PASSWORDComposePassword for the Compose-managed SpiceDB database.

Email

Email delivery stays in log-only mode unless SMTP is configured.

VariableRequiredNotes
SMTP_HOSTNoMust be set with SMTP_FROM to enable SMTP.
SMTP_PORTNoDefaults to 587 when SMTP mode is enabled and no port is set.
SMTP_USERNAMENoMust be paired with SMTP_PASSWORD if used.
SMTP_PASSWORDNoMust be paired with SMTP_USERNAME if used.
SMTP_SECURENoIf unset, derived from port (true for 465, otherwise false).
SMTP_TLS_REJECT_UNAUTHORIZEDNoDefaults to true.
SMTP_FROMNoMust be set with SMTP_HOST to enable SMTP.
SMTP_FROM_NAMENoDefaults to OrcAI Team.

Observability

VariableRequiredNotes
VITE_UMAMI_SCRIPT_URLNoEnables Umami analytics injection when paired with website ID.
VITE_UMAMI_WEBSITE_IDNoUmami website ID.
OTEL_EXPORTER_OTLP_ENDPOINTNoOpenTelemetry export endpoint.
OTEL_EXPORTER_OTLP_HEADERSNoOpenTelemetry export headers.

On this page