All projects

LitePanel: Self-hosted server control panel with automated Nginx & TLS

A lightweight server control panel built with Bun, TypeScript, and Svelte 5 that automates Nginx routing, Certbot SSL provisioning, and live SSE log streaming.

  • TypeScript
  • Bun
  • Svelte 5
  • Nginx
  • Certbot
  • Linux
Automated tests
200+
Unit & integration suite
Log transport
SSE
Live Server-Sent Events
Edge automation
Nginx + Certbot
Routing & TLS provisioning

The problem

Managing multiple web applications on a self-hosted Linux VPS usually drifts into fragile manual habits: hand-edited Nginx virtual hosts, forgotten Certbot renewals, and SSH sessions just to tail logs during an incident. Heavyweight hosting panels solve this at the cost of large memory footprints and opaque config layers.

The goal of LitePanel was to build a small, self-hosted control plane that stays close to standard Linux primitives while making routing, TLS, and log inspection repeatable and safe.

Constraints

  • Generated Nginx configurations had to stay readable and pass nginx -t before any reload.
  • SSL provisioning via Certbot needed clear failure states rather than half-applied server blocks.
  • Live log streaming had to work over plain HTTP without requiring a separate WebSocket broker.
  • Core control-plane operations needed deterministic test coverage so regressions could not silently break live hosts.

Architecture

flowchart LR; UI[Svelte 5 UI] -->|REST + SSE| API[Bun + TypeScript Control Plane]; API --> Nginx[Nginx Config Generator & Validation]; API --> Certbot[Certbot SSL Provisioning]; API --> Logs[Log Streamer via SSE]; Nginx --> Host[Linux Host Services]; Certbot --> Nginx
LitePanel control plane, edge automation, and live log streaming

The backend runs on Bun and TypeScript, exposing a typed HTTP API and Server-Sent Events (SSE) endpoints consumed by a Svelte 5 interface. Configuration changes render deterministic Nginx templates, validate syntax before applying, and coordinate Certbot for automated TLS certificates.

Decisions

Validate before reload. Every Nginx routing change runs syntax validation before reloading the daemon. A bad configuration fails fast and leaves the previous active configuration untouched.

Server-Sent Events over WebSockets for logs. Log tailing is strictly server-to-client. SSE works cleanly through Nginx reverse proxies, supports automatic reconnection, and keeps both server and client state simple.

Bun + TypeScript + Svelte 5 for a low footprint. Running a lightweight TypeScript runtime with a compiled Svelte 5 frontend keeps the panel's own CPU and memory overhead minimal on small VPS instances.

Test-backed control plane. Because server automation touches live routing and TLS state, core handlers, config generation, and edge cases are verified by 200+ automated tests.

Result

LitePanel turns repetitive VPS administration — adding domains, proxying upstreams, issuing Certbot certificates, and watching live application logs — into a predictable, test-verified workflow without locking the server into proprietary daemon wrappers.

What I would change

Adding versioned configuration snapshots with one-click rollback and role-scoped audit trails would make the panel safer for multi-operator teams beyond single-owner VPS setups.