?

Overview

The state.* block picks where rousseau persists everything: sessions, messages, cron jobs, JID map, claude cache, FTS5 recall index. Concrete implementation: internal/state/sqlite/store.go.

state.*

Field Type Default Required Description Source
state.path string $XDG_DATA_HOME/rousseau/sessions.db (defaults to ~/.local/share/rousseau/sessions.db) no Absolute path to the SQLite database. Parent directories are created with mode 0755. StateConfig.Path in internal/config/config.go; default injected in setDefaults

That's the only key. Everything else is fixed by the SQLite pragmas applied in sqlitestore.Open:

Pragma Value Rationale
journal_mode WAL Concurrent readers, single writer, safe under crashes.
busy_timeout 15000 15s wait before returning SQLITE_BUSY.
foreign_keys 1 Cascading deletes when a session is removed.
synchronous NORMAL Durability + speed compromise (WAL truncates on checkpoint).

Environment variables

Variable Effect
ROUSSEAU_STATE_PATH Overrides state.path.
XDG_DATA_HOME Base directory when state.path is unset.

Worked examples

# No override needed

Rousseau creates ~/.local/share/rousseau/sessions.db on first launch.

Migration paths

  • Bare-metal → container: copy the file, adjust Volume= in the Quadlet unit, restart. WAL/SHM files can travel with the main DB but will be recreated at first open.
  • Move to a bigger disk: stop rousseau, cp -a sessions.db* /new/location/, update state.path, restart.
  • Reset: rm ~/.local/share/rousseau/sessions.db* — you lose all conversation history and cron jobs. Consider rousseau session delete <id> --yes for targeted removal.

See Migrations: Container migration and Best Practices: Disaster recovery.

Related pages

Type to search 150+ pages. Ranking: BM25 with title/description boost.