$ peekd reference

Reference

Server flags, environment variables, runtime settings, CLI configuration, and operational endpoints.

Server Parameters

FlagEnvDefaultNotes
--addrPEEK_ADDR:7700Listen address.
--dataPEEK_DATA./dataData directory for SQLite, generated secret, and file uploads.
--base-urlPEEK_BASE_URLhttp://localhost:7700Public absolute URL. Use HTTPS in production.
--secretPEEK_SECRETgeneratedHMAC/encryption secret. Provide one when multiple processes must share cookie/settings secrets.
--max-uploadPEEK_MAX_UPLOAD2097152Maximum upload size in bytes. Must be greater than zero.
--max-total-sizePEEK_MAX_TOTAL_SIZE0Server-wide storage cap in bytes. 0 means unlimited.
--retention-daysPEEK_RETENTION_DAYS0Delete uploads older than N days. 0 disables.
--trusted-proxyPEEK_TRUSTED_PROXYfalseTrust X-Forwarded-For for analytics and audit IP fields.
--storagePEEK_STORAGEfileStorage backend: file or s3.
--s3-endpointPEEK_S3_ENDPOINTemptyS3-compatible endpoint URL.
--s3-bucketPEEK_S3_BUCKETemptyS3 bucket name.
--s3-regionPEEK_S3_REGIONus-east-1S3 signing region.
--s3-access-keyPEEK_S3_ACCESS_KEYemptyS3 access key ID.
--s3-secret-keyPEEK_S3_SECRET_KEYemptyS3 secret access key.
--s3-allow-private-endpointPEEK_S3_ALLOW_PRIVATE_ENDPOINTfalseAllows HTTP/private/link-local endpoints for controlled private deployments.
--oidc-allow-private-issuerPEEK_OIDC_ALLOW_PRIVATE_ISSUERfalseAllows HTTP/private OIDC issuers for local SSO testing.

PEEK_LOG_LEVEL accepts debug, info, or warn. Any other value falls back to info.

Runtime Settings

Admins can change these from the dashboard or the settings API:

KeyTypeNotes
auth_token_login_enabledbooleanAllows web login with an access token when OAuth is not required.
auth_allowed_email_domainemail domainOptional exact email domain for human sign-in, invites, and CLI browser approval. Empty allows any domain.
oauth_google_enabledbooleanEnables Google login if credentials are configured.
oauth_google_client_idstringGoogle OAuth web client ID.
oauth_google_client_secretsecret stringGoogle OAuth web client secret.
oauth_github_enabledbooleanEnables GitHub login if credentials are configured.
oauth_github_client_idstringGitHub OAuth app client ID.
oauth_github_client_secretsecret stringGitHub OAuth app client secret.
oauth_oidc_enabledbooleanEnables generic OpenID Connect SSO if issuer and credentials are configured.
oauth_oidc_issuer_urlURLOpenID Connect issuer URL. Must be HTTPS and publicly routable unless PEEK_OIDC_ALLOW_PRIVATE_ISSUER=true.
oauth_oidc_client_idstringOpenID Connect client ID.
oauth_oidc_client_secretsecret stringOpenID Connect client secret.
storagefile or s3Startup setting; restart to apply backend changes.
s3_endpointURLValidated to block unsafe endpoints unless private endpoints are explicitly allowed.
s3_bucketstringBucket name for uploaded HTML bytes.
s3_regionstringS3 signing region.
s3_access_keystringS3 access key ID.
s3_secret_keysecret stringS3 secret access key.
max_uploadbytesMaximum individual upload size.
max_total_sizebytesServer-wide storage cap; 0 means unlimited.
max_uploads_per_tokencountPer-owner upload count cap; 0 means unlimited.
max_storage_per_tokenbytesPer-owner storage cap; 0 means unlimited.
retention_daysdaysAuto-delete threshold; 0 disables cleanup.

CLI Configuration

The CLI stores config under the user config directory in peek/config.json. Override per command with:

PEEK_HOST=https://peek.example.com
PEEK_TOKEN=...

Token input paths, from safest to least safe:

peek login
peek login --token-stdin
peek login --token-file <path>
peek login --token <value>

Operational Endpoints

EndpointPurpose
/healthzLiveness.
/readyzReadiness, including database reachability.
/metricsPrometheus text metrics. Protect it before exposing Peek outside a trusted network.
/setupFirst-run setup only. Closes after the first account exists.
/oauth/google/callbackGoogle OAuth callback.
/oauth/github/callbackGitHub OAuth callback.
/oauth/oidc/callbackGeneric OpenID Connect callback.

Operator Checks

Health:

peekd healthcheck --addr https://peek.example.com
curl -fsS https://peek.example.com/readyz

Backup:

PEEK_DATA=/var/lib/peek peekd backup /backups/peek-$(date +%F).db

Smoke upload:

peek login --host https://peek.example.com
printf '<!doctype html><h1>Peek smoke</h1>' > /tmp/peek-smoke.html
peek upload /tmp/peek-smoke.html --visibility public
peek list