Security Architecture
How security works across all nodes. Every node uses the same security patterns - container hardening, network isolation, secrets management, and access controls.
Container Security
Read-Only Filesystems
Services use read-only root filesystems when possible:
| |
This prevents malware from modifying system files and keeps containers immutable.
Capability Management
Containers run with minimal required capabilities:
| |
Common capability patterns:
- File services:
SETUID,SETGID,CHOWN - Network services:
NET_ADMIN,SYS_MODULE - Most services: No extra capabilities needed
Security Context
All containers disable privilege escalation:
| |
Resource Limits
Prevent resource exhaustion attacks:
| |
Process Management
Use init system for proper signal handling:
| |
Network Security
Network Isolation
Four network types with different security properties:
Enclave Networks
| |
- Isolated from internet
- Service-to-service communication only
- Predictable IP ranges for firewall rules
Direct Networks
| |
- Controlled external connectivity
- Explicit port mapping required
- Firewall integration
Proxy Networks
| |
- Web access through reverse proxy
- Automatic SSL termination
- Request filtering and rate limiting
Socket Networks
| |
- Docker API access for management
- No external connectivity
- Audited operations
Docker Socket Security
Protected Docker API access:
| |
This prevents containers from getting root access through the Docker API.
Secrets Management
Docker Secrets
Sensitive data uses Docker secrets:
| |
Benefits:
- Secrets mounted as read-only files
- Not visible in environment variables
- Automatic cleanup on container stop
- Stored in @tier1 secure storage
Environment Variables
Use error-on-undefined for critical settings:
| |
Services fail to start if critical secrets are missing.
Configuration Isolation
Sensitive config isolated in @tier1:
| |
Access Control
User Management
Consistent user/group IDs:
| |
This ensures predictable file ownership and prevents privilege escalation.
Volume Security
Minimal read-write access:
| |
Service Dependencies
Security services start first:
| |
SSL/TLS Security
Automatic HTTPS
All web services get automatic certificates:
| |
Features:
- Automatic renewal
- DNS challenge (no port 80 needed)
- Perfect Forward Secrecy
- Strong cipher suites
TLS Configuration
Services can use TLS passthrough for VPN:
| |
Application Security
Database Security
Database integrity checks:
| |
Health Monitoring
Comprehensive health checks:
| |
Resource Protection
Prevent resource exhaustion:
| |
Monitoring and Alerting
Security Events
Telegram notifications for security events:
| |
Alerts for:
- Service failures
- Configuration errors
- Certificate problems
- Backup failures
Log Security
Logs isolated and secured:
| |
Security Principles
Defense in Depth
Multiple security layers:
- Container isolation and hardening
- Network segmentation
- Application security
- Data encryption
Least Privilege
- Minimal container capabilities
- Restricted network access
- Read-only mounts where possible
- Limited user permissions
Secure by Default
- Services start with secure configs
- Insecure options disabled
- Required secrets must be provided
- Automatic security updates
Zero Trust
- No implicit trust between services
- All communication authenticated
- Network traffic filtered
- Regular health validation
This security architecture protects your nodes while keeping operations simple and reliable.