.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
string
Secret key used for JWT token signing and session management. Required for authentication features like creating access tokens and API keys when
auth_strategy is managed.You can generate a secure key using the following command for instance:string
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.This environment variable only applies when auth_strategy is managed. It is not used when auth_strategy is external.Authentication and permissions
string
default:"{project_path}/target/auth.sqlite"
Path to the SQLite database file used for storing user accounts and API keys. Supports the
{project_path} placeholder.This environment variable only applies when auth_strategy is managed. It is not used when auth_strategy is external.integer
default:"30"
Expiration time for JWT access tokens in minutes.This environment variable only applies when
auth_strategy is managed. It is not used when auth_strategy is external (the expiration time of the access token is determined by the external provider).string
default:"https://squirrels-analytics.github.io"
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-v2string
default:"admin"
The minimum access level required for elevated privileges (e.g., using configurables via headers). Valid values:
admin, member, or guest.Parameters
integer
default:"60"
Interval in minutes for automatically refreshing datasource parameter options in the background. Set to
0 or a negative number to disable automatic refresh.integer
default:"1024"
Maximum number of entries in the parameters cache.
integer
default:"60"
Time-to-live for cached parameter results in minutes.
Datasets and dashboards
integer
default:"100"
Maximum number of rows that AI can see through MCP (Model Context Protocol) tools. This is to prevent excessive context usage.
integer
default:"100000"
Maximum number of rows allowed for dataset results and query results. If a dataset result, query result, or transformed result (via
x_sql_query) exceeds this limit, an error is returned and the result is not cached. This helps prevent excessive memory usage and ensures results are reasonable to send over HTTP.float
default:"2"
Maximum timeout for running SQL queries on dataset results in seconds. If a query exceeds this timeout, an error is returned and the result is not cached.
integer
default:"128"
Maximum number of entries in the dataset results cache.
integer
default:"60"
Time-to-live for cached dataset results in minutes.
integer
default:"128"
Maximum number of entries in the dashboards cache.
integer
default:"60"
Time-to-live for cached dashboard results in minutes.
Seeds
boolean
default:"true"
Whether to automatically infer column types when loading CSV seed files. Set to
false to treat all columns as strings.string
default:"[]"
A JSON array of strings to treat as null/NA values when parsing seed CSV files.Example:
["", "NA", "N/A", "null"].Connections
string
default:"default"
The default connection name to use when no connection is explicitly specified.
Virtual Data Lake (VDL)
string
default:"see below (too long to fit here)"
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.string
default:"{project_path}/target/vdl_data/"
Directory path of the ducklake data files for the Virtual Data Lake. Supports the
{project_path} placeholder.Squirrels Studio
string
default:"see below (too long to fit here)"
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-v2.Logging
string
default:"INFO"
The logging level. Valid values:
DEBUG, INFO, WARNING, ERROR, CRITICAL.string
default:"text"
Format for log output. Valid values:
text or json.boolean or string
default:"false"
Whether to write logs to a file in the
logs/ directory in addition to console output. Can be set to true to use the default logs/ folder, or a folder path to write to a custom folder.integer
default:"50"
Maximum size of each log file in megabytes before rotation occurs. Ignored if
SQRL_LOGGING__TO_FILE is false.integer
default:"1"
Number of backup log files to keep after rotation. Ignored if
SQRL_LOGGING__TO_FILE is false.Example .env file
The following are examples of frequently used environment variables.
.env