Quickstart
This guide will get you from zero to running a local Purpur server with the Oyasai platform in under 10 minutes.Prerequisites
Before you begin, ensure you have:- A Unix-like environment (Linux, macOS, or WSL on Windows)
- At least 4GB of free disk space
- Internet connection for downloading dependencies
Installation
Install Nix
Download and install Nix from nixos.org. The multi-user installation is recommended, but single-user works too.After installation completes, restart your terminal or source the Nix profile:Verify the installation:
Enable Experimental Features
Nix flakes and the
nix command are experimental features that must be explicitly enabled.These features are stable and widely used, but remain “experimental” in Nix terminology.
Verify Flake Configuration
Test that Nix can read the flake configuration:You should see output listing available packages and development shells. If you see errors, check that experimental features are enabled.
Enter Development Shell
The development shell contains all tools needed for development: Java, Gradle, Node.js, Terraform, and more.This command will:Verify you have the required tools:
- Download all required dependencies
- Set up the development environment
- Drop you into a shell with all tools available
The first run will take several minutes as Nix downloads and builds dependencies. Subsequent runs are nearly instant.
Running Your First Server
Now that your environment is set up, let’s run a Minecraft server.Run the Minimal Server
The platform includes a pre-configured minimal server for testing:This command will:
- Download Purpur server version 1.21.8
- Install essential plugins (EssentialsX, FastAsyncWorldEdit, PlugManX)
- Accept the EULA automatically
- Create a
local/directory - Start the server on port 25565
Connect to Your Server
Once the server shows
Done! in the console, open Minecraft:- Launch Minecraft Java Edition version 1.21.8
- Go to Multiplayer → Add Server
- Server Address:
localhost:25565 - Connect and play!
stop in the console or press Ctrl+C.Building Plugins
Let’s build the custom Oyasai plugins from source.Build All Plugins
From the repository root, inside the development shell:This builds all plugins in the
plugins/ directory concurrently.Build a Specific Plugin
To build just one plugin:Replace
OyasaiUtilities with any plugin name:DynamicProfileEntityPoseOyasaiAdminToolsOyasaiPetsPaintTools- And more…
plugins/<name>/build/libs/.Creating a Custom Server Configuration
Create your own server configuration for development or testing.Create Configuration File
Create a new Nix file in
packages/:packages/oyasai-minecraft-dev.nix
Available plugins are defined in
packages/oyasai-plugin-registry/data.json. The forVersion function filters plugins compatible with your Minecraft version.Register Configuration
Add your configuration to the build system by editing
nix/oyasai-scope.nix.Find the packages section (around line 126) and add your config:Code Formatting
The platform enforces consistent code formatting across all files.Format All Code
Before committing changes, format your code:This formats:
- Nix files
- Kotlin files
- TypeScript/JavaScript files
- Configuration files
Running Tests and Checks
Before submitting changes, verify everything builds correctly.- Builds all packages
- Runs all tests (if defined)
- Verifies Nix expressions
- Shows detailed logs with
-L
This is the same check that runs in CI. If it passes locally, it should pass in CI.
Next Steps
Plugin Development
Learn how to create and modify Minecraft plugins
Server Configuration
Advanced server configuration with custom plugins and settings
Contributing Guide
Learn about PR conventions, code review, and development workflow
Nix Flakes
Understand how Nix flakes work in this project
Common Issues
nix: command not found
nix: command not found
Nix is not in your PATH. Restart your terminal or source the Nix profile:
error: experimental Nix feature 'flakes' is disabled
error: experimental Nix feature 'flakes' is disabled
Flakes are not enabled. Run:
Server fails to start with port already in use
Server fails to start with port already in use
Another server is running on port 25565. Either:
- Stop the existing server
- Change the port in your server configuration
gradle2nix: command not found
gradle2nix: command not found
You’re not in the development shell. Run:
CI fails but local checks pass
CI fails but local checks pass
Ensure you’ve:
- Run
nix fmtto format code - Run
nix flake check -Lsuccessfully - Committed all changes including
gradle.lock
Getting Help
If you encounter issues not covered here:- Check existing GitHub issues
- Review the CONTRIBUTING.md file
- Ask in the development Discord (if available)
- Open a new GitHub issue with detailed information