Skip to content
☁️ HitKeep Cloud is coming! Join the Early Access waitlist →

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.
-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.

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.