Planck, Connection String Reference
Format
All Planck clients use the same connection string format:
host:port;uid=<username>;key=<base64-key>;tls=true|falseParameters
| Parameter | Required | Description |
|---|---|---|
host | Yes | Server IP address or hostname (e.g., 127.0.0.1, db.example.com) |
port | Yes | Server port (default: 23469) |
uid | Yes* | Username for authentication |
key | Yes* | Base64-encoded authentication key |
tls | No | Enable 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=trueDefault 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:
- Server side, set
tls.enabled: trueinconfig.yamland provide certificate/key paths - Client side, append
;tls=trueto 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:
| Feature | Parameter | Default |
|---|---|---|
| Retry | Max attempts | 3 |
| Initial backoff | 100 ms | |
| Max backoff | 10,000 ms | |
| Backoff multiplier | 2× | |
| Circuit Breaker | Failure threshold | 5 |
| Success threshold | 2 | |
| Timeout | 30,000 ms |
Reconnection
All clients preserve TLS and authentication state across reconnections. Calling reconnect() will:
- Close the existing TCP connection
- Re-establish TLS (if originally connected with
tls=true) - Re-authenticate with the stored credentials