#
Configuration File
Disclaimer
This documentation may be obsolete, incomplete, or incorrect. Please refer to the default config.yaml in your installation for the most up-to-date list of settings.
WARNING: DO NOT EDIT THE DEFAULT CONFIG DIRECTLY. THIS WON'T HAVE ANY POSITIVE EFFECT. EDIT ITS COPY IN THE REPOSITORY ROOT INSTEAD.
config.yaml is the main configuration file for the SillyTavern server which you can find in the repository root directory after completing the installation. It is a YAML file that contains various settings, such as network, security, and backend-specific options. The changes made to this file will take effect after restarting the server.
New settings that are added upstream are automatically populated with default values when you run npm install (specifically, the post-install.js script) after updating the repository. You can then modify these settings as needed.
For nested settings, dot notation is used to indicate the hierarchy. For example, protocol.ipv6: false refers to the ipv6 setting under the protocol section with a value of false.
protocol:
ipv6: false
#
Command-Line Arguments
You can pass command-line arguments when starting the SillyTavern server to override some settings in config.yaml.
#
Examples
node server.js --port 8000 --listen false
# or
npm run start -- --port 8000 --listen false
# or (Windows only)
Start.bat --port 8000 --listen false
#
Supported arguments
None of the arguments are required. If you don't provide them, SillyTavern will use the settings in config.yaml.
#
Environment Variables
Configuration may also be set via environment variables, which will override the values in the config.yaml file.
The environment variables should be prefixed with SILLYTAVERN_ and use uppercase letters for the setting names. For example, the dataRoot setting can be overridden with the SILLYTAVERN_DATAROOT environment variable.
The nested settings should be separated by underscores. For example, protocol.ipv6 can be overridden with the SILLYTAVERN_PROTOCOL_IPV6 environment variable.
Configurations that expect arrays or objects should be JSON-stringified. For example, to override the whitelist setting with the SILLYTAVERN_WHITELIST environment variable, you should set it as a JSON string: SILLYTAVERN_WHITELIST='["127.0.0.1", "::1"]'.
If you are using Node.js v20 or later, you can also store environment variables in a .env file and pass it to the server with the --env-file flag. For example, to use the .env file located in the repository root, you can start the server with the following command:
node --env-file=.env server.js
Alternatively, pass the environment variables directly via the command line:
SILLYTAVERN_LISTEN=true SILLYTAVERN_PORT=8000 node server.js
See more about using environment variables in the Node.js documentation.
#
Data Configuration
#
Logging Configuration
#
Network Configuration
#
SSL Configuration
#
Security Configuration
#
IP Whitelisting
#
Host Whitelisting
#
Security Overrides
DISABLING SECURITY MEASURES IS HIGHLY DISCOURAGED. PLEASE MAKE SURE YOU UNDERSTAND WHAT YOU ARE DOING BEFORE MAKING CHANGES.
#
User Authentication
#
SSO Auto-Login
#
Rate Limiting Configuration
#
Request Proxy Configuration
#
CORS Proxy Configuration
An enabled CORS proxy may be required by some extensions. It is not required by any built-in features.
#
Browser Launch Configuration
Previously known as "Autorun" settings.
#
Performance Configuration
#
Cache Buster Configuration
Requires localhost or a domain with HTTPS, otherwise will not work!
#
Thumbnailing Configuration
#
Backup Configuration
#
Extensions Configuration
#
Server Plugins
#
API Integration Settings
#
OpenAI Configuration
#
MistralAI Configuration
#
Ollama Configuration
#
Claude Configuration
IMPORTANT!
Use with caution and only when the prompt prefix is static and doesn't change between requests. {{random}} macro, lorebooks, vectors, summaries, etc. will likely invalidate the cache and you'll just waste money on cache misses. Behavior may be unpredictable and no guarantees can or will be made.
See: Prompt Caching