Configuration
DoubleDino is configured with environment variables. No configuration file is required.
Core
These settings define the DoubleDino instance.
DD_MODE
Operating mode.
Required: Yes
Values: proxy, clone
export DD_MODE=proxy
DD_SOURCE_URL
Connection string for the source data.
Required: Yes
export DD_SOURCE_URL='postgres://postgres:password@localhost:5432/database'
The format depends on the data source.
Supported sources:
- PostgreSQL
- MySQL
- MariaDB
- MongoDB
- Redis
- Log files
See the documentation for the individual data sources.
DD_SECRET_KEY
Secret key used for deterministic transformation.
Required: Yes
export DD_SECRET_KEY='your-secret-key'
The same input produces the same transformed output when the same key is used. This allows relationships and repeated values to remain consistent.
Changing the key produces different transformed values.
DD_AUTH_KEY
API authentication key.
Required: Proxy mode
export DD_AUTH_KEY='your-api-key'
Clients must provide the key in the x-api-key header.
Keep both DD_SECRET_KEY and DD_AUTH_KEY private.
Clone mode
These settings apply only when DD_MODE=clone.
DD_DEST_URL
Connection string for the destination.
Required: Yes in Clone mode
export DD_DEST_URL='postgres://postgres:password@localhost:5432/development'
The source and destination must use the same data source type.
PostgreSQL → PostgreSQL
MySQL → MySQL
MariaDB → MariaDB
MongoDB → MongoDB
Proxy mode
These settings apply only when DD_MODE=proxy.
DD_HTTP_PORT
HTTP port used by the API.
Default: 8080
export DD_HTTP_PORT=9000
DD_MAX_REQUEST
Maximum requests allowed per IP address.
Default: 10
export DD_MAX_REQUEST=100
This limits excessive requests to the Proxy API.
Transformation
These settings control how values are transformed.
DD_SUPPORTED_CHARSETS
Character sets available to the transformation engine.
Default: english,latin
export DD_SUPPORTED_CHARSETS=english,latin
DD_PRESERVED_EXPRESSIONS
Expressions that should remain unchanged during transformation.
export DD_PRESERVED_EXPRESSIONS="shipping updates,refund,billing desk"
For example:
Order delayed due to shipping updates
can become:
Ehfwfzjx shipping updates niglwzp
Use preserved expressions carefully because they remain visible.
DD_EXCLUDE_KEYS
Keys whose values should not be transformed.
export DD_EXCLUDE_KEYS=id,user_id,customer_id
For example:
{
"id": 123,
}
becomes:
{
"id": 123,
}
DD_ALLOW_DYNAMIC_EXPRESSIONS
Allows clients to provide additional preserved expressions per request.
Default: false
export DD_ALLOW_DYNAMIC_EXPRESSIONS=true
When enabled, clients can use the x-preserve-expressions header:
-H "x-preserve-expressions: tracking metadata"
Only enable this when clients are trusted. Dynamically preserved expressions can expose values that would otherwise be transformed.
Logging
DoubleDino writes logs to standard output and standard error.
DD_LOG_FORMAT
Log output format.
Default: json
Values: json, text
export DD_LOG_FORMAT=json
DD_LOG_LEVEL
Controls the amount of information written to the logs.
Values: info, audit, DPI
export DD_LOG_LEVEL=audit
info- operational information.audit- operational and security-related events.DPI- detailed request-level inspection.
DPI logging can contain detailed request information. Enable it only when required.
Environment example
A minimal Proxy configuration:
export DD_MODE=proxy
export DD_SOURCE_URL='postgres://postgres:password@localhost:5432/production'
export DD_SECRET_KEY='your-secret-key'
export DD_AUTH_KEY='your-api-key'
./doubledino
A minimal Clone configuration:
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='your-secret-key'
./doubledino