Skip to main content
Version: Unreleased

Configuration

Shisho loads configuration at startup. Restart the container or server after changing any option.

Configuration Sources

Values are applied in this order, with later sources taking precedence:

  1. Built-in defaults
  2. A YAML config file
  3. Environment variables

Shisho looks for /config/shisho.yaml by default. Set the bootstrap environment variable CONFIG_FILE to use another file. A complete example is available at shisho.example.yaml.

Every setting below can also be provided as an unprefixed environment variable using its uppercase, underscored name. For example, database_file_path becomes DATABASE_FILE_PATH. Do not add a SHISHO_ prefix.

Environment variables override values from the YAML file. Keep secrets such as JWT_SECRET out of source control.

Settings

Database

SettingEnv VariableDefaultDescription
database_file_pathDATABASE_FILE_PATH/config/shisho.dbPath to the SQLite database file. Optional because the default is applied automatically
database_debugDATABASE_DEBUGfalseEnable SQL query logging for debugging
database_connect_retry_countDATABASE_CONNECT_RETRY_COUNT5Number of connection retry attempts on startup
database_connect_retry_delayDATABASE_CONNECT_RETRY_DELAY2sDelay between connection retry attempts
database_busy_timeoutDATABASE_BUSY_TIMEOUT5sHow long to wait when the database is locked
database_max_retriesDATABASE_MAX_RETRIES5Maximum retries for database operations that report busy or locked errors

Keep the database on persistent storage. The standard image layout persists it through the /config mount. See Deployment and Maintenance before moving or backing up the database.

Server

SettingEnv VariableDefaultDescription
server_hostSERVER_HOST0.0.0.0Reserved for listener configuration. The current server binds all interfaces and does not apply this value
server_portSERVER_PORT3689Internal backend port. The production image publishes its Caddy frontend on container port 5173

The stock production image expects the backend on port 3689. Changing SERVER_PORT without also rebuilding the image's entrypoint and Caddy configuration prevents the image from starting correctly. Publish container port 5173, not backend port 3689, for normal Docker deployments.

Application

SettingEnv VariableDefaultDescription
sync_interval_minutesSYNC_INTERVAL_MINUTES60How often to scan libraries for new content, in minutes. Set to 0 to disable scheduled scans
worker_processesWORKER_PROCESSES2Number of background worker processes
job_retention_daysJOB_RETENTION_DAYS30Days to retain completed and failed jobs before cleanup. Set to 0 to disable cleanup

Library Monitor

SettingEnv VariableDefaultDescription
library_monitor_enabledLIBRARY_MONITOR_ENABLEDtrueEnable real-time filesystem monitoring and targeted rescans. Disable it for filesystems that do not reliably support inotify or FSEvents
library_monitor_delay_secondsLIBRARY_MONITOR_DELAY_SECONDS60Seconds to wait after a filesystem change. Additional changes reset the timer so rapid changes are processed together
Linux inotify Watch Limits

On Linux, including Linux Docker hosts, filesystem monitoring uses the host's inotify limits. Large libraries with many directories may exceed a low fs.inotify.max_user_watches value.

Check and temporarily increase the host limit with:

sysctl fs.inotify.max_user_watches
sudo sysctl -w fs.inotify.max_user_watches=524288

To persist the value on the Linux host:

printf 'fs.inotify.max_user_watches=524288\n' | sudo tee /etc/sysctl.d/99-inotify.conf
sudo sysctl --system

Cache

SettingEnv VariableDefaultDescription
cache_dirCACHE_DIR/config/cacheDirectory for generated downloads, extracted CBZ pages, and rendered PDF pages
download_cache_max_size_gbDOWNLOAD_CACHE_MAX_SIZE_GB5Maximum download cache size in GB. Older files are removed using least-recently-used eviction when the limit is exceeded
pdf_render_dpiPDF_RENDER_DPI200PDF viewer render resolution. Range: 72 to 600. Higher values produce sharper and larger images
pdf_render_qualityPDF_RENDER_QUALITY85JPEG quality for rendered PDF pages. Range: 1 to 100

For cache inspection and clearing, see Deployment and Maintenance.

Plugins

SettingEnv VariableDefaultDescription
plugin_dirPLUGIN_DIR/config/plugins/installedDirectory where installed plugins are stored
plugin_data_dirPLUGIN_DATA_DIR/config/plugins/dataDirectory for persistent plugin caches, tokens, and database files. Data survives plugin updates and normal uninstalls

Enrichment

SettingEnv VariableDefaultDescription
enrichment_confidence_thresholdENRICHMENT_CONFIDENCE_THRESHOLD0.85Confidence threshold from 0 to 1 for automatic metadata enrichment during scans. Results below it are skipped. Per-plugin thresholds take precedence

Supplement Discovery

SettingEnv VariableDefaultDescription
supplement_exclude_patternsSUPPLEMENT_EXCLUDE_PATTERNS[".*", ".DS_Store", "Thumbs.db", "desktop.ini"]Glob patterns excluded from supplement file discovery. The environment variable accepts comma-separated values
pdf_supplement_filenamesPDF_SUPPLEMENT_FILENAMESSee belowCase-insensitive exact PDF basenames, without extensions, used for PDF auto-demotion when a non-PDF main file or existing book is present in the same book directory. A root-level PDF remains a main file. The environment variable accepts comma-separated values. Set an empty list in YAML to disable

The default pdf_supplement_filenames list is:

supplement
supplemental
bonus
bonus material
bonus content
companion
notes
liner notes
errata
booklet
digital booklet
appendix
map
maps
insert
guide
reference
cheat sheet
cheatsheet
cribsheet
pamphlet
extras

See Supplement Files for the exact discovery and classification rules.

Authentication

SettingEnv VariableDefaultDescription
jwt_secretJWT_SECRETNoneRequired secret for signing authentication tokens. Use a long random value of at least 32 characters, for example from openssl rand -hex 32
session_duration_daysSESSION_DURATION_DAYS30Server-wide number of days a login session remains valid before re-authentication

Changing JWT_SECRET invalidates current sessions. Session duration is global, not configurable per user. See Users and Permissions.

Container-Only Environment Variables

info

The variables in this section configure the production container wrapper or its bundled Caddy server. They are not YAML fields in Shisho's application configuration.

Env VariableImage DefaultDescription
CADDY_ACCESS_LOG_OUTPUTdiscardCaddy access log output. Set to stdout to enable access logs
PUID1000User ID selected for Shisho and Caddy processes inside the container. This does not grant host filesystem access
PGID1000Group ID selected for Shisho and Caddy processes inside the container. This does not grant host filesystem access
STARTUP_TIMEOUT_SECONDS120Seconds the entrypoint waits for the internal backend health endpoint before exiting
LOG_FORMATjsonLog format for the image entrypoint, backend, and Caddy. Use console for human-readable output

The image creates and changes ownership of /config, but it does not create or change ownership of /data, /media, or custom paths. Configure host permissions for the selected PUID and PGID.