To sync your RSS data across devices (e.g., Mac + future iOS app):
-
Edit
~/.config/kenseader/config.toml -
Set
data_dirto your cloud storage path:[general] # iCloud (macOS) data_dir = "~/Library/Mobile Documents/com~apple~CloudDocs/kenseader" # Or Dropbox # data_dir = "~/Dropbox/kenseader"
-
Restart the daemon:
kenseader daemon stop && kenseader daemon start
- Tilde Expansion: Paths support
~for home directory (e.g.,~/Dropbox/kenseader) - Auto Migration: When you change
data_dir, existing data is automatically migrated to the new location - Conflict Detection: If the new path already has a database file, the daemon will report an error instead of overwriting
| Item | Synced | Notes |
|---|---|---|
Database (kenseader.db) |
Yes | Contains feeds, articles, read status, summaries |
Image Cache (image_cache/) |
Yes | Cached article images |
Socket File (kenseader.sock) |
No | Local IPC only |
PID File (daemon.pid) |
No | Local process tracking |
When using cloud sync, you can run the TUI in read-mode to browse articles without a running daemon. This is useful when:
- You have the daemon running on one machine (e.g., desktop) but want to read on another (e.g., laptop)
- You want quick read-only access without starting the daemon
- You're using cloud sync and another device is handling feed updates
# Start TUI in read-mode (no daemon required)
kenseader run --read-modeRead-mode features:
- Browses articles directly from the synced database
- Can toggle read/unread status (writes to database with retry on lock)
- Can save/bookmark articles
- Shows
[READ]indicator in status bar and window title
Read-mode limitations:
- Cannot refresh feeds (daemon handles this)
- Cannot add/delete feed subscriptions
- Database writes may occasionally fail if another device is writing (retries automatically)
Typical workflow:
- Run daemon on your main machine:
kenseader daemon start - On other devices, just use read-mode:
kenseader run --read-mode - Cloud sync keeps the database in sync across all devices
Kenseader uses several SQLite optimizations to enable reliable multi-device cloud sync:
The database uses WAL journal mode instead of the default DELETE mode. This provides:
- Concurrent reads and writes: Multiple devices can read simultaneously while one writes
- Better performance: Readers don't block writers and vice versa
- Crash recovery: Incomplete transactions are automatically rolled back
All database operations (reads and writes) include automatic retry logic:
- On transient errors (busy, locked, I/O errors from cloud sync), operations retry up to 5 times
- Uses exponential backoff (200ms, 400ms, 800ms, 1600ms, 3200ms)
- Covers
SQLITE_BUSY,SQLITE_LOCKED,SQLITE_IOERR_SHORT_READ, and other transient I/O errors - Most concurrent access conflicts resolve within 1-2 retries
On startup, the application checks for stale lock files (.db-wal, .db-shm) that may have been created by other devices and improperly synced. Files older than 30 seconds are automatically cleaned up.
The following SQLite settings optimize for cloud sync scenarios, applied per-connection to ensure every connection in the pool is properly configured:
busy_timeout = 10000- Wait up to 10 seconds for locks (increased for high-concurrency)journal_mode = WAL- Enable WAL modesynchronous = NORMAL- Balance between safety and performancewal_autocheckpoint = 2000- Periodic WAL checkpointing (~8MB)
To handle high-concurrency scenarios (daemon + TUI + cloud sync):
- Connection pool: 15 connections (up from 5) to handle parallel operations
- IPC concurrency limit: Maximum 10 concurrent requests processed simultaneously to prevent pool exhaustion
- Batch operations: Tags are inserted in batches to reduce database round trips
- The config file (
~/.config/kenseader/config.toml) is NOT synced - it stays local - For future iOS development: The SQLite database can be read directly by iOS apps using libraries like GRDB.swift or SQLite.swift