Skip to content

Configuration

Domains, secrets, OAuth sign-in, who may sign up and knowledge search.

All settings live in .env. The environment variables reference lists every one.

Domains

Use two hosts. The single-domain layout is not supported.

Host Service Container port
app.example.com frontend 3000
api.example.com backend 3010
.envbash
APP_URL="https://app.example.com"
API_BASE_URL="https://api.example.com"
NUXT_PUBLIC_API_BASE_URL="https://api.example.com"
TRUSTED_ORIGINS="https://app.example.com"
COOKIE_DOMAIN=".example.com"
  • APP_URL must be a full http or https URL. RAGNA Studio doesn’t start with any other value.
  • NUXT_PUBLIC_API_BASE_URL must be the public https API URL. The frontend derives the wss:// WebSocket URL from it.
  • COOKIE_DOMAIN is the parent domain. It is needed because app and api are separate hosts.
  • TRUSTED_ORIGINS is a comma-separated list of allowed origins.
  • Passkeys are bound to the host of APP_URL. Changing that host later makes every existing passkey stop working. Users then sign in with their provider and add new passkeys.

Secrets

The installer generates these on the first run:

  • BETTER_AUTH_SECRET
  • DB_PASSWORD
  • REDIS_PASSWORD

To set one by hand, use openssl rand -hex 32. Use hex: DB_PASSWORD becomes part of the database URL, so characters like / break the connection. Provider credentials come from the providers. That means API keys, OAuth client secrets and S3 keys. Don’t generate those.

OAuth

Sign-in uses OAuth. Configure at least one provider: Google (GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET) or Microsoft (MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET, MICROSOFT_TENANT_ID).

Create an OAuth client at the provider to get the client ID and secret. Google calls it an OAuth client (Google Auth Platform, Clients). Microsoft calls it an app registration (Microsoft Entra ID).

The redirect URI per provider is:

https://api.example.com/auth/callback/<provider>

Use google or microsoft as <provider>. LinkedIn is not a sign-in option. It is used only to publish posts and needs the connections redirect URI instead, see Connections.

Microsoft (Entra ID)

Two extra settings in the app registration:

  • Optional claim xms_edov: under Token configuration, add it to the ID token. Entra sends no standard email_verified claim. Without xms_edov, RAGNA Studio can’t confirm the email address. A user who signed up with another provider then can’t sign in with Microsoft.
  • API permissions: for Outlook mailboxes, add the delegated Microsoft Graph permissions Mail.ReadWrite and Mail.Send. Mailboxes connect through connections, see Connections.

Restricting sign-up

By default every user who can reach RAGNA Studio and has an account at the OAuth provider can sign in. Restrict it with a comma-separated list:

.envbash
ALLOWED_LOGIN_EMAILS="you@example.com,teammate@example.com"

An empty value allows every user.

The list applies to every sign-in, including passkeys. Removing an email blocks that user on their next sign-in.

Knowledge search needs an embedding model. It turns document text into vectors. Choose it with an embedding profile.

.envbash
KNOWLEDGE_ENGINE="ragna"
EMBEDDING_PROFILE="openai"
Setting Meaning
KNOWLEDGE_ENGINE The search engine. ragna is the only value and the default.
EMBEDDING_PROFILE openai (default), mistral or openai-compatible.
EMBEDDING_MODEL The embedding model. Defaults: text-embedding-3-small (openai), mistral-embed (mistral).
EMBEDDING_DIMENSIONS The vector size. Defaults: 1536 (openai), 1024 (mistral).
EMBEDDING_API_BASE_URL Base URL of the embedding API. Used only by openai-compatible.
EMBEDDING_API_KEY API key of the embedding API. Used only by openai-compatible, and optional there.

The openai and mistral profiles use the provider settings (OPENAI_API_KEY, MISTRAL_API_KEY and their base URLs).

Use openai-compatible for a server that speaks the OpenAI embeddings API, such as Ollama, LM Studio, vLLM or Azure OpenAI v1. It requires EMBEDDING_MODEL, EMBEDDING_DIMENSIONS and EMBEDDING_API_BASE_URL.

An unknown profile, or a missing value for openai-compatible, stops the API and the worker from starting.

Changing the embedding profile, model or dimensions re-indexes all documents once. See Upgrades.

Language base URL

Set NUXT_PUBLIC_I18N_BASE_URL to the app URL, for example https://app.example.com. It replaces the default https://ragna.io used for language links.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close