CADViewer Conversion Server Technical Documentation

Environment Variables (.env)

Environment File Description

For sensitive credentials, API keys, and server-specific configurations, the CADViewer Conversion Server supports loading variables directly from a .env file.

This file is excluded from version control (.gitignore) to ensure that secrets are never accidentally committed. Any values defined in your .env file will automatically override the default placeholder values found in CADViewer_config.json.

If you are deploying via Docker or Azure Web Apps, you can pass these exact same keys as Application Settings or native environment variables instead of using a physical .env file.

Below is the structure of the .env.example file provided in the repository. You should copy this file, rename it to .env, and fill in your actual production values:

# CADViewer Conversion Server - Environment Variables
#
# Copy this file to .env and fill in your real values.
# The .env file is in .gitignore and must NEVER be committed to git.
#
# All keys listed here override the placeholder values in CADViewer_config.json.
# On Azure/Docker, set these as App Settings / environment variables instead.

# ── AI Keys ────────────────────────────────────────────────────────────────────
GROQ_API_KEY=your-groq-api-key-here
OPENAI_API_KEY=your-openai-api-key-here
GOOGLE_AI_API_KEY=your-google-ai-api-key-here

# ── Snowflake ──────────────────────────────────────────────────────────────────
# Account URL: https://<account-identifier>.snowflakecomputing.com
SNOWFLAKE_BASE_URL=your-snowflake-account-url-here
# Programmatic Access Tokens (PATs) - generate in Snowflake Admin > Security > PATs
SNOWFLAKE_BEARER_TOKEN-ADMIN=your-snowflake-admin-pat-here
SNOWFLAKE_BEARER_TOKEN=your-snowflake-pat-here
# Cortex function fully-qualified names: <database>.<schema>.<function_name>
SNOWFLAKE_FUNCTION_TEST=your-database.your-schema.your-test-function
SNOWFLAKE_FUNCTION_PROD=your-database.your-schema.your-prod-function
# Agent configuration: Snowflake database, schema, and Cortex Agent name
SNOWFLAKE_AGENT_DATABASE=your-snowflake-database
SNOWFLAKE_AGENT_SCHEMA=your-snowflake-schema
SNOWFLAKE_AGENT_NAME=your-cortex-agent-name
# Secondary / alternate agent slot (for staging or A/B)
SNOWFLAKE_AGENT_SCHEMA_=your-alt-snowflake-schema
SNOWFLAKE_AGENT_NAME_=your-alt-cortex-agent-name

# ── Application Secrets ────────────────────────────────────────────────────────
jwtSecretKey=change-me-to-a-long-random-string
mysqlPassword=your-db-password-here
recaptchaSecretKey=your-recaptcha-secret-here
custom_bearerAutentication=your-bearer-token-here

# ── Multi-tenant (Phase 3A) ─────────────────────────────────────────────────────
# Master key protecting POST /tenants (tenant registration/rotation). The
# CADViewer Analytic platform sends it as the X-Master-Key header when a tenant
# is provisioned from the Cloud menu. Leave unset to DISABLE registration.
CONVERSION_MASTER_KEY=change-me-to-a-long-random-master-key

# ── Azure Blob Storage SAS Tokens ─────────────────────────────────────────────
globalApplicationSasToken=your-sas-token-here
Last updated on 3 Sep 2026
Published on 3 Sep 2026