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.
Storage and API
| Flag | Description | Default |
|---|---|---|
--db | Path to the SQLite database | ./clipboard.db |
--socket | Path to the Unix socket | /tmp/clipd.sock |
--read-timeout | HTTP read timeout | 10s |
--write-timeout | HTTP write timeout | 10s |
--idle-timeout | HTTP idle timeout | 10s |
Daemon behavior
| Flag | Description | Default |
|---|---|---|
--poll-interval | How often the clipboard is checked | 500ms |
--shutdown-timeout | Graceful shutdown deadline | 5s |
--pid-file | Path 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.
| Flag | Description | Default |
|---|---|---|
--retention-enabled | Enable automatic cleanup | true |
--retention-max-age | Entries older than this are pruned | 720h (30 days) |
--retention-interval | How often the cleanup runs | 24h |
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
| Flag | Description | Default |
|---|---|---|
--log-level | debug, info, warn, or error | info |
--log-format | text or json | text |
--log-output | stdout, file, or both | both |
--log-file | Log file path | ./logs/clipd.log |
--log-max-size | Max log file size in MB before rotation | 10 |
--log-max-backups | Rotated files to keep | 3 |
--log-max-age | Days to keep rotated files | 30 |
Logs rotate automatically once a file reaches --log-max-size.