-
metabase-bot[bot] authored
Co-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com>
metabase-bot[bot] authoredCo-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com>
title: Environment variables
redirect_from:
- /docs/latest/operations-guide/environment-variables
Environment variables
Many settings in Metabase can be viewed and modified in the Admin Panel, or set via environment variables. The environment variables always take precedence. Note that the environment variables won't get written into the application database.
Setting environment variables can be done in various ways depending on how Metabase is being run.
JAR file:
# Mac, Linux and other Unix-based systems
export MB_SITE_NAME="Awesome Company"
# Windows Powershell
$env:MB_SITE_NAME="Awesome Company"
# Windows batch/cmd
set MB_SITE_NAME="Awesome Company"
java -jar metabase.jar
Or set it as Java property, which works the same across all systems:
java -DMB_SITE_NAME="Awesome Company" -jar metabase.jar
Docker:
docker run -d -p 3000:3000 -e MB_SITE_NAME="Awesome Company" --name metabase metabase/metabase
MAX_SESSION_AGE
Type: integer
Default: 20160
Session expiration, defined in minutes (default is 2 weeks), which will log out users after the defined period and require re-authentication.
Note: This setting is not an idle/inactivity timeout. If you set this to 15 minutes, your users have to login (or re-authenticate) again every 15 minutes. Use MB_SESSION_TIMEOUT to control timeout based on inactivity.
Use MB_SESSION_COOKIES to also expire sessions, when browser is closed.
Also see the Changing session expiration documentation page.
MB_ADMIN_EMAIL
Type: string
Default: null
The email address users should be referred to if they encounter a problem.