Nokku LogoNokku
Nokku LogoNokku

Configuration

Configure the core URL, key type, certificate lifetime, and local SSH integration.

Last updated on Aug 9, 2026

Global options

FlagEnvironment variablePurpose
--apiNK_API_URLCore URL
--tokenNK_TOKENService-account token for headless/CI use; never stored on disk
--key-typeNK_KEY_TYPELocal SSH key type; default ed25519, tpm keeps the private key in a TPM 2.0
--ttlNK_TTLRequested SSH certificate lifetime
--require-tpmNK_REQUIRE_TPMRequire a TPM for request signing; refuse the software fallback
--insecureNK_INSECUREDisable TLS verification; testing only

The current, complete list of nk commands, flags, and environment variables is maintained in the nk README and in nk --help.

For example:

NK_API_URL=https://api.example.com nk login
nk --key-type ed25519 --ttl 4h login

The requested TTL must be allowed by the certificate authority. The core applies the authority’s configured bounds.

Generated SSH configuration

nk writes its generated configuration to ~/.config/nk/ssh_config and includes it from ~/.ssh/config. It also writes target host verification data to ~/.config/nk/known_hosts.

Add personal SSH options in your own ~/.ssh/config; do not edit the generated file.

Local files

Everything nk needs lives under ~/.config/nk/:

  • ~/.config/nk/
    • config.json
    • cache.json
    • signer.json
    • nokku
    • nokku.pub
    • agent.sock
    • ssh_config
    • known_hosts
    • certs/
      • <ca-id>-cert.pub

config.json holds your local configuration (including the device ID), cache.json the synchronized identity, workspace, target, and CA data, and signer.json the device signing identity (the TPM public key, or the machine-wrapped software key). The certs/ folder holds the signed SSH certificates. ssh_config is the generated OpenSSH configuration, and known_hosts the generated CA host entries. agent.sock is the embedded SSH agent socket that nk proxy serves while a connection is in flight when the SSH key is TPM-backed.

Use normal filesystem permissions for these files. The SSH private key (nokku) and the software signing key inside signer.json are credentials. With --key-type tpm, the SSH private key is never written to disk: only nokku.pub exists and the key is re-derived from the TPM on every run. Service-account tokens are never written to disk.

Commands

CommandPurpose
nk loginAuthenticate and synchronize local state
nk refreshRe-authenticate and refresh local state
nk statusShow the current identity and workspace data
nk lsList accessible targets and principals
nk doctorCheck API reachability and local SSH setup
nk cert listList active X.509 certificate authorities
nk cert issueCreate an X.509 key, CSR, and signed certificate
nk logoutRemove local credentials and cached state
nk proxyInternal SSH ProxyCommand implementation