Skip to main content

Configuration

DoubleDino is configured using environment variables.

The binary does not require configuration files. This keeps deployments simple and allows DoubleDino to work naturally with existing infrastructure platforms.

Core configuration

These variables are required for all DoubleDino instances.


DD_MODE

Selects the operating mode.

Required: Yes

Values:

proxy
clone

Example:

export DD_MODE=proxy

proxy

Starts a read-only HTTP API that allows developers to query the connected data source.

clone

Creates a transformed copy of the source data into a destination database, then exits.


DD_SOURCE_URL

The connection string for the source data.

Required: Yes

Example:

export DD_SOURCE_URL=postgres://postgres:password@localhost:5432/database

The format depends on the selected data source.

Supported sources:

  • PostgreSQL
  • MySQL
  • MariaDB
  • MongoDB
  • Redis
  • Log files

See Connection Strings for details.


DD_SECRET_KEY

Secret key used for deterministic data transformation.

Required: Yes

Example:

export DD_SECRET_KEY=my-secret-key

The same secret key always produces the same transformed output.

This allows DoubleDino to preserve:

  • Relationships between records.
  • Foreign key references.
  • Consistent values across different queries.

Changing this key produces different transformed values.


DD_AUTH_KEY

Authentication key used by the HTTP API.

Required: Yes for proxy mode

Example:

export DD_AUTH_KEY=my-api-key

Clients must send this value using:

x-api-key

Example:

curl -G "http://localhost:8080/meta" \
-H "x-api-key: my-api-key"

Clone mode configuration

These options only apply when:

DD_MODE=clone

DD_DEST_URL

Destination database connection string.

Required: Yes for clone mode

Example:

export DD_DEST_URL=postgres://postgres:password@localhost:5432/development

The destination must use the same database type as the source.

Supported:

PostgreSQL → PostgreSQL
MySQL → MySQL
MariaDB → MariaDB
MongoDB → MongoDB

Proxy mode configuration

These options only apply when:

DD_MODE=proxy

DD_HTTP_PORT

HTTP server listening port.

Default:

8080

Example:

export DD_HTTP_PORT=9000

DD_MAX_REQUEST

Maximum requests allowed per IP address.

Default:

10

Example:

export DD_MAX_REQUEST=100

This helps prevent accidental or excessive usage of the proxy API.


Transformation controls

These options control how values are transformed.


DD_SUPPORTED_CHARSETS

Controls supported character sets during transformation.

Default:

english,latin

Example:

export DD_SUPPORTED_CHARSETS=english,latin

Additional character sets may be added in future releases.


DD_PRESERVED_EXPRESSIONS

Expressions that should remain visible after transformation.

Example:

export DD_PRESERVED_EXPRESSIONS="shipping updates, refund, billing desk"

If a value contains a configured expression, that expression remains unchanged.

Example:

Original:

Order delayed due to shipping updates

Result:

Ehfwfzjx shipping updates niglwzp

Use this carefully. Preserved expressions may expose information that would otherwise be transformed.

Not supported for Redis.


DD_EXCLUDE_KEYS

Keys that should not be transformed.

Example:

export DD_EXCLUDE_KEYS=id,user_id,customer_id

Example:

Before:

{
"id": 123,
"email": "[email protected]"
}

After:

{
"id": 123,
"email": "[email protected]"
}

Excluded keys keep their original values.

Not supported for Redis.


DD_ALLOW_DYNAMIC_EXPRESSIONS

Allows developers to provide additional expressions per request.

Default:

false

Example:

export DD_ALLOW_DYNAMIC_EXPRESSIONS=true

When enabled, clients can send:

x-preserve-expressions

Example:

-H "x-preserve-expressions: tracking metadata"

Only enable this in controlled environments.

Allowing users to dynamically preserve expressions may expose information that should normally be transformed.

Not supported for Redis.


Logging

DoubleDino writes logs through standard output and error streams.

Your infrastructure controls how logs are collected and stored.


DD_LOG_FORMAT

Log output format.

Values:

json
text

Example:

export DD_LOG_FORMAT=json

Default:

json

DD_LOG_LEVEL

Controls logging detail.

Values:

info
audit
DPI

Example:

export DD_LOG_LEVEL=audit

info

Basic operational information.

audit

Includes security and transformation-related events.

DPI

Deep Packet Inspection logging.

Use carefully as it may generate detailed request-level information.


Example complete configuration

Proxy

export DD_MODE=proxy

export DD_SOURCE_URL=postgres://postgres:password@localhost:5432/production

export DD_SECRET_KEY=my-secret-key

export DD_AUTH_KEY=my-api-key

export DD_HTTP_PORT=8080

./doubledino

Clone

export DD_MODE=clone

export DD_SOURCE_URL=postgres://postgres:password@localhost:5432/production

export DD_DEST_URL=postgres://postgres:password@localhost:5432/development

export DD_SECRET_KEY=my-secret-key

./doubledino