Developer overview

Build on VaultPanel with its REST API, JavaScript SDK, command-line tool and plugins, and learn how the panel, worker and server agent fit together.

Last updated

VaultPanel is built to be automated and extended. Everything the web interface does goes through the same REST API, permission checks, job queue and audit log that scripts, the command-line tool, billing systems and plugins use. There is no back door: no endpoint runs arbitrary commands, on the panel or on a server.

Ways to integrate

You want toUse
Script the panel from CI, cron or your own toolsAn API token with the REST API, the JavaScript SDK or the CLI.
Manage hosting accounts from a billing systemA billing key with the billing API, or the WHMCS module.
Add a feature or connect an outside serviceA plugin: its own token, signed events and a page inside the panel.
React to deployments, backups and alertsWebhooks, or plugin events.
Deploy on every Git pushPush-to-deploy with a signed webhook from your Git host.

How the parts fit

Browser, CLI, SDK, plugins, billing systems
        │  HTTPS: session cookie + CSRF token, or a Bearer token (vpt_, vpp_, vpk_)
        ▼
Express API ──── MariaDB (users, servers, jobs, audit log…)
        │   └─── Redis (agent nonces, locks, BullMQ)
        │                                   ▲
        │  HTTPS, Ed25519-signed            │
        ▼                                   │
Agent on each server              Worker (maintenance every 15 s,
  fixed operations, no shell       the AI assistant's answers)

Read Architecture for the layers, the job lifecycle and the background work.

Building VaultPanel itself

The panel is JavaScript: a React and Vite interface, and an Express API with MariaDB through Knex and Redis with BullMQ. The server agent is one program written in Rust. See Development for the local setup and checks, and Database schema for the tables.

Credentials at a glance

PrefixCredentialBelongs toReaches
vpt_API tokenA person, narrowed to its scopesThe REST API
vpp_Plugin tokenA plugin, narrowed to its approved scopesThe REST API
vpk_Billing API keyThe panel/api/v1/billing only
vpe_Enrollment tokenOne server, once, for 60 minutes by defaultAgent registration
whsec_Plugin signing secretA pluginVerifying events and page links

The panel keeps only a SHA-256 of tokens and keys, and the plugin signing secret encrypted, so all of them are shown once.