Skip to content

Environment Variables

Nyravio is configured through environment variables defined in a .env file. The setup.sh script generates this file from .env.example with secure random values for all required secrets.

These must be set before starting Nyravio. The setup.sh script generates them automatically.

Variable Description Generator
NYRAVIO_SIGNING_SECRET JWT and token signing secret. Must be at least 32 bytes. openssl rand -base64 48
NYRAVIO_ADMIN_ENCRYPTION_KEY Encryption key for admin configuration and stored credentials. Must be at least 32 characters. openssl rand -base64 32
POSTGRES_PASSWORD PostgreSQL database password. openssl rand -base64 24
Variable Default Description
NYRAVIO_SETUP_TOKEN (generated) One-time token for the initial setup wizard. Required when Docker bridge network prevents loopback detection.
NYRAVIO_SETUP_NETWORKALLOWLIST 127.0.0.1,::1 IP addresses/subnets allowed to access the setup wizard without a token.
Variable Default Description
NYRAVIO_PORT 8080 Host port mapped to the application.
Variable Default Description
POSTGRES_DB nyravio PostgreSQL database name.
POSTGRES_USER nyravio PostgreSQL username.
POSTGRES_PASSWORD (required) PostgreSQL password.

The application uses Spring Boot datasource properties internally — these are set automatically in compose.yaml from the variables above:

  • SPRING_DATASOURCE_URL — JDBC connection string
  • SPRING_DATASOURCE_USERNAME — database user
  • SPRING_DATASOURCE_PASSWORD — database password
Variable Default Description
NYRAVIO_MCP_MASTER_KEYS (empty) Encryption keys for MCP connection credentials. Format: k1=<32-byte-base64-key>. Required to save bearer/custom-header credentials or connect personal MCP OAuth.
NYRAVIO_MCP_OAUTH_CLIENT_ID (empty) OAuth 2.1 PKCE client ID for personal MCP connectors. Register a public OAuth client.
NYRAVIO_MCP_OAUTH_REDIRECT_URI (empty) OAuth redirect URI. Example: https://your-domain.example/api/mcp-oauth/callback
Variable Default Description
JAVA_TOOL_OPTIONS (empty) Additional JVM options (e.g., -Xmx512m). Auto-detected by the JVM — no shell expansion required.
Variable Default Description
NYRAVIO_IMAGE nyravio:local Docker image reference. Used by compose.yaml to select the application image. Override for prebuilt images: ghcr.io/lexprofi/nyravio:VERSION.

These are set automatically in compose.yaml and generally do not need modification:

Variable Value Description
NYRAVIO_SPA_ENABLED true Enables SPA mode for the frontend.
NYRAVIO_SERVICES_EXTRACTOR_URL http://tika:9998 Apache Tika service URL for document extraction.
NYRAVIO_SERVICES_ALLOW_PRIVATE_NETWORKS true Allows connections to private network addresses (required for internal Docker networking).
NYRAVIO_IDENTITY_SIGNING_SECRET env:NYRAVIO_SIGNING_SECRET Reference to the signing secret (resolved by the application).

If you prefer to generate secrets without setup.sh:

Terminal window
# JWT signing secret (≥ 32 bytes)
openssl rand -base64 48
# Admin encryption key (≥ 32 characters)
openssl rand -base64 32
# PostgreSQL password
openssl rand -base64 24
# Setup token
openssl rand -base64 24

Alternatives when openssl is unavailable:

Terminal window
# Using Python
python3 -c "import secrets; print(secrets.token_urlsafe(48))"
# Using /dev/urandom
head -c 48 /dev/urandom | base64