Local storage

The Local storage page configures where the gateway stores collected data locally. You can define one or more databases, configure retention buckets, and apply advanced settings through a JSON editor.
Databases
The database list shows all configured local databases for this gateway configuration.
-
Add a database: Create a new database configuration using the Add action in the database list.
-
Duplicate a database: Duplicate creates a copy of an existing database configuration. Use this when you need the same setup with small changes (for example, a different address, port, or database type).
-
Delete a database: Delete removes the selected database configuration.
Settings (Database settings)
The Settings tab defines how the gateway connects to the selected database.
Configuration Name
A human-readable name for the database configuration.
Database Type
Select the backend used for local storage. Options include:
- Influx
- CSV
- MQTT
- Redis
- Influx 2
- NATS JetStream
- TimescaleDB - Wide Table
- TimescaleDB - Narrow Table
Influx (default)
- Default local storage backend.
- Persistence: stored on disk.
- Syncer: can be used by the Syncer to synchronize data to the cloud.
- Schema: always wide table (columns represent variables).
CSV
- Write-only export.
- Persistence: written to CSV files (disk).
- Syncer: cannot be used by the Syncer to synchronize data to the cloud.
- Purpose: export all gathered data to CSV so it can be imported into other tools.
MQTT
- Write-only export.
- Persistence: not a database; data is published to MQTT.
- Syncer: cannot be used by the Syncer to synchronize data to the cloud.
- Behavior: exports all data to MQTT.
- Note: exporting specific variables or publishing to custom topics is handled through replicators.
Redis
- In-memory storage backend designed to minimize disk I/O.
- Persistence: stored in memory only (not on disk).
- Syncer: can be used by the Syncer to synchronize data to the cloud.
- Use case: systems where disk reads/writes are an issue.
- Important: unsynced data is lost after a system restart.
Influx 2
- Sync-from only (current limitation).
- Write support: not supported yet to write to.
- Syncer: can only be used as a source to sync from.
NATS JetStream
- Sync-from only (current limitation).
- Write support: not supported yet to write to.
- Syncer: can only be used as a source to sync from.
TimescaleDB - Narrow Table
TimescaleDB is a time-series extension on PostgreSQL. The narrow table model stores values in typed columns plus an identifier.
- Persistence: stored on disk (PostgreSQL).
- Schema: the value is stored in a column according to the value type, combined with an identifier column.
- Identifier: the identifier can be configured to use either the variable name or the full source path:
{gatewayId}/{connectionName}/{measurementName}/{variableName}
TimescaleDB - Wide Table
- Persistence: stored on disk (PostgreSQL).
- Schema: wide table layout with a column for each variable (like Influx).
Address
The host address used to connect to the database (example: http://localhost).
Port
The port used to connect to the database (example: 8086).
External Database
When enabled, the database is treated as an external service (meaning Capture will not install, configure or manage it) and credentials can be configured.
Username / Password
Credentials used to authenticate against the external database.
Buckets
Buckets define retention policies (how long data is kept). Each bucket includes:
- Bucket name
- RP name (retention policy name)
- Duration (example values:
7d,31d) - Important flag
Important
Buckets marked as Important are not deleted when the disk is getting full.
This flag exists to protect critical datasets from automatic cleanup under disk pressure.
Custom Settings (Advanced)
The Custom Settings tab is a JSON editor for advanced configuration. Use this only when you need behavior that is not covered by the standard UI fields.
Supported options
TryToConvertDataInCaseOfTypeMismatch If set to true, data being written to the local database will be converted to the correct type if there is a type mismatch. This has a performance impact, so only enable this when necessary. Default: false
WriteQueueMaxSizeMB Maximum size of the write queue in MB. This is the queue that holds the data that is being written to the local database. If the database is down, the queue will grow until it reaches this size. When the queue is full, the oldest data will be dropped. Default: 50
There is one queue per used collect type and local database.