Backend: - routes/databases.rs: full CRUD for MariaDB databases + users - mysql -u root via stdin pipe (unix socket auth, API runs as root) - cPanel-style naming: username_dbname / username_dbuser - Identifier validation (alphanumeric + underscore only) - Password escaping for mysql string literals - Safety guard: refuses to drop DBs without account prefix - GET /api/databases (admin all), GET /api/databases/:username (per-account) - POST /api/databases (create DB + user + GRANT ALL + nixpanel record) - DELETE /api/databases/name/:db_name (drop DB + user + nixpanel record) - routes/mod.rs: add databases module - main.rs: register database routes NixServer: - DatabaseManager page: table across all accounts, create form with account selector + live name preview, drop with confirmation modal NixClient: - MySQLDatabases page: per-account view, create form with password confirm + connection-details card, drop with confirmation modal - api.ts: listMyDatabases, createDatabase, deleteDatabase CHANGELOG.md: v0.4.0-alpha entry Cargo.toml: version bump 0.3.0-alpha -> 0.4.0-alpha
8.7 KiB
8.7 KiB
Changelog
All notable changes to NixPanel are documented here.
Format follows Keep a Changelog.
Versions follow Semantic Versioning.
Unreleased
Planned
- SSL certificate management (Let's Encrypt via Certbot)
- File manager
- FTP account management (vsftpd)
- WordPress one-click installer
- Backup / restore system
- Firewall rule editor (CSF/iptables)
- Multi-server support (Agency plan)
- NixClient pages: FTP, subdomains, redirects, PHP version selector, stats
0.4.0-alpha — 2026-04-26
Added
- MySQL / MariaDB database manager
GET /api/databases— list all databases across all accounts (admin)GET /api/databases/:username— list databases for one hosting accountPOST /api/databases— create database + dedicated MariaDB user with GRANT ALLDELETE /api/databases/name/:db_name— drop database + user, cascade nixpanel record- cPanel-style namespacing:
username_dbname/username_dbuser(max 64/32 chars) - Identifier validation (alphanumeric + underscore only)
- Live connection-details preview in the create form (database, username, host, port)
- Safety check: refuses to drop databases without the account prefix separator
- NixServer — Databases page: admin view across all accounts, create form with live preview, drop with confirmation modal
- NixClient — MySQL Databases page: per-account view, create with password confirm + connection-info card, drop with confirmation
Changed
- NixServer/NixClient footer version:
v0.3.0-alpha→v0.4.0-alpha
0.3.0-alpha — 2026-04-25
Added
- DNS Management — full CRUD via pdnsutil
GET /api/dns— list all PowerDNS zonesGET /api/dns/:domain— list records (A, AAAA, MX, TXT, CNAME, NS, SRV, CAA)POST /api/dns/:domain— add record (name, type, TTL, content)DELETE /api/dns/:domain— delete an RRset (name + type)- SOA records hidden; zone auto-rectified after each change
- NixServer — Zone Manager page (
domains): lists all PowerDNS zones, click → DNS editor - NixServer — DNS Records page (
dns): record table with inline add/delete, zone switcher dropdown, colour-coded type badges - NixServer — Service Manager page (
services): dedicated page with refresh button and running/stopped summary pills - NixServer — Account actions: Suspend / Unsuspend / Terminate buttons with confirmation modal
POST /api/accounts/:username/suspend/unsuspendDELETE /api/accounts/:username— deprovisions vhost, FPM, DNS; removes system user; cascades DB records
- Email account management
GET /api/email/:username— list email accounts for a hosting accountPOST /api/email— create mailbox (Maildir provisioned under~/mail/)DELETE /api/email/id/:id— delete email account
- NixClient — Email Accounts page — create, list, delete mailboxes with quota display
- NixClient — Domains page — shows primary domain, document root, quota, bandwidth
- NixClient — Change Password page — verifies current password, hashes and updates both
usersandaccountstables - NixClient — AccountSidebar now fetches real account data (domain, package, quota) from
GET /api/accounts/:username - Password change API —
POST /api/me/password(verifies old password via Argon2id, updatesusers+accounts) - Single account lookup —
GET /api/accounts/:username
Changed
- NixServer footer / login version bump:
v0.2.0-alpha→v0.3.0-alpha - NixClient footer / login version bump:
v0.2.0-alpha→v0.3.0-alpha - List Accounts: domain cell links to site, suspend/terminate replace placeholder Edit button
0.2.0-alpha — 2026-04-25
Added
- Rust backend — Cargo workspace with independently compiled + UPX-compressed section executables
nixpanel-common— sharedSectionRequest/SectionResponseIPC typesnixpanel-api— main Axum HTTP server on port 4000POST /api/auth/login— Argon2id password verification, HS256 JWT (8-hour expiry)GET /api/dashboard— real account/domain/database/email counts + system statsGET /api/services— live service status via systemctlPOST /api/services/:name/:action— start / stop / restart any managed serviceGET /api/accounts— list hosting accounts from MariaDBPOST /api/accounts— create account (system user, home dir, DB record)- Auto-runs DB schema migrations on first start
- Seeds admin user from
/opt/nixpanel/.admin_user+.admin_passon first run
nixpanel-services— section binary; reads JSON from stdin, calls systemctl, writes JSON to stdout- Actions:
list,start,stop,restart,reload - Reports PID and uptime per service
- Actions:
nixpanel-sysinfo— section binary; reads/proc/meminfo,/proc/stat,/proc/loadavg,df- Actions:
stats(CPU, RAM, disk, load, hostname, IP, OS, kernel),versions(Apache, PHP, MariaDB)
- Actions:
- Database schema (
nixpanel-api/migrations/0001_initial.sql)- Tables:
users,accounts,domains,dns_records,account_databases,email_accounts,ftp_accounts,ssl_certificates,backups
- Tables:
- Frontend API clients (
nixserver/src/api.ts,nixclient/src/api.ts)- JWT stored in
localStorage, included in all requests asAuthorization: Bearer - Auto-clears token and reloads on 401
- JWT stored in
Changed
- NixServer UI — full redesign matching WHM visual style
- Dark navy / orange-accent theme
- Collapsible sidebar with grouped navigation sections
- Dashboard: live stat bar, server info bar, service manager table, quick-action icon grid
- List Accounts: real data table with search/filter
- Create Account: full form wired to API (creates system user, DB record)
- Login: real JWT auth; session persists across refresh via
localStorage
- NixClient UI — full redesign matching cPanel visual style
- Blue-accent theme
- Feature icon grid grouped by category with live search
- Account sidebar with usage bars
- Login: real JWT auth
- Installer (
install.sh)- Rust build step now copies all
nixpanel-*section binaries to/opt/nixpanel/bin/ - Installs UPX and compresses each binary after build
- Admin credentials auto-generated with
openssl rand(no TTY prompts) - Node.js 20 LTS installed as its own idempotent step (
nodejs.done) - NixClient build uses absolute path to avoid wrong-directory check
- npm output visible during build (removed
--silent) for easier debugging
- Rust build step now copies all
- Vite configs — added
/apiproxy tolocalhost:4000for local development - Minifier — switched both UIs from
terser(not installed) toesbuild
Fixed
- Login inputs changed from
type="email"totype="text"with "Username" label sqlx::query!()macros replaced with non-macroquery()/query_as()/query_scalar()so the binary compiles without a live database connection- Removed
axum_extraimport that was never added toCargo.toml - Git clone always removes stale
$SRC_DIRbefore cloning (fixes "couldn't find remote ref master" on re-run)
0.1.0-alpha — 2025-04-25
Added
- Installer (
install.sh) — fully automated Ubuntu 24.04 installer- Self-updating: always fetches the latest version from GitHub before running
- Idempotent step tracking — re-runnable after failures without redoing completed steps
- Installs Apache 2, PHP 8.2 + 8.3 (via ondrej/php PPA), MariaDB, PowerDNS, Exim 4, Dovecot, SpamAssassin, Fail2ban, Certbot
- Configures Apache reverse proxy on ports 2083 (NixClient) and 2087 (NixServer)
- Generates admin credentials automatically; displays them in the completion banner
- License activation against
https://license.nixpanel.io
- NixServer — WHM-style admin panel (React 18 + TypeScript + Tailwind + Vite, port 2087)
- NixClient — cPanel-style user panel (React 18 + TypeScript + Tailwind + Vite, port 2083)
- Licensing — license key validated against
https://license.nixpanel.ioduring install- Plans: Free, Solo ($9.99/mo), Host ($29.99/mo), Agency ($79.99/mo)
- Infrastructure —
.gitattributesenforcing LF line endings