#Configuration File

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

#Data Configuration

SettingDescriptionDefaultPermitted Values
dataRootRoot directory for user data storage./dataAny valid directory path
minLogLevelMinimum log level to display in the terminal0 (DEBUG)(DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3)
cardsCacheCapacityThe maximum amount of memory that parsed character cards can use in MB.100Any positive integer
skipContentCheckSkip new default content checksfalsetrue, false
enableDownloadableTokenizersEnable on-demand tokenizer downloadstruetrue, false
SettingDescriptionDefaultPermitted Values
listenEnable listening for incoming connectionsfalsetrue, false
portServer listening port8000Any valid port number (1-65535)
protocol.ipv4Enable listening on IPv4 protocoltruetrue, false, auto
protocol.ipv6Enable listening on IPv6 protocolfalsetrue, false, auto
listenAddress.ipv4Listen on specific IPv4 address0.0.0.0Valid IPv4 address
listenAddress.ipv6Listen on specific IPv6 address'[::]'Valid IPv6 address
dnsPreferIPv6Prefer IPv6 for DNS resolutionfalsetrue, false

#Security Configuration

SettingDescriptionDefaultPermitted Values
whitelistModeEnable IP whitelist filteringtruetrue, false
enableForwardedWhitelistCheck forwarded headers for whitelisted IPstruetrue, false
whitelistList of allowed IP addresses["::1", "127.0.0.1"]Array of valid IP addresses
enableCorsProxyEnable CORS proxy middlewarefalsetrue, false
allowKeysExposureAllow API keys exposure in the UIfalsetrue, false
disableCsrfProtectionDisable CSRF protection (not recommended)falsetrue, false
securityOverrideDisable startup security checks (not recommended)falsetrue, false
SettingDescriptionDefaultPermitted Values
basicAuthModeEnable basic authenticationfalsetrue, false
basicAuthUser.usernameBasic auth username"user"Any string
basicAuthUser.passwordBasic auth password"password"Any string
enableUserAccountsEnable multi-user modefalsetrue, false
enableDiscreetLoginHide user list on login screenfalsetrue, false
sessionTimeoutUser session timeout in seconds-1 (disabled)Any number (-1 to disable, 0 for browser close, >0 for timeout)
cookieSecretSecret for signing session cookies'' (auto-generated)Any string
autheliaAuthEnable Authelia-based auto login. See: SSOfalsetrue, false
perUserBasicAuthUse account credentials for basic authfalsetrue, false

#Request Proxy Configuration

SettingDescriptionDefaultPermitted Values
requestProxy.enabledEnable proxy for outgoing requestsfalsetrue, false
requestProxy.urlProxy server URLnullValid proxy URL (e.g., "socks5://username:password@example.com:1080")
requestProxy.bypassHosts to bypass proxy["localhost", "127.0.0.1"]Array of hostnames/IPs

#AutoRun Configuration

SettingDescriptionDefaultPermitted Values
autorunOpen browser automatically on startuptruetrue, false
autorunHostnameHostname used when autorun opens the browser"auto""auto", any valid hostname (e.g., "localhost", "st.example.com")
autorunPortOverrideOverride port for browser autorun-1-1 (use server port), any valid port number
avoidLocalhostAvoid using 'localhost' for autorunfalsetrue, false

#Thumbnailing Configuration

SettingDescriptionDefaultPermitted Values
thumbnails.enabledEnable thumbnail generationtruetrue, false
thumbnails.qualityJPEG thumbnail quality950-100
thumbnails.formatImage format for thumbnailsjpgjpg, png
thumbnails.dimensions.bgBackground thumbnails size[160, 90]Array of two numbers (width, height)
thumbnails.dimensions.avatarAvatar thumbnails size[96, 144]Array of two numbers (width, height)

#Backup Configuration

SettingDescriptionDefaultPermitted Values
backups.chat.enabledEnable automatic chat backupstruetrue, false
backups.common.numberOfBackupsNumber of backups to keep50Any positive integer
backups.chat.throttleIntervalBackup throttle interval (ms)10000Any positive integer
backups.chat.maxTotalBackupsMaximum total chat backups to keep-1Any positive integer or -1
SettingDescriptionDefaultPermitted Values
extensions.enabledEnable UI extensionstruetrue, false
extensions.autoUpdateAuto-update extensionstruetrue, false
extensions.models.autoDownloadEnable automatic model downloadstruetrue, false
extensions.models.classificationHuggingFace model ID for classification"Cohee/distilbert-base-uncased-go-emotions-onnx"Valid model ID
extensions.models.captioningHuggingFace model ID for image captioning"Xenova/vit-gpt2-image-captioning"Valid model ID
extensions.models.embeddingHuggingFace model ID for embeddings"Cohee/jina-embeddings-v2-base-en"Valid model ID
extensions.models.speechToTextHuggingFace model ID for speech-to-text"Xenova/whisper-small"Valid model ID
extensions.models.textToSpeechHuggingFace model ID for text-to-speech"Xenova/speecht5_tts"Valid model ID
SettingDescriptionDefaultPermitted Values
enableServerPluginsEnable server-side pluginsfalsetrue, false
enableServerPluginsAutoUpdateAttempt to automatically update server plugins on startuptruetrue, false

#OpenAI Configuration

SettingDescriptionDefaultPermitted Values
promptPlaceholderDefault message for empty prompts"[Start a new chat]"Any string
openai.randomizeUserIdRandomize user ID for API callsfalsetrue, false
openai.captionSystemPromptSystem message for caption completion""Any string

#MistralAI Configuration

SettingDescriptionDefaultPermitted Values
mistral.enablePrefixEnable reply prefilling. The prefix will be echoed in the responsefalsetrue, false

#Ollama Configuration

SettingDescriptionDefaultPermitted Values
ollama.keepAliveModel keep-alive duration (seconds)-1-1 (indefinite), 0 (immediate unload), positive integer
ollama.batchSizeControls the "num_batch" (batch size) parameter of the generation request-1-1 (model default), positive integer

#Claude Configuration

SettingDescriptionDefaultPermitted Values
claude.enableSystemPromptCacheEnable system prompt cachingfalsetrue, false
claude.cachingAtDepthEnable message history caching-1-1 (disabled), 0 or positive integer

#DeepL Configuration

SettingDescriptionDefaultPermitted Values
deepl.formalityTranslation formality level"default""default", "more", "less", "prefer_more", "prefer_less"