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.
Installation Methods
Sockudo can be installed in several ways depending on your needs:Docker
Recommended for production
From Source
For development and customization
Pre-built Binaries
Quick installation (coming soon)
Docker Installation
Docker is the recommended installation method for production deployments. It includes all dependencies and is easy to update.
Production Deployment
Configure Environment
Copy the example environment file and customize it:Edit
.env with your production settings:.env
Start the Production Stack
- Sockudo server (with resource limits)
- Redis (persistent storage)
- Prometheus metrics
- Grafana dashboard (optional)
Docker Compose Configurations
Sockudo includes several docker-compose configurations:| File | Use Case | Command |
|---|---|---|
docker-compose.yml | Development with Redis | make up |
docker-compose.prod.yml | Production with monitoring | make prod |
docker-compose.multinode.yml | Multi-node testing | docker compose -f docker-compose.multinode.yml up |
docker-compose.redis-cluster.yml | Redis Cluster backend | docker compose -f docker-compose.redis-cluster.yml up |
docker-compose.unix-socket.yml | Unix socket (for Nginx proxy) | docker compose -f docker-compose.unix-socket.yml up |
Building from Source
Prerequisites
Install System Dependencies (Optional)
Depending on which features you enable, you may need:Ubuntu/Debian:macOS:Windows:
- Install Visual Studio Build Tools
- Install CMake
Build with Feature Flags
Sockudo uses Cargo feature flags to compile only the backends you need, significantly reducing build times.The default
local feature includes only in-memory implementations with no external dependencies. This builds 30-50% faster than the full build.Available Features
- Meta Features
- Adapters
- App Managers
- Cloud Services
| Feature | Description |
|---|---|
local (default) | Local/in-memory only - no external dependencies |
full | Enables all available backends |
Custom Feature Combinations
Combine features based on your needs:Build Performance Comparison
| Configuration | Build Time | Binary Size | Use Case |
|---|---|---|---|
local (default) | ~2-3 min | ~15 MB | Local development |
redis | ~3-4 min | ~20 MB | Single-node production |
redis-cluster,mysql | ~4-5 min | ~25 MB | Multi-node production |
full | ~6-8 min | ~35 MB | Maximum flexibility |
Configuration
After installation, configure Sockudo using environment variables or a config file.Environment Variables
Create a.env file in the project root:
Config File
Alternatively, use a JSON config file (config/config.json):
config/config.json
Platform-Specific Notes
Linux
Recommended for production. Tested on Ubuntu 20.04+, Debian 11+, and RHEL 8+.macOS
Supports both Intel (x86_64) and Apple Silicon (ARM64).Windows
Windows support is available but less tested than Linux/macOS.For production on Windows, consider using Docker or WSL2 for better compatibility.
Running as a Service
systemd (Linux)
Create/etc/systemd/system/sockudo.service:
Docker Compose (Recommended)
Use Docker Compose with restart policies:docker-compose.yml
Updating Sockudo
Docker
From Source
Verification
After installation, verify everything works:Next Steps
Configuration Guide
Configure Sockudo for your environment
Scaling Guide
Scale horizontally with Redis or NATS
Security Best Practices
Secure your Sockudo deployment
Monitoring
Set up Prometheus and Grafana
Troubleshooting
Build fails with OpenSSL errors
Build fails with OpenSSL errors
Install OpenSSL development headers:Ubuntu/Debian:macOS:
Feature not available
Feature not available
Make sure you built with the required feature flag:If you try to use
ADAPTER_DRIVER=redis without the redis feature, Sockudo will fall back to local with a warning.Out of memory during build
Out of memory during build
Rust compilation can be memory-intensive. Try:
Permission denied on Unix socket
Permission denied on Unix socket
If using Unix sockets, ensure proper permissions: