Documentation

Everything you need to know about Bpanel.

Overview

Bpanel is a web-based VPS management panel built with Node.js. It gives you a file manager, code editor, and full terminal — all from your browser. No SSH client needed.

It runs as a single Node.js process on port 9390 and uses SQLite for storage. No external databases, no Docker, no complexity.

Key Points:
  • Runs on port 9390 by default
  • SQLite database (zero configuration)
  • First registered user becomes admin
  • Full root filesystem access
  • Systemd managed service

Requirements

OSUbuntu 20.04+ / Debian 11+
Node.js18+ (auto-installed)
RAM512 MB minimum
Disk~50 MB for Bpanel itself
AccessRoot privileges

Quick Start

Run this as root on your VPS:

bash
bash <(curl -fsSL https://raw.githubusercontent.com/convro/Bpanel/main/install.sh)

The installer will:

  1. Install Node.js 20 if not present
  2. Install build dependencies (gcc, python3, git)
  3. Clone Bpanel to /opt/bpanel
  4. Run npm install
  5. Create and start a systemd service
  6. Print the access URL

Open http://your-vps-ip:9390 in your browser and create your account.

File Manager

The sidebar shows your current directory. Files and folders are sorted logically — directories first (alphabetical), then files (alphabetical).

Actions

  • Click folder — open directory
  • Click file — open in editor
  • Right-click — context menu (rename, delete)
  • +f button — create new file
  • +d button — create new folder
  • ↑ button — go up one directory

The sidebar is resizable — drag the border between sidebar and editor.

Code Editor

Click any file in the sidebar to open it in the editor. Multiple files can be open as tabs.

Keyboard Shortcuts

Ctrl + SSave current file
TabInsert 2 spaces

Modified files show a dot in the tab. Closing an unsaved tab prompts a confirmation.

Web Terminal

Click the Terminal button in the top bar to toggle the terminal panel. It opens a full bash shell via PTY (node-pty + xterm.js).

  • Full 256-color support
  • Resizable (drag the top border)
  • Works with vim, htop, nano, and any CLI tool
  • Terminal starts in the session's working directory

Sessions

Sessions are workspaces tied to a directory. Each session remembers its working directory. You can create multiple sessions for different projects.

Example
Session: "My API"     → /root/api-project
Session: "Frontend"   → /var/www/frontend
Session: "Configs"    → /etc

Authentication

On first visit, Bpanel shows a registration form. The first user registered becomes the only user. After that, registration is locked.

  • Passwords hashed with bcrypt (12 rounds)
  • JWT tokens stored in httpOnly cookies
  • Tokens expire after 7 days
  • Minimum password length: 6 characters

Port Configuration

Default port is 9390. Change it with the environment variable:

bash
BPANEL_PORT=8080 node bpanel.js

Or edit the systemd service:

/etc/systemd/system/bpanel.service
Environment=NODE_ENV=production
Environment=BPANEL_PORT=8080

Then reload: systemctl daemon-reload && systemctl restart bpanel

Environment Variables

VariableDefaultDescription
BPANEL_PORT9390HTTP port
BPANEL_JWT_SECRETrandomJWT signing secret (auto-generated if not set)
Note: If you don't set BPANEL_JWT_SECRET, a random secret is generated on each restart. This means all users get logged out when the service restarts. Set a fixed secret in production.

Systemd Service

The installer creates a systemd service automatically. Useful commands:

bash
systemctl status bpanel     # Check status
systemctl restart bpanel    # Restart
systemctl stop bpanel       # Stop
systemctl start bpanel      # Start
journalctl -u bpanel -f     # Live logs
journalctl -u bpanel -n 50  # Last 50 lines

Reverse Proxy (Nginx)

To use Bpanel with a domain and Nginx:

/etc/nginx/sites-available/bpanel
server {
    listen 80;
    server_name panel.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:9390;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
bash
ln -s /etc/nginx/sites-available/bpanel /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx

SSL / HTTPS

With Nginx set up, add SSL with Certbot:

bash
apt install certbot python3-certbot-nginx
certbot --nginx -d panel.yourdomain.com

Certbot will automatically configure Nginx for HTTPS and set up auto-renewal.

Updating

To update Bpanel to the latest version:

bash
cd /opt/bpanel
git pull origin main
npm install
systemctl restart bpanel