Skip to main content
Swytch Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Licensing & Telemetry

Swytch uses a license key system for official binary releases. This page explains how to get a license, how licensing works, and what telemetry data is collected.

Obtaining a License

Register for a free license using your email address:

swytch register user@example.com

This initiates the registration process:

  1. New users: You’ll receive an email with a link to accept the terms of service. After accepting, run the command again to retrieve your license key.

  2. Existing users: If you’ve already accepted the current terms, your license key is printed directly to stdout.

  3. Terms update: If the terms of service have been updated, you’ll receive an email to re-accept them.

You can manage your license and purchase more licenses at license.getswytch.com.

Capturing the License Key

The license key is printed to stdout while informational messages go to stderr, so you can capture it directly:

export SWYTCH_LICENSE=$(swytch register user@example.com)

Using the License

Provide the license key via the --license flag or the SWYTCH_LICENSE environment variable:

# Via flag
swytch redis --license=YOUR_LICENSE_KEY --maxmemory 4gb

# Via environment variable
export SWYTCH_LICENSE=YOUR_LICENSE_KEY
swytch redis --maxmemory 4gb

Docker and Kubernetes

Docker Compose:

services:
  swytch:
    image: registry.bottled.codes/swytch/server:latest
    environment:
      - SWYTCH_LICENSE=${SWYTCH_LICENSE}
    command: redis --bind=0.0.0.0 --maxmemory=4gb

Kubernetes:

env:
  - name: SWYTCH_LICENSE
    valueFrom:
      secretKeyRef:
        name: swytch-secrets
        key: license
args:
  - redis
  - --bind=0.0.0.0
  - --maxmemory=4gb

How Licensing Works

When Swytch starts with a license key:

  1. Validation: The server contacts license.getswytch.com to validate the license. If validation fails, the server exits with an error.

  2. Heartbeat: After successful validation, the server sends periodic heartbeats (every 1–3 minutes) to maintain the license lease.

  3. Grace period: If heartbeats fail (e.g. network issues), the server continues running for up to 10 minutes. If connectivity isn’t restored within this window, the server exits.

  4. Release: On graceful shutdown (SIGTERM/SIGINT), the server releases its license lease, freeing the slot for reuse.

Machine Limits

Your license may have a limit on the number of concurrent machines. Each running Swytch instance counts as one machine. When an instance shuts down gracefully, its slot is released immediately. If an instance terminates unexpectedly, the slot is released after the heartbeat timeout.

If you receive a “Maximum machines reached” error, visit https://license.getswytch.com to manage your machines.

Telemetry

Swytch sends telemetry data with each heartbeat request. This data helps us understand usage patterns and improve the product. No user data, cache contents, or keys are ever transmitted.

Disabling Telemetry

If you prefer not to send telemetry data, use the --no-telemetry flag:

swytch redis --no-telemetry --maxmemory 4gb
swytch memcached --no-telemetry -m 4096

With this flag, heartbeats are still sent (required for license validation), but the telemetry payload is omitted. Only the attestation data (fingerprint, binary hash, hostname) is transmitted.

Data Collected

FieldDescription
persistence_enabledWhether persistent storage mode is enabled
l1_memory_usageCurrent L1 (in-memory) cache bytes used
l1_max_memoryConfigured maximum memory limit
cache_pressureA novel method for determining pressure on the cache
l2_disk_usageCurrent L2 (persistent) storage bytes used (0 if persistence disabled)
total_missesCumulative cache misses since startup
total_hitsCumulative cache hits since startup

Attestation Data

In addition to telemetry, each request includes:

FieldDescription
fingerprintA randomly-generated identifier unique to this process instance (not tied to hardware)
binary_hashSHA-256 hash of the running binary (used to verify official releases)
machine_nameHostname of the server

All communication with the licensing server is encrypted.

Offline/Air-Gapped Environments

The standard license requires network connectivity to license.getswytch.com. For air-gapped or restricted network environments, please contact us at licensing@getswytch.com for offline licensing options.

Troubleshooting

“License validation failed”

  • Verify your license key is correct
  • Check network connectivity to license.getswytch.com
  • Ensure your firewall allows outbound HTTPS (port 443)

“Maximum machines reached”

  • Visit https://license.getswytch.com to view and manage your active machines
  • Ensure previous instances have shut down gracefully to release their slots
  • Wait for the heartbeat timeout (approximately 10–15 minutes) if instances terminated unexpectedly

“License heartbeat failed”

  • This is logged when a heartbeat fails, but the server continues running during the grace period
  • Check network connectivity
  • The server will exit if connectivity isn’t restored within 10 minutes