| layout | default |
|---|---|
| title | Configuration |
| nav_order | 3 |
Complete reference for all configuration options in Dashpub.
All configuration is done through environment variables. Create a .env file in the app/ directory or set them in your deployment environment.
# Server port (default: 3000)
PORT=3000
# Node environment
NODE_ENV=production # or 'development'# Splunk REST API URL (Required)
SPLUNKD_URL=https://your-splunk-instance:8089
# Authentication - Use either username/password OR token
SPLUNKD_USER=admin
SPLUNKD_PASSWORD=your_password
# OR use token authentication
SPLUNKD_TOKEN=your_api_token
# Splunk UI Port (for fetching static assets)
SPLUNKD_UI_PORT=8000 # Default: 8000
# Splunk UI Locale (for static asset URLs only)
# Leave this at en-US: Splunk may not ship static assets for every locale.
SPLUNKD_LOCALE=en-US # Default: en-US# Dashboard title (shown on homepage)
NEXT_PUBLIC_DASHPUBTITLE=My Dashboards
# Theme (light or dark) — the default/global publication theme.
# Individual dashboards override this with their own "theme" field in the
# dashboard definition JSON (e.g. "theme": "dark"); dashpub renders each
# dashboard in its own theme and falls back to this value when a dashboard
# doesn't set one.
NEXT_PUBLIC_HOMETHEME=light
# Footer text
NEXT_PUBLIC_DASHPUBFOOTER=Hosted Splunk Dashboards
# Hosted by information
NEXT_PUBLIC_DASHPUBHOSTEDBY=Your Company
NEXT_PUBLIC_DASHPUBHOSTEDURL=https://yourcompany.com
# Repository link
NEXT_PUBLIC_DASHPUBREPO=https://github.com/yourusername/dashpub# Enable screenshots for dashboard thumbnails
NEXT_PUBLIC_DASHPUBSCREENSHOTS=false
# Base URL where screenshots are hosted (optional)
# Leave empty to use relative paths
NEXT_PUBLIC_BASE_SCREENSHOT_URL=
# Screenshot directory name
NEXT_PUBLIC_DASHPUBSCREENSHOTDIR=screenshots
# Screenshot file extension
NEXT_PUBLIC_DASHPUBSCREENSHOTEXT=png# Enable breadcrumb navigation (default: true)
NEXT_PUBLIC_DASHPUBBREADCRUMBS=true
# Show back button in breadcrumbs (default: true)
NEXT_PUBLIC_DASHPUBBREADCRUMBSBACKBUTTON=true# Show a "View source" button on each dashboard (default: false).
# When enabled, a Splunk-UI pill button (top-right) opens a modal with the
# dashboard's Dashboard Studio definition JSON + copy-to-clipboard. Useful for
# demos/contests where viewers want to copy the source into their own Splunk.
# Read at runtime by /api/config — no rebuild needed to toggle.
DASHPUB_VIEW_SOURCE=false# Rotation interval in milliseconds (default: 15000)
REACT_APP_TAB_ROTATION_INTERVAL=15000
# Enable/disable tab rotation (default: true)
REACT_APP_TAB_ROTATION_ENABLED=true# Rate limiting window in milliseconds (default: 900000 = 15 minutes)
RATE_LIMIT_WINDOW_MS=900000
# Maximum requests per window
RATE_LIMIT_MAX_REQUESTS=1000
# Maximum retry attempts
MAX_RETRIES=3
# Search job delay (milliseconds)
SEARCH_JOB_DELAY_MS=250
# Minimum refresh time (seconds)
MIN_REFRESH_TIME=60# Require JWT authentication
JWT_REQUIRED=false
# JWT secret key (change in production!)
JWT_SECRET=your-secret-key-change-in-production
# JWT expiry time
JWT_EXPIRES_IN=24h
# JWT username and password
JWT_USERNAME=admin
JWT_PASSWORD=your_password
# API key header name
API_KEY_HEADER=X-API-Key# Log file max size
LOG_MAX_SIZE=10m
# Maximum number of log files
LOG_MAX_FILES=5
# Log directory
LOG_DIR=./logs
# Log retention (days)
LOG_RETENTION_DAYS=30# Enable HEC logging
SPLUNK_HEC_ENABLED=false
# HEC endpoint URL
SPLUNK_HEC_URL=https://your-splunk-instance:8088/services/collector
# HEC token
SPLUNK_HEC_TOKEN=your-hec-token-here
# HEC index
SPLUNK_HEC_INDEX=main
# HEC source
SPLUNK_HEC_SOURCE=dashpub
# HEC sourcetype
SPLUNK_HEC_SOURCETYPE=dashpub:app:logs
# HEC host
SPLUNK_HEC_HOST=your-hostname
# Batch configuration
SPLUNK_HEC_BATCH_SIZE=100
SPLUNK_HEC_BATCH_TIMEOUT=5000
SPLUNK_HEC_MAX_RETRIES=3
SPLUNK_HEC_RETRY_DELAY=1000When using Docker, you can use DASHPUB_* prefix instead of NEXT_PUBLIC_*:
# These are automatically mapped to NEXT_PUBLIC_* for local development
DASHPUB_TITLE=My Dashboards
DASHPUB_SCREENSHOTS=false
DASHPUB_BREADCRUMBS=true
DASHPUB_BREADCRUMBS_BACK_BUTTON=trueEnvironment variables are loaded in this order:
- System environment variables
.envfile inapp/directory.envfile in project root- Default values
Some settings can be changed at runtime via the /api/config endpoint:
curl http://localhost:3000/api/configThis returns the current configuration including:
- Dashboard display settings
- Screenshot configuration
- Breadcrumb settings
- Tab rotation settings
- Never commit
.envfiles - Add.envto.gitignore - Use strong secrets - Generate random strings for JWT_SECRET
- Use environment-specific configs - Different
.envfiles for dev/staging/prod - Document your config - Keep a
.env.examplefile with all variables - Validate on startup - Check that required variables are set
NODE_ENV=development
PORT=3000
SPLUNKD_URL=http://localhost:8089
SPLUNKD_USER=admin
SPLUNKD_PASSWORD=changeme
NEXT_PUBLIC_DASHPUBTITLE=Development Dashboards
NEXT_PUBLIC_DASHPUBSCREENSHOTS=falseNODE_ENV=production
PORT=3000
SPLUNKD_URL=https://splunk.production.com:8089
SPLUNKD_TOKEN=secure-token-here
NEXT_PUBLIC_DASHPUBTITLE=Production Dashboards
NEXT_PUBLIC_DASHPUBSCREENSHOTS=true
NEXT_PUBLIC_BASE_SCREENSHOT_URL=https://cdn.example.com
JWT_REQUIRED=true
JWT_SECRET=very-secure-random-string