Skip to content

Daemon and Status

Knot's background daemon owns persistent SSH connections, remote execution, SFTP, port forwarding, status queries, and connection cleanup. The CLI can auto-start the daemon when needed.

Daemon Commands

sh
knot daemon [command]
CommandDescription
knot daemon startStart the daemon. Hidden shortcut: knot start.
knot daemon stopStop the daemon. Hidden shortcut: knot stop.
knot daemon restartRestart the daemon. Hidden shortcut: knot restart.
knot daemon clearDisconnect all active SSH connections held by the daemon. Hidden shortcut: knot clear.

knot daemon start supports:

FlagTypeDefaultDescription
-f, --foregroundboolfalseRun the daemon in the foreground.

Examples:

sh
knot daemon start
knot daemon start --foreground
knot daemon clear

Status

sh
knot status
knot status --json

knot status shows daemon status and connection pool statistics. Use --json for scripts.

Logs

sh
knot logs [flags]
FlagTypeDefaultDescription
-t, --tailint100Number of lines to show from the end of the log file.
-f, --followboolfalseFollow log output.

Examples:

sh
knot logs
knot logs --tail=50
knot logs --tail=20 -f