DocsConfiguration Reference

Configuration Reference

Authentication rate limits

loginRateLimit (default 10) and loginRateWindowSec (default 300) limit login attempts per source address and normalized username. resetRateLimit (default 5) and resetRateWindowSec (default 3600) similarly protect password-reset requests. Counts are stored in the SQLAlchemy application database, so all web workers share them. Environment equivalents are LOGIN_RATE_LIMIT, LOGIN_RATE_WINDOW_SEC, RESET_RATE_LIMIT, and RESET_RATE_WINDOW_SEC.

This reference configures the presentation and control layers shown in Architecture and data flows. It does not configure MQTT or field hardware; those responsibilities belong to the publisher and collector projects.

config.json is a JSON object. Each key can also be supplied through the environment variable named beside it; the file takes precedence. Keys that belong only to sensor-network-collector (mqttBroker, storage, signalk*, httpEnabled, ...) are ignored, so a configuration file shared with the collector works unchanged.

Minimal profile

{
  "pathStorage": "/data/storage",
  "authDbPath": "/data/collector_auth.sqlite",
  "databaseUrl": "",
  "webSessionSecret": "replace-with-strong-secret",
  "adminUser": "admin",
  "adminPassword": "replace-with-strong-password",
  "baseUrl": "https://portal.example.org"
}

Key groups

Logging and data source

  • logLevel (LOG_LEVEL): DEBUG|INFO|WARNING|ERROR
  • pathStorage (STORAGE_ROOT): the collector's CSV storage root. Stations are discovered from its sub-directories. The application reads the CSV files and writes station logos under <pathStorage>/_logos and Appearance-panel assets under <pathStorage>/_branding. Without it no station is shown and the watchdog is disabled.
  • signalkPathMap (SIGNALK_PATH_MAP): optional; only meta.units of each entry is used, to label fields that have no built-in unit.

InfluxDB (optional, read-only)

  • influxdb (INFLUXDB_ENABLED): query InfluxDB for public dashboard trends. Defaults to true when influxdbUrl is set, otherwise false.
  • influxdbUrl, influxdbToken, influxdbOrg, influxdbBucket: required when enabled; a read-only token is enough
  • influxMeasurement: measurement written by the collector (default mqtt_data)

Web server and security

  • httpHost, httpPort: bind address of the development server (python main.py); Gunicorn uses its own --bind
  • baseUrl: public URL used in email links (fast-login, onboarding, password reset); its host is also accepted as a valid origin for form submissions. Defaults to http://<httpHost>:<httpPort>
  • databaseUrl: SQLAlchemy URL for the application database. DATABASE_URL is preferred for production secrets; PostgreSQL (postgresql+psycopg://...) is recommended.
  • authDbPath: backwards-compatible SQLite file for users, account requests, station policies and assignments, API/workflow permissions and hashed API tokens, workflows and firing state, chart-control rights, chart axis settings, anomaly log and silence windows, station logos. Defaults to <pathStorage>/collector_auth.sqlite
  • webSessionSecret: strong random secret used to sign session cookies. When it is empty or still a documented sample value (replace-with-...), the application generates a random secret once, stores it in the auth database, and logs a warning; all workers sharing the database then use that stored secret

See database.md for production selection, migration, and backup guidance. - privacyControllerName, privacyControllerContact: controller identity and contact shown in the public privacy notice; complete both before processing personal data - privacyDpoContact: optional DPO contact, when a DPO has been designated - privacyLawfulBasis: the controller's documented GDPR Article 6 basis and purpose - privacyAccountRetentionDays, privacyAuditRetentionDays: documented review periods shown in the notice (default 365 days). The operator must execute and record deletion or a justified retention exception; see Data protection - adminUser, adminPassword: used only to create the admin account when it does not exist yet; an account created with the default (admin) or a sample password must change it at first login - webAppName (WEB_APP_NAME): application name in the web manifest, shown when the app is installed. Defaults to meteo@uniparthenope Sensor Network - webAppShortName (WEB_APP_SHORT_NAME): name under the home-screen icon. Defaults to network.meteo@uniarthenope - webAppLogo: optional absolute path to the app logo image; the bundled meteo@uniparthenope logo is used when empty - webAppIcon (WEB_APP_ICON): optional absolute path to the PNG, JPEG, or WebP application icon; the bundled square icon derived from the meteo@uniparthenope logo is used when empty - webAppLink: optional external URL opened when the home-page logo is clicked - webInfoLink: optional external URL shown as Info before Login on the home page - webThemePrimary (WEB_THEME_PRIMARY): main brand/navigation and installed-PWA colour as a three- or six-digit hexadecimal CSS colour (default #1f4e79) - webThemeSecondary (WEB_THEME_SECONDARY): supporting links, highlights and gradients (default #2a91eb) - webThemeAccent (WEB_THEME_ACCENT): small emphasis details and status accents (default #181c63). Invalid theme colours safely fall back to these defaults.

Administrators can change all of these branding values at runtime in Administration → Settings → Appearance. Database values take precedence over the configuration file and environment variables. Uploaded assets are stored in <pathStorage>/_branding; the reset controls restore the bundled defaults. - mapTileUrl (MAP_TILE_URL): Leaflet tile URL for the home-page map. Defaults to OpenStreetMap's canonical https://tile.openstreetmap.org/{z}/{x}/{y}.png; do not restore the obsolete {s}.tile.openstreetmap.org form. For a public production portal, configure a provider whose capacity and terms fit the expected traffic. - mapTileAttribution (MAP_TILE_ATTRIBUTION): attribution displayed on the map. It must satisfy the selected provider's licence and usage terms.

SMTP and notifications

  • smtpEnabled
  • smtpHost, smtpPort
  • smtpUser, smtpPass
  • smtpFrom (required when smtpEnabled is true)
  • smtpUseTls
  • smtpQueueBatchSize (SMTP_QUEUE_BATCH_SIZE): maximum messages delivered per watchdog scan, from 1 to 100 (default 10)

Behavior:

  • if smtpHost is not set, the application does not try to send emails
  • if smtpPort, smtpUser, and smtpPass are omitted, SMTP defaults to unauthenticated port 25
  • if smtpUser is set, SMTP login is attempted
  • smtpUseTls can explicitly force TLS behavior; the default follows the port/auth fallback
  • all application email is first persisted in the auth database; the watchdog sends at most smtpQueueBatchSize messages per scan and retries failures with exponential backoff up to one hour
  • onboarding, forgot-password, alarm, and workflow emails need SMTP configuration; emails containing application links also need a correct baseUrl
{
  "smtpEnabled": true,
  "smtpHost": "smtp.mailprovider.net",
  "smtpPort": 587,
  "smtpUser": "noreply@example.org",
  "smtpPass": "smtp-password",
  "smtpFrom": "noreply@example.org",
  "smtpUseTls": true,
  "smtpQueueBatchSize": 10
}

Watchdog and workflows

  • watchdogIntervalSec: scan period for anomaly detection and enabled workflow evaluation (minimum 10, default 60)

The scan period is not the email period: emails are sent on status changes and at each user's notification time (default 60 minutes, set on /profile). See Failure notifications.

The same scan evaluates enabled workflows against each referenced station's newest stored row. A condition with multiple station inputs is true when any station matches, and its action fires on an aggregate false-to-true transition. The watchdog runs inside python main.py, or alone with --watchdog-only; Gunicorn workers do not run it. Run exactly one watchdog process.

WSGI

webapp_wsgi.py reads the file named by PWA_CONFIG (falling back to COLLECTOR_CONFIG, then config.json).

This page is rendered directly from docs/configuration.md.
You are offline. Data shown may be out of date.