How it works
StellarStack uses a daemon-per-node architecture inspired by modern container orchestration platforms. This design separates concerns between the control plane (API + Web Panel) and the data plane (Daemon Nodes).Architecture overview
API Server (Hono + PostgreSQL)
The central control plane handles authentication, permissions, and orchestration. Built with Hono for high-performance HTTP handling (~40k req/s) and PostgreSQL for reliable data persistence.Responsibilities:
- User authentication and session management
- Permission checks and authorization
- Server configuration and metadata
- Backup scheduling and retention policies
- Webhook management and event dispatching
Web Panel (Next.js 15)
Real-time dashboard built with React 19 and Next.js App Router. Connects to both the API (REST) and nodes (WebSocket) for live updates.Features:
- Server-side rendering for fast page loads
- WebSocket connections for real-time console output
- TanStack Query for efficient data fetching and caching
- Responsive design with Tailwind CSS and shadcn/ui
Daemon Nodes (Rust)
One daemon per physical server manages Docker containers running game servers. Written in Rust for performance, safety, and low resource overhead.Responsibilities:
- Docker container lifecycle (create, start, stop, delete)
- Port allocation and network management
- File system operations and SFTP server
- Resource monitoring (CPU, memory, disk, network)
- Log streaming via WebSocket
Request flow
Here’s what happens when you start a game server:Daemon communication
The API communicates with daemons via HTTP REST endpoints. Each daemon exposes:Docker container isolation
Each game server runs in its own Docker container with:Resource limits
CPU cores, memory (RAM), and disk space limits enforced by Docker cgroups
Network isolation
Dedicated ports mapped from container to host (e.g., 25565 → 25565)
File system isolation
Bind mounts for server files, preventing access to host system
Process isolation
Game servers can’t see or affect other containers or the host OS
Real-time updates with WebSocket
Console output and statistics stream via WebSocket connections:- Frontend (React Hook)
- Backend (WebSocket Manager)
- Daemon (Log Streaming)
Authentication and authorization
StellarStack uses a multi-layered security approach:Better Auth for sessions
Session management with secure HTTP-only cookies. Supports email/password, OAuth (Google, GitHub, Discord), 2FA, and passkeys.
Middleware for route protection
API middleware checks authentication and authorization before processing requests.
Scalability considerations
While StellarStack is currently in alpha, the architecture is designed for horizontal scaling:
- API servers: Stateless and load-balanced behind nginx or a cloud load balancer
- Daemon nodes: Add more physical servers, register them via the admin panel
- Database: PostgreSQL supports read replicas and connection pooling
- WebSocket: Can be scaled with Redis pub/sub for cross-server communication
Next steps
Tech Stack
Dive deep into the technologies powering each component
Installation
Get StellarStack running on your infrastructure