How aether-panel/panel works
Purpose and entry points
Aether Panel (internal SkyPanel) is a modular Go control plane for hosting and operating game servers, with a bundled Astro/React administration UI. The main executable and operational CLI live in cmd/panel/main.go, cmd/panel/run.go, and cmd/panel/runservice.go; database/user administration commands are adjacent in cmd/panel/db*.go and cmd/panel/user.go.
HTTP, API, and authentication boundary
Gin-based web loading separates public/authenticated API, OAuth2, daemon/node-facing endpoints, and Swagger documentation. Route domains include server lifecycle, nodes, templates, users, roles, databases, settings, and AI:
• internal/web/loader.go
• internal/web/api/loader.go
• internal/web/auth/loader.go
• internal/web/daemon/server.go
• internal/web/oauth2/loader.go
Middleware enforces database context, sessions/authentication, API-key access, decryption, and version constraints before handlers reach services: internal/middleware/middleware.go, internal/middleware/auth.go, internal/middleware/api_key_auth.go.
Domain services and persistence
Service-layer packages implement business operations for servers, users/permissions, sessions/tokens, backups, nodes, templates, SFTP, notifications, and integrations. GORM-backed models form the persistence contract, supporting SQLite, MySQL/MariaDB, PostgreSQL, and SQL Server. Database initialization and upgrades are centralized rather than embedded in handlers:
• internal/services/server.go
• internal/services/user.go
• internal/services/templates.go
• internal/models/server.go
• internal/database/loader.go
• internal/database/upgrade.go
Server lifecycle and execution backends
Server management loads template-defined operations, schedules work, tracks processes, and delegates execution through one of two isolation adapters: Docker containers or host TTY processes under Linux namespace isolation. This is the principal boundary between panel business logic and managed game workloads:
• internal/servers/server.go
• internal/servers/server_loader.go
• internal/servers/scheduler.go
• internal/servers/docker/docker.go
• internal/servers/tty/tty.go
Reusable execution contracts and operation/template structures are exposed in pkg/skypanel/engine.go, pkg/skypanel/operation.go, and pkg/skypanel/server.go. Concrete operations download runtimes/content, manipulate files, execute commands, and provision games; e.g. internal/operations/command/command.go, internal/operations/dockerpull/dockerpull.go, internal/operations/steamgamedl/steamgamedl.go.
Remote nodes, file access, and live control
The panel supports distributed Panel-plus-node deployments via daemon endpoints and node services. It provides integrated Go SSH/SFTP access and console/metrics-style live interfaces, while server connections support RCON, WebSocket RCON, and Telnet:
• internal/services/node.go
• internal/web/daemon/root.go
• internal/sftp/server.go
• internal/connections/rcon.go
• internal/connections/rconws.go
Frontend application
Astro pages host React feature views; shared providers/configuration and api-client define the UI-to-REST boundary. Server detail views expose console, files, editor, backups, databases, users, SFTP, settings, plugins, transfers, and metrics:
• client/frontend/src/layouts/BaseLayout.astro
• client/frontend/src/lib/api-client.ts
• client/frontend/src/contexts/providers.tsx
• client/frontend/src/features/servers/[id]/page.tsx
• client/frontend/src/features/servers/[id]/console-view.tsx
• client/frontend/src/features/servers/[id]/file-manager-view.tsx
External services and deployment
Notification adapters support SMTP, Mailgun, Mailjet, SendGrid, and Discord; email templates are embedded under assets/email/. Optional GenAI-backed assistance is represented at both API and frontend flow layers. Docker images/Compose configurations package the panel and game runtime variants; systemd assets support host installation:
• internal/email/provider.go
• internal/services/discord.go
• internal/web/api/ai.go
• client/frontend/src/ai/genkit.ts
• Dockerfile
• docker-compose.yml
• internal/systemd/servicefiles/skypanel.service
Main entry points: services/server.go Domain services · servers/server.go Server manager · middleware.go Security middleware · loader.go REST API
Components 21
Control Plane
- Panel CLI · Runs the panel and operational administration commands.
cmd/panel/main.go - Container deployment
docker-compose.yml
HTTP Boundary
- Web loader
internal/web/loader.go - REST API · Public and authenticated management endpoints.
internal/web/api/loader.go - Auth & OAuth2
internal/web/auth/loader.go - Node daemon API · Node-facing remote control endpoints.
internal/web/daemon/root.go - Security middleware · Applies database context, sessions, API keys, decryption, and version checks.
internal/middleware/middleware.go
Domain & Persistence
- Domain services · Manages servers, users, nodes, templates, backups, and integrations.
internal/services/server.go - GORM models
internal/models/server.go - Database lifecycle · Initializes and upgrades supported SQL databases.
internal/database/loader.go - Remote node service
internal/services/node.go - Notifications · Delivers email and Discord notifications through provider adapters.
internal/email/provider.go
Server Runtime
- Server manager · Loads servers and template-defined lifecycle work.
internal/servers/server.go - Operation scheduler
internal/servers/scheduler.go - Engine contracts · Defines reusable server, operation, and execution abstractions.
pkg/skypanel/engine.go - Concrete operations · Downloads content, changes files, and runs provisioning commands.
internal/operations/command/command.go - Docker backend
internal/servers/docker/docker.go - TTY backend · Host processes isolated with Linux namespaces.
internal/servers/tty/tty.go - Live access · Provides SFTP plus RCON, WebSocket RCON, and Telnet control.
internal/sftp/server.go
Administration UI
- Astro/React admin UI · Server views provide console, file, backup, database, and settings workflows.
client/frontend/src/layouts/BaseLayout.astro - API client
client/frontend/src/lib/api-client.ts
Connections 23
- Panel CLI → Web loader: starts
- Container deployment → Panel CLI: packages
- Web loader → Security middleware: applies
- Security middleware → REST API: guards
- Security middleware → Auth & OAuth2: guards
- Security middleware → Node daemon API: guards
- Astro/React admin UI → API client: uses
- API client → REST API: REST requests
- REST API → Domain services: invokes
- Auth & OAuth2 → Domain services: invokes
- Node daemon API → Remote node service: controls
- Domain services → GORM models: persists through
- GORM models → Database lifecycle: stored in
- Domain services → Server manager: orchestrates
- Domain services → Remote node service: manages
- Domain services → Notifications: sends
- Server manager → Operation scheduler: schedules
- Operation scheduler → Concrete operations: runs
- Concrete operations → Engine contracts: implements
- Server manager → Docker backend: executes via
- Server manager → TTY backend: executes via
- Server manager → Live access: exposes
- Remote node service → Node daemon API: connects through