Skip to content

Planck, Connection String Reference

Format

All Planck clients use the same connection string format:

host:port;uid=<username>;key=<base64-key>;tls=true|false

Parameters

ParameterRequiredDescription
hostYesServer IP address or hostname (e.g., 127.0.0.1, db.example.com)
portYesServer port (default: 23469)
uidYes*Username for authentication
keyYes*Base64-encoded authentication key
tlsNoEnable TLS 1.3 encryption (true or false, default: false)

*Required when server has security enabled (default). If security is disabled on the server, uid and key can be omitted.

Examples

# Local development (no TLS)
127.0.0.1:23469;uid=admin;key=NH8ohl2LHDT8xSJbHGPAsCluCh5pe8Ldn+hckcJovXk=

# Production with TLS
db.example.com:23469;uid=myapp;key=abc123base64key==;tls=true

# Custom port
192.168.1.100:9000;uid=admin;key=mykey==;tls=true

Default Admin Credentials

On first startup with security enabled, Planck creates a default admin user. The default key is auto-regenerated on first login and printed to the server log.


Client-Specific Configuration

Zig

zig
const Client = @import("planck-client");

var client = try Client.init(allocator, io);
defer client.deinit();

const auth = try client.connect("127.0.0.1:23469;uid=admin;key=...;tls=true");

TLS Configuration

Planck supports TLS 1.3 only. To enable TLS:

  1. Server side, set tls.enabled: true in config.yaml and provide certificate/key paths
  2. Client side, append ;tls=true to the connection string

All clients default to verifying the server's TLS certificate. For self-signed certificates, either:

  • Provide the CA certificate via the client's CA option
  • Disable verification (development only, not recommended for production)

Resilience Defaults

All clients share the same resilience defaults:

FeatureParameterDefault
RetryMax attempts3
Initial backoff100 ms
Max backoff10,000 ms
Backoff multiplier
Circuit BreakerFailure threshold5
Success threshold2
Timeout30,000 ms

Reconnection

All clients preserve TLS and authentication state across reconnections. Calling reconnect() will:

  1. Close the existing TCP connection
  2. Re-establish TLS (if originally connected with tls=true)
  3. Re-authenticate with the stored credentials