Streamlit configuration file
Streamlit configuration file
| Type | object |
|---|---|
| File match |
**/.streamlit/config.toml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/streamlit-configuration-file/latest.json |
| Source | https://www.schemastore.org/streamlit-config.json |
Validate with Lintel
npx @lintel/lintel check
Schema for Streamlit configuration files that define settings for your working directory or global development environment
Properties
Global configuration options for Streamlit
2 nested properties
By default, Streamlit displays a warning when a user sets both a widget default value in the function defining the widget and a widget value via the widget's key in st.session_state. If you'd like to turn off this warning, set this to True.
If True, will show a warning when you run a Streamlit-enabled script via 'python my_script.py'.
Configuration for Streamlit's internal logger
2 nested properties
Level of logging for Streamlit's internal logger
String format for logging messages. If logger.datetimeFormat is set, logger messages will default to '%(asctime)s.%(msecs)03d %(message)s'. See Python's documentation for available attributes.
Client-side configuration options
3 nested properties
Controls whether uncaught app exceptions and deprecation warnings are displayed in the browser
Change the visibility of items in the toolbar, options menu, and settings dialog (top right of the app)
Controls whether to display the default sidebar page navigation in a multi-page app. This only applies when app's pages are defined by the 'pages/' directory.
Configuration for Streamlit's script runner
4 nested properties
Allows you to type a variable or string by itself in a single line of Python code to write it to the app.
Handle script rerun requests immediately, rather than waiting for script execution to reach a yield point. This makes Streamlit much more responsive to user interaction, but it can lead to race conditions in apps that mutate session_state data outside of explicit session_state assignment statements.
Raise an exception after adding unserializable data to Session State. Some execution environments may require serializing all data in Session State, so it may be useful to detect incompatibility during development, or when the execution environment will stop supporting it in the future.
Controls how 'options' widgets (radio, selectbox, multiselect) coerce Enum members. This is particularly useful when Enum classes are redefined during script reruns. 'off' disables coercion completely, 'nameOnly' allows coercion when member names match, and 'nameAndValue' requires both member names and values to match for coercion.
Server configuration options for Streamlit
20 nested properties
List of directories to watch for changes. By default, Streamlit watches files in the current working directory and its subdirectories. Use this option to specify additional directories to watch. Paths must be absolute.
[]
List of directories to ignore for changes. By default, Streamlit watches files in the current working directory and its subdirectories. Use this option to specify exceptions within watched directories. Paths can be absolute or relative to the current working directory.
[]
Change the type of file watcher used by Streamlit, or turn it off completely. 'auto' attempts to use watchdog module and falls back to polling, 'watchdog' forces watchdog module, 'poll' forces polling, 'none' disables file watching.
Symmetric key used to produce signed cookies. If deploying on multiple replicas, this should be set to the same value across all replicas to ensure they all share the same secret.
If false, will attempt to open a browser window on start. Default is false unless on a Linux box where DISPLAY is unset, or running in the Streamlit Atom plugin.
Whether to show a terminal prompt for the user's email address when they run Streamlit (locally) for the first time. If server.headless=True, Streamlit will not show this prompt.
Automatically rerun script when the file is modified on disk.
The address where the server will listen for client and browser connections. If set, the server will only be accessible from this address, and not from any aliases (like localhost).
The port where the server will listen for browser connections.
The base path for the URL where Streamlit should be served from.
Enables support for Cross-Origin Resource Sharing (CORS) protection, for added security. If XSRF protection is enabled and CORS protection is disabled at the same time, Streamlit will enable them both instead.
If CORS protection is enabled, use this option to set a list of allowed origins that the Streamlit server will accept traffic from. This config option does nothing if CORS protection is disabled.
[]
Enables support for Cross-Site Request Forgery (XSRF) protection, for added security. If XSRF protection is enabled and CORS protection is disabled at the same time, Streamlit will enable them both instead.
Max size, in megabytes, for files uploaded with the file_uploader.
Max size, in megabytes, of messages that can be sent via the WebSocket connection.
Enables support for websocket compression.
Enable serving files from a 'static' directory in the running app's directory.
TTL in seconds for sessions whose websockets have been disconnected. The server may choose to clean up session state, uploaded files, etc for a given session with no active websocket connection at any point after this time has passed.
Server certificate file for connecting via HTTPS. Must be set at the same time as 'server.sslKeyFile'. DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.
Cryptographic key file for connecting via HTTPS. Must be set at the same time as 'server.sslCertFile'. DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.
Browser configuration options for Streamlit
3 nested properties
Address to connect to when opening browser
Whether to send usage statistics to Streamlit
Port where users should point their browsers to connect to the app. This is used to set the correct URL for XSRF protection, show the URL on the terminal, and open the browser automatically. This option is for advanced use cases - to change the port of your app, use server.Port instead. Defaults to whatever value is set in server.port.
Configuration for Mapbox integration (DEPRECATED)
1 nested properties
Mapbox API token for displaying maps. DEPRECATED: Use MAPBOX_API_KEY environment variable or PyDeck's api_keys argument instead. This option will be removed on or after 2026-05-01.
Theme configuration for Streamlit apps
28 nested properties
The preset Streamlit theme that your custom theme inherits from. Can be either 'light' or 'dark'.
Whether or not links should be displayed with an underline
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
An array of fonts to use in your app. Each font is a dictionary with attributes like family, url, weight, style, and unicodeRange
The root font size in pixels for the app. Must be a positive integer. Defaults to 16px if not set
The root font weight for the app.
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Font sizes for h1-h6 headings. Can be a single value or array of up to 6 values in pixels or rem
Font weights for h1-h6 headings. Can be a single value or array of up to 6 values between 100 and 900
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Whether to show a border around input widgets
Whether to show a vertical separator between the sidebar and the main content area
An array of colors to use for categorical chart data in Plotly, Altair, and Vega-Lite charts
An array of exactly ten colors to use for sequential or continuous chart data in Plotly, Altair, and Vega-Lite charts
Theme configuration specifically for the sidebar
19 nested properties
Whether or not links should be displayed with an underline in the sidebar
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
One or more font sizes for h1-h6 headings in the sidebar
One or more font weights for h1-h6 headings in the sidebar
[
700,
600,
600,
600,
600,
600
]
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Whether to show a border around input widgets in the sidebar
Configuration for Streamlit secrets management
1 nested properties
An entry can be a path to a TOML file or directory path where Kubernetes style secrets are saved. Order is important, import is first to last, so secrets in later files will take precedence over earlier ones.
Definitions
Global configuration options for Streamlit
By default, Streamlit displays a warning when a user sets both a widget default value in the function defining the widget and a widget value via the widget's key in st.session_state. If you'd like to turn off this warning, set this to True.
If True, will show a warning when you run a Streamlit-enabled script via 'python my_script.py'.
Configuration for Streamlit's internal logger
Level of logging for Streamlit's internal logger
String format for logging messages. If logger.datetimeFormat is set, logger messages will default to '%(asctime)s.%(msecs)03d %(message)s'. See Python's documentation for available attributes.
Client-side configuration options
Controls whether uncaught app exceptions and deprecation warnings are displayed in the browser
Change the visibility of items in the toolbar, options menu, and settings dialog (top right of the app)
Controls whether to display the default sidebar page navigation in a multi-page app. This only applies when app's pages are defined by the 'pages/' directory.
Configuration for Streamlit's script runner
Allows you to type a variable or string by itself in a single line of Python code to write it to the app.
Handle script rerun requests immediately, rather than waiting for script execution to reach a yield point. This makes Streamlit much more responsive to user interaction, but it can lead to race conditions in apps that mutate session_state data outside of explicit session_state assignment statements.
Raise an exception after adding unserializable data to Session State. Some execution environments may require serializing all data in Session State, so it may be useful to detect incompatibility during development, or when the execution environment will stop supporting it in the future.
Controls how 'options' widgets (radio, selectbox, multiselect) coerce Enum members. This is particularly useful when Enum classes are redefined during script reruns. 'off' disables coercion completely, 'nameOnly' allows coercion when member names match, and 'nameAndValue' requires both member names and values to match for coercion.
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
The font family name
URL or path to the font file
Font weight (e.g. '400', '700')
Font style (e.g. 'normal', 'italic')
Unicode range for the font
Theme configuration for Streamlit apps
The preset Streamlit theme that your custom theme inherits from. Can be either 'light' or 'dark'.
Whether or not links should be displayed with an underline
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
An array of fonts to use in your app. Each font is a dictionary with attributes like family, url, weight, style, and unicodeRange
The root font size in pixels for the app. Must be a positive integer. Defaults to 16px if not set
The root font weight for the app.
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Font sizes for h1-h6 headings. Can be a single value or array of up to 6 values in pixels or rem
Font weights for h1-h6 headings. Can be a single value or array of up to 6 values between 100 and 900
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Whether to show a border around input widgets
Whether to show a vertical separator between the sidebar and the main content area
An array of colors to use for categorical chart data in Plotly, Altair, and Vega-Lite charts
An array of exactly ten colors to use for sequential or continuous chart data in Plotly, Altair, and Vega-Lite charts
Theme configuration specifically for the sidebar
19 nested properties
Whether or not links should be displayed with an underline in the sidebar
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
One or more font sizes for h1-h6 headings in the sidebar
One or more font weights for h1-h6 headings in the sidebar
[
700,
600,
600,
600,
600,
600
]
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Whether to show a border around input widgets in the sidebar
Theme configuration specifically for the sidebar
Whether or not links should be displayed with an underline in the sidebar
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
One or more font sizes for h1-h6 headings in the sidebar
One or more font weights for h1-h6 headings in the sidebar
[
700,
600,
600,
600,
600,
600
]
The font family for all text, except code blocks. Can be 'sans-serif', 'serif', 'monospace', a custom font family value, or a comma-separated list of these for fallbacks
Whether to show a border around input widgets in the sidebar
Configuration for Streamlit secrets management
An entry can be a path to a TOML file or directory path where Kubernetes style secrets are saved. Order is important, import is first to last, so secrets in later files will take precedence over earlier ones.
Server configuration options for Streamlit
List of directories to watch for changes. By default, Streamlit watches files in the current working directory and its subdirectories. Use this option to specify additional directories to watch. Paths must be absolute.
[]
List of directories to ignore for changes. By default, Streamlit watches files in the current working directory and its subdirectories. Use this option to specify exceptions within watched directories. Paths can be absolute or relative to the current working directory.
[]
Change the type of file watcher used by Streamlit, or turn it off completely. 'auto' attempts to use watchdog module and falls back to polling, 'watchdog' forces watchdog module, 'poll' forces polling, 'none' disables file watching.
Symmetric key used to produce signed cookies. If deploying on multiple replicas, this should be set to the same value across all replicas to ensure they all share the same secret.
If false, will attempt to open a browser window on start. Default is false unless on a Linux box where DISPLAY is unset, or running in the Streamlit Atom plugin.
Whether to show a terminal prompt for the user's email address when they run Streamlit (locally) for the first time. If server.headless=True, Streamlit will not show this prompt.
Automatically rerun script when the file is modified on disk.
The address where the server will listen for client and browser connections. If set, the server will only be accessible from this address, and not from any aliases (like localhost).
The port where the server will listen for browser connections.
The base path for the URL where Streamlit should be served from.
Enables support for Cross-Origin Resource Sharing (CORS) protection, for added security. If XSRF protection is enabled and CORS protection is disabled at the same time, Streamlit will enable them both instead.
If CORS protection is enabled, use this option to set a list of allowed origins that the Streamlit server will accept traffic from. This config option does nothing if CORS protection is disabled.
[]
Enables support for Cross-Site Request Forgery (XSRF) protection, for added security. If XSRF protection is enabled and CORS protection is disabled at the same time, Streamlit will enable them both instead.
Max size, in megabytes, for files uploaded with the file_uploader.
Max size, in megabytes, of messages that can be sent via the WebSocket connection.
Enables support for websocket compression.
Enable serving files from a 'static' directory in the running app's directory.
TTL in seconds for sessions whose websockets have been disconnected. The server may choose to clean up session state, uploaded files, etc for a given session with no active websocket connection at any point after this time has passed.
Server certificate file for connecting via HTTPS. Must be set at the same time as 'server.sslKeyFile'. DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.
Cryptographic key file for connecting via HTTPS. Must be set at the same time as 'server.sslCertFile'. DO NOT USE THIS OPTION IN A PRODUCTION ENVIRONMENT. It has not gone through security audits or performance tests. For the production environment, we recommend performing SSL termination by the load balancer or the reverse proxy.
Browser configuration options for Streamlit
Address to connect to when opening browser
Whether to send usage statistics to Streamlit
Port where users should point their browsers to connect to the app. This is used to set the correct URL for XSRF protection, show the URL on the terminal, and open the browser automatically. This option is for advanced use cases - to change the port of your app, use server.Port instead. Defaults to whatever value is set in server.port.
Configuration for Mapbox integration (DEPRECATED)
Mapbox API token for displaying maps. DEPRECATED: Use MAPBOX_API_KEY environment variable or PyDeck's api_keys argument instead. This option will be removed on or after 2026-05-01.