This page documents all environment variables supported by Sockudo. Environment variables have the highest priority in the configuration hierarchy.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sockudo/sockudo/llms.txt
Use this file to discover all available pages before exploring further.
Server Settings
Server mode:
development, staging, or production. Affects logging verbosity.Enable debug logging. Takes precedence over
DEBUG_MODE.Enable debug logging (alternative to
DEBUG).Log level:
error, warn, info, debug, or trace.Server host binding address.
WebSocket server port.
Prometheus metrics endpoint port.
Logging Configuration
Log format:
human or json. Must be set at startup via environment variable (cannot be set in config file).Enable/disable colors in human format logs.
Include module target in log output.
Structured logging format:
text or json.Path to log file (if logging to file).
Maximum log file size before rotation.
Number of rotated log files to keep.
Driver Configuration
Adapter driver:
local, redis, redis-cluster, or nats.Enable socket counting for
get_sockets_count API.Cache driver:
memory, redis, redis-cluster, or none.Queue driver:
memory, redis, redis-cluster, sqs, or none.App manager driver:
memory, mysql, postgresql, dynamodb, or scylla.Metrics driver:
prometheus.Rate limiter driver:
memory, redis, or redis-cluster.Redis Configuration
Complete Redis connection URL. Overrides all individual Redis settings. Format:
redis://[username:password@]host:port/db.Redis server hostname.
Redis server port.
Redis username (for Redis 6+ ACL).
Redis password.
Redis database number (0-15).
Prefix for all Redis keys.
Redis password (alternative to
DATABASE_REDIS_PASSWORD).Redis connection pool size.
Redis Cluster Configuration
Comma-separated list of Redis Cluster nodes. Format:
host1:port1,host2:port2 or redis://host:port.Alternative to
REDIS_CLUSTER_NODES.Redis Cluster username.
Redis Cluster password.
Use TLS for Redis Cluster connections.
Queue concurrency for Redis Cluster.
Key prefix for Redis Cluster queue.
MySQL Configuration
MySQL server hostname.
MySQL server port.
MySQL username.
MySQL password.
MySQL database name.
MySQL table name for applications.
Minimum MySQL connection pool size.
Maximum MySQL connection pool size.
MySQL root password (for Docker deployments).
MySQL password (alternative).
PostgreSQL Configuration
PostgreSQL server hostname.
PostgreSQL server port.
PostgreSQL username.
PostgreSQL password.
PostgreSQL database name.
Minimum PostgreSQL connection pool size.
Maximum PostgreSQL connection pool size.
DynamoDB Configuration
AWS region for DynamoDB.
DynamoDB table name.
Custom DynamoDB endpoint (for LocalStack or VPC endpoints).
NATS Configuration
Comma-separated list of NATS servers. Format:
nats://host:port.NATS username.
NATS password.
NATS authentication token.
NATS connection timeout in milliseconds.
NATS request timeout in milliseconds.
AWS Configuration
AWS region.
AWS access key ID.
AWS secret access key.
AWS CLI profile name.
SQS Queue Configuration
AWS region for SQS.
SQS message visibility timeout in seconds.
Maximum messages to receive per batch.
Long polling wait time in seconds.
Number of concurrent SQS workers.
Use FIFO queue.
Custom SQS endpoint (for LocalStack).
SSL/TLS Configuration
Enable SSL/TLS.
Path to SSL certificate file.
Path to SSL private key file.
Redirect HTTP to HTTPS.
HTTP port for redirects.
Domain name for SSL certificates.
Unix Socket Configuration
Enable Unix socket server.
Unix socket file path.
Socket file permissions in octal (e.g., “660”, “755”).
WebSocket Configuration
Maximum message payload size in kilobytes.
Maximum messages buffered per connection. Set to “none” or “0” to disable.
Maximum bytes buffered per connection. Set to “none” or “0” to disable.
Disconnect clients when buffer is full (vs. dropping messages).
Maximum WebSocket message size in bytes (64MB).
Maximum WebSocket frame size in bytes (16MB).
Write buffer size in bytes (16KB).
Maximum backpressure in bytes (1MB).
Enable automatic WebSocket ping frames.
Ping interval in seconds.
Idle timeout in seconds.
WebSocket compression:
enabled or disabled.Application Configuration
Default application ID.
Default application key.
Default application secret.
Enable default application.
Enable client-to-client messages.
Enable user authentication for default app.
Enable watchlist events for default app.
Comma-separated list of allowed origins. Supports wildcards (e.g.,
https://app.example.com,*.staging.example.com).Maximum concurrent connections per app.
Maximum client events per second.
Maximum read requests per second.
Maximum backend events per second.
Maximum presence members per channel.
Maximum presence member data size in KB.
Maximum channel name length.
Maximum channels per event.
Maximum event name length.
Maximum event payload size in KB.
Maximum events per batch.
Timeouts
Graceful shutdown timeout in seconds.
User authentication token TTL in seconds.
Connection activity timeout in seconds.
Rate Limiting
Enable rate limiting.
Maximum API requests per window.
API rate limit window in seconds.
Number of proxy hops to trust for IP detection.
Maximum WebSocket requests per window.
WebSocket rate limit window in seconds.
Metrics
Enable Prometheus metrics.
Metrics endpoint host.
Prometheus metrics prefix.
Enable monitoring stack (Prometheus + Grafana).
Prometheus data retention period.
Grafana admin password.
Queue Configuration
Redis queue worker concurrency.
Redis queue key prefix.
Webhook Configuration
Enable webhook batching.
Webhook batching duration in milliseconds.
Cache Configuration
Default cache TTL in seconds.
Cache cleanup interval in seconds.
Maximum cache capacity (items).
Database Connection Pooling
Database connection pool size.
Enable connection pooling.
Minimum pool connections.
Maximum pool connections.
CORS Configuration
Allowed CORS origins (comma-separated).
Allowed CORS methods.
Allowed CORS headers.
Allow CORS credentials.
Instance Configuration
Unique process identifier for multi-instance deployments.
Cluster Configuration
Cluster hostname.
Cluster communication port.
Cluster hello interval in milliseconds.
Cluster health check interval in milliseconds.
Cluster node timeout in milliseconds.
Cluster master timeout in milliseconds.
Health Check
Health check interval in seconds.
Health check timeout in seconds.
Health check retry count.
Health check start period in seconds.
Docker/Testing
Number of Sockudo replicas (Docker Compose).
Enable load balancer (Docker Compose).
Enable development tools (Redis Commander, PHPMyAdmin).
Enable test mode.
Test database connection URL.
Test Redis connection URL.
JWT Configuration
JWT secret for authentication. Generate with:
openssl rand -base64 32.Backup Configuration
Backup retention period in days.
Backup schedule in cron format.
Resource Limits (Docker)
Memory limit for Sockudo container.
CPU limit for Sockudo container.
Memory reservation for Sockudo container.
CPU reservation for Sockudo container.
Memory limit for Redis container.
CPU limit for Redis container.
Memory limit for MySQL container.
CPU limit for MySQL container.
Development Ports
Redis Commander web interface port.
PHPMyAdmin web interface port.
MailHog SMTP port.
MailHog web interface port.
Next Steps
Configuration Overview
Understand configuration hierarchy
Production Deployment
Deploy Sockudo in production