Configure a Ditto database instance with mesh networking and optional cloud sync capabilities
DittoDatabase
resource is the fundamental building block of Edge Server deployments. It
manages a single Ditto database instance that can synchronize data across devices using
peer-to-peer protocols and optionally sync with Ditto Cloud or self-hosted servers.
Field | Type | Description |
---|---|---|
resource_type | string | Must be "DittoDatabase" |
db_id | string | Unique database identifier in UUIDv4 format (e.g., "12345678-1234-4123-1234-123456789012" ). Must be unique across all DittoDatabase resources in the config |
device_name | string | Edge server device name on the mesh (minimum 1 character) |
auth | object | Authentication configuration (see Authentication section below) |
auth
field determines how the database connects to the mesh. You must choose one of two authentication methods:
Field | Type | Required | Description |
---|---|---|---|
access_token | string | Yes | Token used to authenticate with the authentication provider |
auth_url | string (URL) | Yes | Authentication URL for cloud sync |
provider | string | Yes | Webhook provider configured in Ditto Portal. Use "__playgroundProvider" for development/playground mode |
enable_cloud_sync | boolean | No | Enable automatic cloud synchronization (default: true ) |
Field | Type | Required | Description |
---|---|---|---|
offline_license_token | string | Yes | Offline license token for SmallPeerOnly mode |
key_b64 | string | No | Optional base64-encoded key for shared key encryption |
:param
syntax"from_current_exe"
- Store in directory adjacent to Edge Server executable (default)"temp_dir"
- Use temporary directory (useful for testing){ path: "path/to/dir" }
- Specify a custom path (relative to config file or absolute){ from_env: "ENV_VAR_NAME" }
- Read path from environment variableField | Type | Default | Description |
---|---|---|---|
ble_enabled | boolean/null | null | Enable Bluetooth Low Energy connectivity |
lan_enabled | boolean/null | null | Enable LAN connectivity |
lan_mdns_enabled | boolean/null | null | Enable mDNS for automatic peer discovery on LAN |
lan_multicast_enabled | boolean/null | null | Enable multicast for LAN communication |
Field | Type | Default | Description |
---|---|---|---|
known_tcp_servers | array[string] | [] | List of TCP server addresses to connect to (format: "host:port" ) |
known_ws_servers | array[string] | [] | List of WebSocket server URLs to connect to |
retry_interval_msec | integer/null | null | Retry interval in milliseconds (min: 0, max: 4294967295) |
Field | Type | Default | Description |
---|---|---|---|
tcp_listen.enable | boolean/null | null | Enable TCP listener |
tcp_listen.ip | string/null | null | IP address to bind to |
tcp_listen.port | integer/null | null | Port number (0-65535) |
db_id
must be unique across all DittoDatabase resources in your configurationdevice_name
helps identify this Edge Server instance in the mesh network. Choose descriptive names for easier debuggingnull
, Edge Server uses sensible defaults based on your platform and network environment