Deployment Modes
Docker
Single container deployment
Kubernetes
Scalable cluster deployment
Bare Metal
Direct binary deployment
Docker Deployment
Basic Container
The official S2 Lite Docker image is based on distroless and runs as a non-root user (UID 65532).Docker Compose
Create adocker-compose.yml:
docker-compose.yml
With TLS
For production deployments, enable TLS:When TLS is enabled, the default port changes from 80 to 443. Use
--port to override.With Init File
Mount an init file to pre-create basins and streams:Bare Metal Deployment
Binary Installation
1
Download the binary
2
Create a systemd service
Create
/etc/systemd/system/s2-lite.service:/etc/systemd/system/s2-lite.service
3
Create user and directories
4
Configure AWS credentials
Create Secure the file:
/etc/s2-lite/config.env:/etc/s2-lite/config.env
5
Start the service
Cloud Provider Specific
AWS with IAM Role
When running on EC2 or ECS, use IAM roles instead of static credentials.1
Create IAM policy
Create a policy with S3 access:
s2-lite-policy.json
2
Attach to IAM role
Attach the policy to your EC2 instance profile or ECS task role.
3
Run without credentials
S2 Lite will automatically use the IAM role:No
AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY needed!AWS with S3 Express One Zone
For ultra-low latency, use S3 Express:S2 Lite automatically detects and uses the appropriate S3 endpoint for Express One Zone buckets.
Scaling Considerations
Single Instance
S2 Lite uses SlateDB, which relies on object storage for coordination. Running multiple instances against the same bucket path will cause data corruption.Fencing
When restarting S2 Lite, it waits for the manifest poll interval (default from SlateDB settings) to ensure the previous instance is fenced out:High Availability
For high availability:- Use Kubernetes with a single replica and proper health checks
- Use a process manager like systemd with automatic restart
- Monitor health endpoint (
/health) and restart on failure - Keep restart delays to allow proper fencing
S2 Lite’s design prioritizes consistency over availability. A brief downtime during restarts is expected and safe.
Health Checks
S2 Lite exposes a/health endpoint for health monitoring:
200 OKwith body"OK"when healthy503 Service Unavailablewhen the database status check fails
Health Check Configuration
Docker:Security
Running as Non-Root
The Docker image runs as user65532 (nonroot). For bare metal:
TLS Best Practices
- Use valid certificates from Let’s Encrypt or your CA
- Rotate certificates regularly
- Disable CORS in production with
--no-cors - Use a reverse proxy (nginx, Traefik) for advanced TLS configuration
Network Security
- Firewall rules: Restrict access to trusted networks
- VPC/Security Groups: Use cloud network security features
- Private networks: Deploy in private subnets with load balancer
Next Steps
Kubernetes
Deploy with Helm to Kubernetes
Monitoring
Set up Prometheus monitoring
Configuration
Detailed configuration reference