.env or .env.local file at the root of your project, or as system environment variables.
It is also common practice to include a .env.example file in your project to contain example environment variables, especially if the .env file is not committed to version control.
If the same variable is defined in both
.env.local and .env, the value in .env.local takes precedence.Secrets
Secret key used for JWT token signing and session management. Required for authentication features like creating access tokens and API keys.You can generate a secure key using the following command for instance:
Password for the admin user (i.e., the user with username
admin). When set, the password of the admin user is created or updated on server startup.Authentication and permissions
Path to the SQLite database file used for storing user accounts, API keys, and OAuth client data. Supports the
{project_path} placeholder.Expiration time for JWT access tokens in minutes.
Comma-separated list of origins allowed to send credentials (cookies) with requests. These origins get
Access-Control-Allow-Credentials: true in CORS responses.By including https://squirrels-analytics.github.io in the list, you may also use the following Squirrels Studio site to log in to your Squirrels project with a “bring your own backend service” approach.https://squirrels-analytics.github.io/squirrels-studio-v1The minimum access level required for elevated privileges (e.g., using configurables via headers). Valid values:
admin, member, or guest.Parameters
Interval in minutes for automatically refreshing datasource parameter options in the background. Set to
0 or a negative number to disable automatic refresh.Maximum number of entries in the parameters cache.
Time-to-live for cached parameter results in minutes.
Datasets and dashboards
Maximum number of rows that AI can see through MCP (Model Context Protocol) tools. This is to prevent excessive context usage.
Maximum number of entries in the dataset results cache.
Time-to-live for cached dataset results in minutes.
Maximum number of entries in the dashboards cache.
Time-to-live for cached dashboard results in minutes.
Seeds
Whether to automatically infer column types when loading CSV seed files. Set to
false to treat all columns as strings.A JSON array of strings to treat as null/NA values when parsing seed CSV files.Example:
["", "NA", "N/A", "null"].Connections
The default connection name to use when no connection is explicitly specified.
Virtual Data Lake (VDL)
Path to the ducklake catalog database for the Virtual Data Lake. Supports the
{project_path} placeholder.Default value is ducklake:{project_path}/target/vdl_catalog.duckdb.Directory path of the ducklake data files for the Virtual Data Lake. Supports the
{project_path} placeholder.Squirrels Studio
URL for fetching the CSS and JavaScript files for the Squirrels Studio application built in to the Squirrels API server. Can be changed to point to a locally-hosted or self-hosted instance of Squirrels Studio.Default value is
https://squirrels-analytics.github.io/squirrels-studio-v1.Logging
The logging level. Valid values:
DEBUG, INFO, WARNING, ERROR, CRITICAL.Format for log output. Valid values:
text or json.Whether to write logs to a file in the
logs/ directory in addition to console output.Maximum size of each log file in megabytes before rotation occurs. Ignored if
SQRL_LOGGING__LOG_TO_FILE is false.Number of backup log files to keep after rotation. Ignored if
SQRL_LOGGING__LOG_TO_FILE is false.Example .env file
The following are examples of frequently used environment variables.
.env