Overview
Oyasai Server Platform uses a declarative Nix-based configuration system for managing Minecraft server instances. Server configurations are defined in.nix files that specify version, plugins, and runtime parameters.
Server Definition
Server instances are created using theoyasaiPurpur function, which configures a Purpur-based Minecraft server:
packages/oyasai-minecraft-main.nix
Key Parameters
Unique identifier for the server instance
Minecraft server version (e.g., “1.21.8”)
List of plugin identifiers from the plugin registry
Working directory for server data
Server port for Minecraft connections
Whether to clean plugins directory on startup
Docker Container Configuration
The production server runs in Docker containers with environment-specific configurations:packages/cdktf/src/stacks/docker-stack.ts
Network Ports
- 25565: Main Minecraft server
- 25575: RCON remote console
- 8100: BluMap web interface
- 8192: Additional service port
- 19132: Bedrock Edition (Geyser)
Environment Variables
Accept Minecraft EULA (must be
true)Server type (PURPUR, PAPER, SPIGOT)
Minecraft version to run
JVM memory allocation (e.g., “28G”, “12G”, “5G”)
Enable optimized JVM flags for production
Enable log rotation
Add timestamps to log entries
Server message of the day (supports color codes)
Password for RCON access
URL to server icon image
Health Checks
The server implements health checking to ensure availability:- Start Period: 1 minute grace period for server startup
- Interval: Check every 5 seconds
- Retries: Up to 20 failed checks before marking unhealthy
Server Startup
The entrypoint script handles plugin synchronization:packages/minecraft-main/entrypoint.sh
Environment-Specific Configuration
The platform supports three environments with different resource allocations:- Production
- Development
- Local
- Memory: 28GB
- Features: Optimized JVM flags, rolling logs, automated backups
- Location: Remote production server
Next Steps
Plugin Management
Learn how to add and manage server plugins
Monitoring
Set up server monitoring and health checks