Configuration

Configuration

clipd is configured entirely through command-line flags. Every flag has a sensible default, so a bare ./bin/clipd works out of the box.

			./bin/clipd 
  --db ./clipboard.db 
  --socket /tmp/clipd.sock 
  --poll-interval 500ms 
  --log-level info
		

Storage and API

FlagDescriptionDefault
--dbPath to the SQLite database./clipboard.db
--socketPath to the Unix socket/tmp/clipd.sock
--read-timeoutHTTP read timeout10s
--write-timeoutHTTP write timeout10s
--idle-timeoutHTTP idle timeout10s

Daemon behavior

FlagDescriptionDefault
--poll-intervalHow often the clipboard is checked500ms
--shutdown-timeoutGraceful shutdown deadline5s
--pid-filePath to the PID file/tmp/clipd-<uid>.pid

Durations use Go syntax: 500ms, 2s, 1m, 24h.

Retention

The daemon prunes old entries automatically so the database does not grow forever.

FlagDescriptionDefault
--retention-enabledEnable automatic cleanuptrue
--retention-max-ageEntries older than this are pruned720h (30 days)
--retention-intervalHow often the cleanup runs24h

Retention deletes permanently

Pruned entries are removed from the database and cannot be recovered. Raise --retention-max-age or disable retention if you want a longer history.

Logging

FlagDescriptionDefault
--log-leveldebug, info, warn, or errorinfo
--log-formattext or jsontext
--log-outputstdout, file, or bothboth
--log-fileLog file path./logs/clipd.log
--log-max-sizeMax log file size in MB before rotation10
--log-max-backupsRotated files to keep3
--log-max-ageDays to keep rotated files30

Logs rotate automatically once a file reaches --log-max-size.