Skip to content

Latest commit

 

History

History
138 lines (81 loc) · 3.55 KB

File metadata and controls

138 lines (81 loc) · 3.55 KB

Environment Variables

Configure Tracktor by setting environment variables in a .env file in the root directory or as system environment variables.

Application Settings

NODE_ENV

Application environment.

  • Values: development, production, test
  • Default: development

HOST

Hostname or IP address for the server. Set to 0.0.0.0 to listen on all network interfaces.

  • Values: Any valid hostname or IP address. Used only on production or build
  • Default: localhost

PORT

Port number for the server.

  • Values: Any available port number. Used only on production or build
  • Default: 3000

BASE_URL

Base path for serving the application behind a reverse proxy. When hosting Tracktor under a sub-path (e.g., https://example.com/tracktor/), set this to the sub-path (e.g., /tracktor). This ensures all assets, API calls, and routing work correctly.

  • Values: Any valid URL path (must start with / and not end with /)
  • Default: `` (empty string, serves from root)
  • Example: /tracktor, /apps/tracktor
  • Note: Do not include trailing slashes

Database

DB_PATH

Path to the SQLite database file.

  • Values: Any valid file path
  • Default: ./tracktor.db
  • Docker: /data/tracktor.db

File Storage

UPLOADS_DIR

Directory for uploaded files.

  • Values: Any valid directory path
  • Default: ./uploads
  • Docker: /data/uploads

Security

CORS_ORIGINS

Allowed origins for Cross-Origin Resource Sharing (CORS). When using Tracktor behind a reverse proxy or with a frontend on a different domain/port, set this to specific origins for security.

  • Values: Comma-separated list of origins (e.g., http://example.com,https://anotherdomain.com)
  • Default: * (allows all origins)

TRACKTOR_DISABLE_AUTH

Disable authentication (not recommended for production).

  • Values: true, false
  • Default: false

APP_SECRET

Secret key used to encrypt stored credentials (e.g. notification provider passwords). Required once you configure any notification provider — the app refuses to store or read credentials without it.

  • Values: Any random string
  • Default: none (must be set to use notification providers)
  • Generate: openssl rand -hex 32

HTTP_MODE

Controls whether auth cookies are marked secure. Set to https when Tracktor is served over HTTPS (e.g. behind a TLS-terminating reverse proxy) so the session cookie gets the secure flag.

  • Values: http, https
  • Default: http

Demo Mode

TRACKTOR_DEMO_MODE

Enable demo mode with sample data.

  • Values: true, false
  • Default: false

FORCE_DATA_SEED

Force database seeding with demo data on startup overwriting the existing data (requires TRACKTOR_DEMO_MODE=true).

  • Values: true, false
  • Default: false

Logging

LOG_REQUESTS

Enable HTTP request logging.

  • Values: true, false
  • Default: true

LOG_LEVEL

Logging verbosity level.

  • Values: error, warn, info, http, verbose, debug, silly
  • Default: info

LOG_DIR

Directory for log files.

  • Values: Any valid directory path
  • Default: ./logs

BODY_SIZE_LIMIT

Limits the upload size of image/documents.

  • Values: Any number (size in bytes)
  • Default: 512Kb
  • Docker: Infinity (removes restriction)

Notes

  • Environment variables can be set in a .env file in the root directory or as system environment variables
  • Restart the application after changing environment variables for changes to take effect