ServerPilot’s renderer process (the React UI) never has direct access to the filesystem or Node.js APIs. Instead, it communicates with the Electron main process through a tightly restricted IPC bridge that is injected into the renderer asDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GKExpo/ServerPilot/llms.txt
Use this file to discover all available pages before exploring further.
window.serverPilot via Electron’s contextBridge. The bridge exposes exactly two methods: invoke(channel, payload) for request-response interactions (returns a Promise), and on(channel, callback) for subscribing to server-pushed events (returns an unsubscribe function). Any channel not in the explicit allow-list throws immediately — nothing is leaked by accident.
src/services/api.js so application code imports api.invoke and api.on instead of referencing window.serverPilot directly.
App & Settings
app:data:get
Returns the full application state on startup. Call this once when the UI mounts to hydrate the server list and global settings.
Payload: none
Array of all saved server configurations.
Merged settings object (user overrides merged on top of defaults).
settings:update
Merges a partial Settings object into the persisted settings store and returns the full merged result.
Any subset of the Settings object. Only provided keys are overwritten.
The complete, merged Settings object after the update.
dialog:select-folder
Opens the native Windows folder-picker dialog and returns the selected path, or null if the user cancels.
Payload: none
Absolute path to the selected folder, or
null if cancelled.dialog:select-file
Opens the native Windows file-picker dialog with optional file-type filters.
Optional array of file type filters (e.g.
[{ name: 'Java Executables', extensions: ['exe'] }]). Defaults to executables and JARs.Absolute path to the selected file, or
null if cancelled.Server Management
server:add
Persists a new server configuration. The main process assigns a UUID id and merges defaults from the current global settings (Java path, RAM, Playit auto-start).
Server configuration object.
id, createdAt, and updatedAt are generated automatically.The newly created server object including its generated
id.server:update
Updates an existing server configuration. The id field is required to locate the record.
Full or partial server object. Must include
id.The updated server object.
server:remove
Removes a server configuration from the store. Does not delete files on disk.
The UUID of the server to remove.
The remaining server array after removal.
server:detect
Scans a folder for Minecraft server JARs and configuration files. Prefers Paper over Fabric over Forge over Vanilla when multiple JARs are found.
Absolute path to the folder to inspect.
Filename of the detected JAR (e.g.
paper-1.21.4-191.jar), or empty string if none found.Inferred server type based on the JAR filename.
Whether
server.properties exists in the folder.Whether
ops.json exists in the folder.Whether
whitelist.json exists in the folder.server:start
Launches the Minecraft server process for the given server. Builds the Java command from the server’s javaPath, ramMin, ramMax, jarName, and jvmArgs — stripping any arguments that ServerPilot manages itself. If autoStartPlayit is enabled and a valid Playit executable path is configured, Playit is launched simultaneously.
The UUID of the server to start.
UUID of the server.
Current lifecycle status.
OS process ID of the Java process.
OS process ID of the Playit process, if running.
Unix timestamp (ms) of when the server was started.
Current Playit status string (e.g.
PLAYIT ONLINE, PLAYIT STOPPED).Non-empty if the server is in the
CRASHED state.Up to 30 most recent cleaned log lines.
server:stop
Sends the stop command to the server’s stdin and starts a 15-second force-kill timer. If the process does not exit within 15 seconds, it is terminated via taskkill.exe /PID <pid> /T /F.
The UUID of the server to stop.
Public server state at the moment the stop was requested (same shape as
server:start).server:restart
Performs a graceful stop (waits for the process to exit) and then starts the server again. Returns the public state after the new start.
The UUID of the server to restart.
Public server state after the restart (same shape as
server:start).server:kill
Force-kills the server process after a 3-second grace period instead of the normal 15 seconds. Use for unresponsive servers.
The UUID of the server to force-kill.
Public server state (same shape as
server:start).server:command
Writes a command string to the server’s stdin (appends \n). Also emits a server:log event with level: 'command' so the console UI shows it in-line.
The UUID of the target server.
The command to send, e.g.
op Steve or say Hello world.Always
true on success. Throws if the server is not running.server:open-folder
Opens the server’s folder in Windows Explorer using shell.openPath.
The UUID of the server.
Always
true.server:open-terminal
Opens a cmd.exe window pre-navigated to the server’s folder.
The UUID of the server.
Always
true.Metrics
metrics:get
Polls pidusage for the current CPU and memory consumption of the server’s Java process, appends a data point to the in-memory history (capped at 40 points), and also emits a server:metrics push event so the dashboard chart updates automatically. Returns OFFLINE defaults if the server is not running.
The UUID of the server to measure.
Current server status.
CPU usage as a percentage (1 decimal place).
Process RSS memory in MB.
Total system used memory in MB.
Seconds elapsed since the server was started.
Java process ID.
Playit process ID, if running.
Current Playit status string.
Reported TPS (currently fixed at
20 — future plugin integration).Number of currently online players.
Up to 40 historical data points for the sparkline chart.
Non-empty when the server has crashed.
Up to 30 most recent log lines.
File Manager
files:list
Lists the contents of a directory inside the server folder, sorted directories-first then alphabetically by name.
Server UUID.
Path relative to the server’s root folder. Omit or pass empty string for the root.
Array of entries:
{ name, relativePath, isDirectory, size, updatedAt } — directories appear before files.files:read
Reads a text file inside the server folder and returns its content along with a language hint for Monaco Editor. Supported extensions: .yml, .yaml, .json, .txt, .properties, .log, .md, .cfg, .conf, .toml. Files larger than 4 MB are rejected.
Server UUID.
Path to the file relative to the server root.
UTF-8 file content.
Language identifier for Monaco (e.g.
json, yaml, properties).files:write
Writes a UTF-8 string to an existing file inside the server folder. Payloads exceeding 4 MB are rejected.
Server UUID.
Path to the file relative to the server root.
Full UTF-8 file content to write.
Always
true on success.files:create
Creates a new empty file or a new directory (including intermediate directories) inside the server folder.
Server UUID.
Desired path relative to the server root.
Whether to create a file or a directory.
Always
true on success.files:delete
Recursively deletes a file or directory inside the server folder.
Server UUID.
Path relative to the server root.
Always
true on success.files:rename
Renames a file or directory. The new name must not contain / or \ — only a simple filename is accepted.
Server UUID.
Current path relative to the server root.
New filename (no path separators allowed).
Always
true on success.Properties
properties:get
Reads server.properties (parsed into a key-value map) and the three standard JSON files (ops.json, whitelist.json, banned-players.json) from the server folder. Returns empty defaults for any file that does not exist yet.
Server UUID.
All entries from
server.properties as a flat key-value object (comments and blank lines stripped).Object with keys
ops.json, whitelist.json, and banned-players.json, each containing the parsed array (or [] if the file is missing or malformed).properties:save
Writes server.properties and up to three JSON files back to disk. A #Edited by ServerPilot <timestamp> comment is prepended to server.properties. Only ops.json, whitelist.json, and banned-players.json are accepted as JSON targets — any other key in the json object is silently skipped.
Server UUID.
Key-value map to write as
server.properties.Object with keys matching the allowed filenames and their corresponding arrays as values.
Always
true on success.Backups
backups:list
Returns all .zip files from the server’s backups/ subfolder, sorted newest-first by creation time.
Server UUID.
Array of
{ name, fullPath, size, createdAt } where createdAt is a Unix timestamp in milliseconds.backups:create
ZIPs the entire server folder (excluding the backups/ subfolder itself) into a timestamped archive at <serverFolder>/backups/<serverName>-<timestamp>.zip using maximum compression. Emits a desktop notification when complete.
Server UUID.
Absolute path to the created ZIP file.
Filename of the ZIP (e.g.
MyServer-2025-01-15T10-30-00-000Z.zip).backups:restore
Extracts a ZIP backup over the server folder. The backupPath must be inside the server’s own backups/ subdirectory — paths outside this location are rejected.
Server UUID.
Absolute path to the
.zip file to restore. Must reside in <serverFolder>/backups/.Always
true on success.Push Event Channels
Subscribe to these channels withwindow.serverPilot.on(channel, callback). Each call returns an unsubscribe function — call it when the component unmounts to prevent memory leaks.
server:log
Emitted for every line of output from the Minecraft process (stdout/stderr) and the Playit process. Also emitted when a command is sent via server:command.
UUID of the originating server.
Severity / type of the log line.
Whether the line came from the Minecraft process or the Playit process.
Cleaned log text (ANSI escape codes and non-printable characters stripped).
ISO 8601 timestamp of when the line was received.
server:status
Emitted whenever the server’s lifecycle status changes (e.g. STARTING → ONLINE, ONLINE → STOPPING, etc.).
UUID of the server.
New status.
Java process ID.
Playit process ID.
Unix timestamp (ms) of server start.
Current Playit status string.
Non-empty when status is
CRASHED.Up to 30 most recent log lines.
server:metrics
Emitted automatically by metrics:get every time the dashboard polls for metrics. Same payload as the metrics:get return value plus serverId.
UUID of the server.
Current status.
CPU % (1 decimal place).
RSS memory in MB.
Total system used memory in MB.
Seconds since start.
Java process ID.
Playit process ID.
Current Playit status string.
Reported TPS.
Online player count.
Up to 40 historical data points.
Non-empty if crashed.
Up to 30 recent log lines.
server:players
Emitted whenever the online player list changes (join, leave, kick, chat, etc.). The online array is sorted alphabetically by username. activity contains the 150 most recent events in reverse-chronological order.
UUID of the server.
Array of currently online players, each with
username, joinTime, status, ping, lastActivity, lastActivityText, dimension, and uuid.Length of the
online array.Up to 150 recent player activity events (newest first). Each event has
id, at, type, username, and text.toast
Emitted for every desktop notification shown by Notification.show(). The UI can mirror these as in-app toast messages.
Notification title (e.g.
Server online).Notification body (e.g.
MyServer finished startup.).