A client area for Pterodactyl hosts: sign in with Discord, deploy servers, pay with an in-app balance.
Users sign in with Discord, top up a balance of Droplets with coupons or transfers, and create game servers by picking a location, a server type and the CPU, memory and disk they need. Servers are billed monthly and can be renewed, resized or deleted from the dashboard. The interface is dark-only and ships in English, Traditional Chinese and Simplified Chinese.
Lolidactyl is the front end. Billing, balances and provisioning live in a separate backend that is not open source; the backend contract lists what it has to implement.
You need Node.js 20.9 or newer, a Pterodactyl panel, a Discord application and the backend.
git clone https://github.com/SHD-Development/lolidactyl.git
cd lolidactyl
npm install
cp .env.example .env # then fill it in, see below
npm run dev # http://localhost:3000For production, npm run build and npm start. npm run lint and
npm run typecheck run ESLint and TypeScript; message keys are typed, so a
missing translation fails the typecheck.
In the Discord Developer Portal, add <BETTER_AUTH_URL>/api/auth/callback/discord as an
OAuth2 redirect and copy the client ID and secret.
| Variable | Required | What it is |
|---|---|---|
BETTER_AUTH_SECRET |
yes | Random string that signs sessions (openssl rand -base64 32) |
BETTER_AUTH_URL |
yes | Public URL of this app |
AUTH_DISCORD_ID, AUTH_DISCORD_SECRET |
yes | Discord OAuth2 credentials |
BACKEND_API_URL, BACKEND_API_KEY |
yes | Base URL and bearer token of the backend |
NEXT_PUBLIC_PANEL_URL |
yes | Panel URL, used for "Open in panel" links |
PTERODACTYL_API_KEY |
no | Application API key; read server types and locations straight from the panel |
PTERODACTYL_URL |
no | Panel URL for API calls, if it differs from NEXT_PUBLIC_PANEL_URL |
PTERODACTYL_VERSION |
no | 1 or 2 to skip version detection |
Panel 2.0 replaced nests with tags: every /api/application/nests endpoint
returns 404, eggs are listed from /api/application/eggs, and one egg can carry
several tags (changes from 1.x).
Lolidactyl handles both versions:
- With
PTERODACTYL_API_KEYset, server types and locations come from the Application API. The version is detected once every ten minutes by probing/api/application/tags, or pinned withPTERODACTYL_VERSION. On 1.x the server type picker is grouped by nest, on 2.x by tag, with untagged eggs under "Other". The key needs read access to locations, eggs and nests (1.x) or tags (2.x). - Without it, both lists are proxied from the backend's
/eggslistand/locationslist. The 1.x shape (nestId,nestName,eggs[].eggId) and tag-based shapes (tagSlug,tagName) are both accepted.
When a server is created or changed, the API route looks the egg up in that
catalog and sends the backend egg, nest, tag and panelVersion. On 2.x,
nest is the tag's legacy_nest_id, or null for eggs that never belonged to
a nest. The nest is never taken from the browser.
Every request carries Authorization: Bearer <BACKEND_API_KEY>. id is always
the user's Discord ID. Error bodies are passed through to the browser, which
recognises the messages the current backend returns (Insufficient balance,
Coupon not found, NoViableNodeException and so on).
| Endpoint | Used for |
|---|---|
GET /userinfo?id&name&email&ip |
Balance, panel ID and servers; creates the account on first sign-in. 403 {"code":"USER_BLOCKED"} blocks the dashboard. An optional egg on each server lets the edit dialog show its current type |
GET /ipcheck?id&ip |
Checked at sign-in; 403 or 409 denies it |
GET /price |
Unit prices: base, cpu, ram, disk, databases, allocations, backups |
GET /status |
{"status": true} while server creation is open |
GET /eggslist, GET /locationslist |
Catalog fallback when PTERODACTYL_API_KEY is not set |
POST /servers/create |
New server |
PATCH /servers/modify |
Resize or toggle auto-renew. egg, nest and tag are sent only when the user changes the server type; otherwise the backend keeps the current one |
POST /servers/renew |
Renewal; only offered within renewWindowDays of expiry |
DELETE /servers/delete?id&serverIds |
One or more servers, comma-separated |
PATCH /resetpassword?id&email&name |
New panel password, returned as password |
POST /coupons/redeem |
{ id, code } |
POST /api/transfer |
{ from, to, coins } |
Resource limits are validated on both sides with the same schema
(src/lib/validation.ts), and price previews use the same functions the API
routes use (src/lib/pricing.ts).
src/config.ts holds the brand name, community and GitHub links, resource
limits, slider steps and the defaults the create form starts from, the renewal window, dashboard announcements, sponsor
cards and welcome messages. Copy lives in src/dictionaries/{en,zh-tw,zh-cn}.json;
en.json is the source of the message types. The colour tokens are at the top of
src/app/globals.css; --dew is the one accent, kept for 露凝, primary actions
and focus. Headings use jf open 粉圓 (Huninn) and body text Chiron GoRound TC,
both from Google Fonts. Documentation pages are MDX files in src/content/docs,
served at /docs by Fumadocs.
src/
├── app/
│ ├── api/ Route handlers; each wraps one backend call
│ ├── auth/ Sign-in and auth error pages
│ ├── dashboard/ Overview, servers (create, manage), droplets (coupons, transfer)
│ └── docs/ Fumadocs pages
├── components/ App shell, dashboard widgets, server form fields, shadcn/ui primitives
├── content/docs/ Documentation MDX
├── dictionaries/ en, zh-tw, zh-cn messages
├── hooks/ Shared fetch cache (useUserInfo, usePricing, useEggGroups...)
└── lib/
├── server/ Backend client, session, catalog and Pterodactyl 1.x/2.x adapter
├── pricing.ts Cost and upgrade calculations
└── validation.ts Request schemas shared by forms and routes
Lolidactyl is licensed under the Apache License 2.0. Questions and bug reports go to GitHub issues or the Discord community.