#
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 that you can find in the repository root directory after completing the installation. It is a YAML file that contains various settings, such as the network settings, security settings, and backend-specific options. The changes made to this file will take effect after restarting the server.
New settings that added to the upstream version will be automatically populated with the default values when you run npm install
(or 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
#
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 using Node.js >= 20, you can also store the environment variables in a .env
file and pass it to the server using 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 on using environment variables in the Node.js documentation.
#
Data Configuration
#
Logging Configuration
#
Network Configuration
#
SSL Configuration
#
Security Configuration
#
User Authentication
#
Rate Limiting Configuration
#
Request Proxy Configuration
#
AutoRun Configuration
#
Performance Configuration
#
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