API Reference
Minepanel exposes a REST API used by the web dashboard.
Base URL
The backend runs behind the URL configured in NEXT_PUBLIC_BACKEND_URL on the frontend.
Examples:
https://panel.example.com/apihttp://localhost:8091
If BASE_PATH is configured in the backend, that prefix is part of the API URL.
If the frontend is also served under a subpath, that is controlled separately by NEXT_PUBLIC_BASE_PATH.
Authentication
Minepanel uses JWT sessions stored in httpOnly cookies:
access_tokenfor authenticated requestsrefresh_tokenfor session renewal
Primary authentication mechanism:
- Browser session cookies set by
POST /auth/login
JWT tokens are not accepted in query strings.
The backend also accepts Authorization: Bearer <token> on protected routes, but the standard login flow issues cookies and does not return raw JWTs in the response body.
Public Endpoints
These routes do not require an authenticated session:
| Method | Path | Purpose |
|---|---|---|
GET | /health | Liveness check |
POST | /auth/login | Start a session |
POST | /auth/refresh | Renew access token using refresh_token cookie |
POST | /auth/logout | Clear session cookies and revoke refresh token when present |
GET | /auth/oidc/login | Begin SSO login, redirects to the OIDC provider (when SSO is configured) |
GET | /auth/oidc/callback | OIDC provider callback; sets session cookies and redirects to the dashboard |
All other endpoints require JWT authentication. See Single Sign-On for SSO setup.
Login Flow
Login
curl -i \
-c cookies.txt \
-H 'Content-Type: application/json' \
-X POST https://panel.example.com/api/auth/login \
-d '{"username":"admin-or-email@example.com","password":"changeme"}'Successful login returns the username and token lifetime, and writes auth cookies.
Initial Setup
curl -i \
-c cookies.txt \
-H 'Content-Type: application/json' \
-X POST https://panel.example.com/api/auth/setup-admin \
-d '{"username":"admin","email":"admin@example.com","password":"changeme123"}'Current Session
curl -b cookies.txt https://panel.example.com/api/auth/meRefresh Session
curl -i -b cookies.txt -c cookies.txt -X POST https://panel.example.com/api/auth/refreshLogout
curl -i -b cookies.txt -X POST https://panel.example.com/api/auth/logoutMain Resource Groups
Auth
POST /auth/loginGET /auth/mePOST /auth/refreshPOST /auth/logout
Servers
Main control plane for server creation, configuration, lifecycle, logs, commands, worlds, and related runtime actions.
Typical examples:
GET /serversGET /servers/:idPOST /serversPUT /servers/:idPOST /servers/:id/startPOST /servers/:id/stopPOST /servers/:id/restartGET /servers/:id/logs
Files
Server file browser API used by the dashboard.
Examples:
GET /files/:serverId/list?path=GET /files/:serverId/read?path=GET /files/:serverId/download?path=POST /files/:serverId/writePOST /files/:serverId/uploadPOST /files/:serverId/upload-multiplePUT /files/:serverId/renameDELETE /files/:serverId/delete?path=
Important path semantics:
serverId="_root"targets the global servers root used by the file managerserverId=".world"targets the global world library- Any normal
serverIdtargets that server'smc-data
Settings
Per-user panel settings and integration configuration.
Examples:
GET /settingsPATCH /settingsPOST /settings/test-discord-webhook
Users
User CRUD and password changes.
Examples:
GET /usersGET /users/onePOST /usersPATCH /users/:idDELETE /users/:idPOST /users/change-password
System
Host monitoring endpoints:
GET /system/statsGET /system/network
Mod Providers
GET /curseforge/searchGET /curseforge/featuredGET /modrinth/mods/search
World Discovery
Global world library search/import and CurseForge metadata lookup:
GET /world-discovery/searchPOST /world-discovery/importGET /world-discovery/curseforge/:projectId
Bedrock Addons
Bedrock addon management:
GET /bedrock-addons/:serverIdPOST /bedrock-addons/:serverId/uploadGET /bedrock-addons/:serverId/curseforge/searchPOST /bedrock-addons/:serverId/curseforge/importPUT /bedrock-addons/:serverId/order— body{ "addonIds": ["..."] }with every installed addon ID in priority order (first = highest priority)POST /bedrock-addons/:serverId/:addonId/enablePOST /bedrock-addons/:serverId/:addonId/disableDELETE /bedrock-addons/:serverId/:addonId
Proxy
mc-router proxy status and mapping management:
GET /proxy/statusGET /proxy/mappingsGET /proxy/server/:id/hostnamePOST /proxy/server/:idDELETE /proxy/server/:id
Response Patterns
Minepanel uses standard HTTP status codes:
200successful read/update action201resource created400validation or bad input401missing or invalid authentication404resource not found500internal server error
Typical unauthorized response:
{
"status": 401,
"error": "Unauthorized"
}Validation errors usually come from NestJS validation pipes.
Security Notes
- Treat the API as private by default.
- Prefer cookie-based auth for browser clients.
- Do not send JWT tokens in query params.
- File and proxy endpoints are protected and should not be exposed through unauthenticated reverse-proxy exceptions.
- Restrict access to trusted users only; Minepanel can control Docker and host-mounted server data.