ServerPilot V2 was built from the ground up with process isolation and filesystem safety as first-class requirements. The app manages local Minecraft servers, which means it necessarily launches child processes and reads and writes files on behalf of the user. The security model described here ensures those capabilities are tightly scoped so a vulnerability in the React renderer or a third-party UI dependency cannot reach the host operating system.Documentation 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.
Electron Sandbox
Every security property is set explicitly inBrowserWindow.webPreferences inside electron/main.js. None of the defaults are relied upon.
| Setting | Value | Effect |
|---|---|---|
preload | path to preload.js | Injects the IPC bridge script into the renderer before any page code runs, in an isolated context. |
contextIsolation | true | The renderer’s JavaScript context and the main process context are completely isolated. There is no shared window or prototype chain between them. |
nodeIntegration | false | The renderer process has no access to Node.js built-ins (fs, path, child_process, etc.). |
sandbox | true | Full Electron sandbox is enabled. The renderer cannot spawn processes, read the filesystem, or make raw network requests outside of normal browser-level APIs. |
webSecurity | true | Standard browser same-origin policy is enforced. |
allowRunningInsecureContent | false | Mixed HTTP/HTTPS content is blocked. |
webviewTag | false | The <webview> element is disabled. A <webview> would create a second sandboxed context that is harder to audit. |
window.open() or a link with target="_blank" inside the renderer returns nothing — the request is denied before Electron processes it.
Additionally, <webview> attachment is prevented at the web-contents-created level:
Restricted IPC Bridge
The only communication path between the renderer and the main process is thewindow.serverPilot object injected by electron/preload.js via contextBridge.exposeInMainWorld. The preload script runs in an isolated context with limited Node.js access — its sole purpose is to whitelist channels and expose them to the renderer.
Invoke channels — only these 27 channels can be called via window.serverPilot.invoke:
window.serverPilot.on:
ipcRenderer:
eval-style channel, no catch-all handler, and no way to call arbitrary main-process code from the renderer.
Filesystem Restrictions
All file operations — list, read, write, create, delete, rename — go through aresolveInside(root, relativePath) guard in electron/ipc/fileManager.js before any I/O is performed.
Path traversal prevention: The guard uses path.resolve to convert the relative path to an absolute one, then checks that the result starts with the server folder path followed by the OS path separator. If the resolved path escapes the server folder for any reason (including ../ sequences, absolute overrides, or unusual Unicode normalization), the operation throws:
files:read rejects files larger than 4 MB to prevent the renderer from allocating unbounded memory. files:write similarly rejects payloads that exceed 4 MB (measured via Buffer.byteLength) before writing anything to disk.
Backup restore path validation: backups:restore checks that the supplied backupPath lives exactly inside <serverFolder>/backups/. A path pointing to an arbitrary ZIP file elsewhere on the filesystem is rejected:
properties:save will only write to ops.json, whitelist.json, and banned-players.json as JSON targets. Any other filename in the json object is silently ignored. server.properties is always written via resolveInside, so it cannot be redirected.
Process Execution
Minecraft servers and the Playit tunnel are launched viachild_process.spawn — never exec or execFile with shell interpolation — which prevents shell injection.
windowsHide: true is set on every spawn call so spawned processes do not open visible console windows, and the processes are owned by the Electron process tree.
Duplicate launch prevention: A runtime Map tracks active server processes by server UUID. If a server:start call comes in while a process for that ID is already in the map and alive, the call throws immediately:
sanitizeJvmArgs strips any of the following from the user-supplied JVM Arguments field:
- The Java executable itself (
javaorjava.exe) -jarand the filename following itnoguiandgui- Any
.jarfilename - Duplicate
-Xmsand-Xmxflags
warn line so the user is aware.
Force-kill path: On Windows, taskkill.exe /PID <pid> /T /F is used rather than SIGKILL to ensure the entire child process tree (including grandchild processes) is terminated — not just the immediate JVM.
No Admin Required
Theelectron-builder.json manifest sets:
If your server folder is located in a protected system path (e.g. inside
C:\Program Files), ServerPilot will refuse to operate on it. Keep server folders in user-owned locations such as C:\Users\<You>\Documents\MinecraftServers\ or a secondary drive.