Skip to content

Architecture

Overview

StarkOne is a single Go binary (starkone-panel) that embeds a complete REST API and serves a single-page web application. It has minimal external runtime dependencies.

┌─────────────────────────────────────────────────────┐
│                   Browser (SPA)                     │
│              React-style vanilla JS/HTML            │
└───────────────────────┬─────────────────────────────┘
                        │ HTTP / WebSocket (:2087)
┌───────────────────────▼─────────────────────────────┐
│              starkone-panel (Go binary)              │
│  ┌────────────┐  ┌──────────┐  ┌──────────────────┐ │
│  │  Gin HTTP  │  │   Auth   │  │   Plugin System  │ │
│  │  Router    │  │  JWT/DB  │  │   (enable/disable│ │
│  └─────┬──────┘  └──────────┘  └──────────────────┘ │
│        │                                             │
│  ┌─────▼──────────────────────────────────────────┐  │
│  │          Handler Functions (per feature)       │  │
│  └─────┬──────────────────────────────────────────┘  │
└────────┼─────────────────────────────────────────────┘
         │
   ┌─────┴────────────────────────────────────────┐
   │              System Integrations             │
   │  SQLite DB  │  nginx/apache  │  MySQL        │
   │  PHP-FPM    │  Let's Encrypt │  PowerDNS     │
   │  CSF/iptables│ ModSecurity   │  systemd      │
   └──────────────────────────────────────────────┘

Components

Binary: starkone-panel

The main server process. Responsibilities:

  • Serves the web UI (static HTML/JS/CSS embedded via web/index.html)
  • Exposes the REST API under /api/
  • Maintains the SQLite database at /etc/starkone/starkone.db
  • Runs database migrations on startup
  • Communicates with nginx, MySQL, PHP-FPM, CSF, Let's Encrypt, and other services via shell commands and local sockets

Binary: starkone-cli

A companion CLI binary that wraps many panel operations for use in scripts, cron jobs, and automation. It reads the same SQLite database and configuration files.

Database: SQLite

All panel state is stored in a single SQLite file (/etc/starkone/starkone.db). This includes:

  • User accounts and permissions
  • Website metadata
  • Plugin states
  • Notification queue
  • Replication configuration
  • Panel settings

Web UI

The UI is a single compiled HTML file at /usr/share/starkone/web/index.html, built from source files in web/src/. It communicates with the panel API exclusively over HTTP/WebSocket on port 2087.

Plugin System

Optional features (PostgreSQL, HAProxy, PowerDNS, etc.) are managed as plugins. Plugins are enabled/disabled via the panel settings page or API. When a plugin is disabled, its API endpoints return 403 Plugin Not Enabled. Plugin state is stored in the SQLite database.

Configuration

The panel reads environment variables from /etc/starkone/starkone.env at startup. See Configuration Files for details.

Port

StarkOne listens on port 2087 by default (HTTPS optional, configured via the panel settings).

Process Model

starkone-panel runs as a single systemd service (starkone.service). Long-running tasks (backups, migrations, install operations) are executed as goroutines or subprocesses. Progress is streamed to the UI via Server-Sent Events (SSE) or WebSocket.