Skip to content
☁️ HitKeep Cloud is live. Choose EU or US and start now →

Configuration Reference

HitKeep follows the 12-factor app methodology. You can configure the application using either Command Line Flags or Environment Variables.

Flags take precedence over environment variables.

These are the most critical settings to get HitKeep running correctly.

FlagEnv VariableDefaultDescription
-public-urlHITKEEP_PUBLIC_URLhttp://localhost:8080Required. The public-facing URL where HitKeep is accessible. Used for CORS, email links, and JWT issuer validation.
-jwt-secretHITKEEP_JWT_SECRET(randomly generated)Required for production. A long random string used to sign authentication tokens. If not provided, sessions will invalidate on restart.
-dbHITKEEP_DB_PATHhitkeep.dbPath to the embedded DuckDB database file. In Docker, this is mapped to /var/lib/hitkeep/data/hitkeep.db.
-data-pathHITKEEP_DATA_PATHdataBase directory for tenant-local analytics databases and other local state. In multiteam installs, this whole tree is part of the backup boundary.
-httpHITKEEP_HTTP_ADDR:8080The interface and port for the HTTP server to listen on.
-log-levelHITKEEP_LOG_LEVELinfoLogging verbosity. Options: debug, info, warn, error.
FlagEnv VariableDefaultDescription
-archive-pathHITKEEP_ARCHIVE_PATHarchiveDirectory for exports, rollups, and archival artifacts.
-retention-daysHITKEEP_DATA_RETENTION_DAYS365Default data retention window (days) for newly created sites.

HitKeep can periodically export all live databases (shared + per-tenant) to Parquet snapshots. Set HITKEEP_BACKUP_PATH to enable.

FlagEnv VariableDefaultDescription
-backup-pathHITKEEP_BACKUP_PATH"" (disabled)Backup destination — local directory or s3:// URL. Empty disables backups.
-backup-intervalHITKEEP_BACKUP_INTERVAL60Minutes between backup runs.
-backup-retentionHITKEEP_BACKUP_RETENTION24Number of snapshots to keep before pruning older ones.

When HITKEEP_BACKUP_PATH is an s3:// URL, the same S3 credentials configured below are used. For local paths, old snapshots beyond the retention count are automatically deleted. For S3, configure lifecycle policies on your bucket.

See Backups and Restore and S3 Backups for concrete layouts and restore examples.

When HITKEEP_ARCHIVE_PATH is set to an s3:// URL, HitKeep writes Parquet archives directly to S3-compatible storage via DuckDB’s httpfs extension.

Authentication mode is auto-detected:

  • If HITKEEP_S3_ACCESS_KEY_ID and HITKEEP_S3_SECRET_ACCESS_KEY are both set, HitKeep uses static credentials.
  • If neither is set, HitKeep uses the AWS credential chain (environment variables, shared config, instance profiles, STS, SSO).
FlagEnv VariableDefaultDescription
-s3-access-key-idHITKEEP_S3_ACCESS_KEY_ID""AWS access key ID for static credential authentication.
-s3-secret-access-keyHITKEEP_S3_SECRET_ACCESS_KEY""AWS secret access key for static credential authentication.
-s3-session-tokenHITKEEP_S3_SESSION_TOKEN""STS temporary session token (used with static credentials).
-s3-regionHITKEEP_S3_REGIONus-east-1S3 region for the archive bucket.
-s3-endpointHITKEEP_S3_ENDPOINT""Custom S3-compatible endpoint (e.g., MinIO, Cloudflare R2, DigitalOcean Spaces).
-s3-url-styleHITKEEP_S3_URL_STYLE""URL addressing style: path or vhost. Empty uses the DuckDB default.
-s3-use-sslHITKEEP_S3_USE_SSLtrueSet to false for local S3-compatible endpoints over HTTP (e.g., MinIO dev).

See S3 Backups for end-to-end examples with AWS S3, MinIO, and Cloudflare R2.

Settings for binding ports and clustering nodes.

FlagEnv VariableDefaultDescription
-nameHITKEEP_NODE_NAMEhostname-timestampUnique identifier for this node in a cluster.
-bindHITKEEP_BIND_ADDR0.0.0.0:7946The address used for cluster communication (Memberlist/Gossip).
-joinHITKEEP_JOIN_ADDR""The address of an existing peer node to join when starting in clustered mode.

Required for “Forgot Password” functionality.

FlagEnv VariableDefaultDescription
-mail-driverHITKEEP_MAIL_DRIVERsmtpCurrently only smtp is supported.
-mail-hostHITKEEP_MAIL_HOST""SMTP Server Hostname (e.g., smtp.postmarkapp.com).
-mail-portHITKEEP_MAIL_PORT587SMTP Server Port.
-mail-usernameHITKEEP_MAIL_USERNAME""SMTP Username.
-mail-passwordHITKEEP_MAIL_PASSWORD""SMTP Password.
-mail-encryptionHITKEEP_MAIL_ENCRYPTIONtlsEncryption mode: tls (STARTTLS), ssl (Implicit TLS), or none.
-mail-from-addressHITKEEP_MAIL_FROM_ADDRESShitkeep@localhostThe email address messages are sent from.
-mail-from-nameHITKEEP_MAIL_FROM_NAMEHitKeepThe sender name displayed in inboxes.
-mail-insecure-skip-verifyHITKEEP_MAIL_INSECURE_SKIP_VERIFYfalseSet to true to accept self-signed certificates (not recommended for production).

HitKeep includes a built-in rate limiter to protect against abuse. Limits are defined per IP address.

High throughput endpoint for tracking scripts.

FlagEnv VariableDefaultDescription
-ingest-rateHITKEEP_INGEST_RATE_LIMIT20.0Requests per second allowed per IP.
-ingest-burstHITKEEP_INGEST_BURST40Maximum burst size allowed per IP.

General data retrieval endpoints.

FlagEnv VariableDefaultDescription
-api-rateHITKEEP_API_RATE_LIMIT10.0Requests per second allowed per IP.
-api-burstHITKEEP_API_BURST20Maximum burst size allowed per IP.

Strict limits to prevent brute-force attacks.

FlagEnv VariableDefaultDescription
-auth-rateHITKEEP_AUTH_RATE_LIMIT2.0Requests per second allowed per IP.
-auth-burstHITKEEP_AUTH_BURST5Maximum burst size allowed per IP.

Use this when HitKeep is behind a reverse proxy or load balancer and you want to trust forwarded headers. This affects both rate limiting and GeoIP resolution.

FlagEnvironment VariableDefaultDescription
-trusted-proxiesHITKEEP_TRUSTED_PROXIES""Comma-separated list of trusted proxy CIDRs (e.g. 10.0.0.0/8,127.0.0.1/32).

Behavior:

  • If empty, HitKeep trusts proxy headers from any direct peer.
  • If set, HitKeep only trusts proxy headers when the direct connection IP is in the trusted list.

Configuration for embedded components. You generally do not need to change these unless you are developing HitKeep or have port conflicts on the host network.

FlagEnv VariableDefaultDescription
-nsq-tcp-addressHITKEEP_NSQ_TCP_ADDRESS127.0.0.1:4150Bind address for the embedded NSQ TCP interface.
-nsq-http-addressHITKEEP_NSQ_HTTP_ADDRESS127.0.0.1:4151Bind address for the embedded NSQ HTTP API.