Install
Reference v0.5.1

CLI & Operations

Every subcommand, flag, backup command, and common operational fix for quarkd v0.5.1.

Global option

Every subcommand accepts -c, --config <PATH> (default: quarkd.toml).

Subcommands (12)

Command Flags Purpose
quarkd init--mode standalone|server|agent, --forceGenerate a starter TOML config with fresh random tokens.
quarkd standalone--configRun all-in-one server, dashboard, MCP, and local log tailers.
quarkd server--configRun hub receiving agent batches + JS beacons.
quarkd agent--configRun agent daemon tailing logs into a bounded spool and shipping zstd batches.
quarkd doctor--jsonVerify config syntax, log readability, DB/spool health, GeoIP, and hub reachability.
quarkd status--jsonPrint agent spool depth or hub fleet status.
quarkd query--site, --hours, --limit, --remote, --jsonQuery analytics directly from local SQLite or a remote hub.
quarkd snippet <TARGET>nginx, nginx-proxy, caddy, caddy-proxy, logrotate, systemd-server, systemd-agent, scriptPrint ready-to-drop config snippets.
quarkd backup-o, --output <PATH>, --forceTake an atomic online SQLite WAL snapshot without stopping the server.
quarkd config-import--configCopy TOML sites, goals, and webhooks into SQLite for UI/MCP ownership.
quarkd hash-passwordinteractive TTY or stdinGenerate an Argon2id admin_password_hash line for server.toml.
quarkd geoip-update--dir <DIR>, --forceDownload or refresh DB-IP City Lite and ASN Lite .mmdb files.
quarkd test-hit--url, --site, --token, --jsonFire synthetic server + JS + AI-crawler hits to verify ingestion and dedup.

Online SQLite backups

Run quarkd backup from cron or systemd timers while quarkd stays online and ingesting:

Shell
quarkd --config /etc/quarkd/server.toml backup   --output /var/backups/quarkd-$(date +%F).db
Expected outputOutput
Backup written to /var/backups/quarkd-2026-12-05.db (consistent WAL snapshot)

Common errors & fixes

Symptom Cause Fix
Pageviews: 0 while Server requests > 0 Site is log-only or /_q.js is blocked/missing. Run Check q.js in Overview (or probe_sites over MCP) and verify the script tag and proxy route.
agent_offline webhook fires Edge agent stopped or cannot reach hub /ingest/v1/batch. Check quarkd status --json on the edge host; events are safely buffered in the bounded SQLite spool until connectivity returns.
All visitors show the proxy's country/IP Reverse proxy CIDR is not in trusted_proxies. Add your proxy/CDN CIDR to [server].trusted_proxies and pass X-Forwarded-For.
409 Conflict when editing a site via MCP Site is still declared in server.toml. Run quarkd config-import, remove the [[sites]] block from TOML, and restart once.