A minimalist, lightweight, and self-hosted server orchestration dashboard designed to deploy and monitor personal web applications and background services.
🌐 Live Demo: https://demo.cpanel.dilua.site/
- Frontend: Next.js (React 19), Tailwind CSS, TypeScript, Monospace & Outfit typography.
- Backend: FastAPI (Python 3), SQLAlchemy ORM, SQLite database, and system-level telemetry.
- Service Orchestration:
- Linux: Native Systemd service management (user-space or root).
- Windows: NSSM (Non-Sucking Service Manager) for Windows Services.
- Universal: Native Docker CLI integration via Docker Engine sockets.
graph TD
User([User Browser]) -->|HTTPS| Proxy[Caddy / Nginx Reverse Proxy]
Proxy -->|Port 3000| Frontend[Next.js Frontend]
Proxy -->|Port 8080| Backend[FastAPI Backend Agent]
Backend -->|SQLite| DB[(minicpanel.db)]
Backend -->|systemctl --user| Systemd[Linux Systemd Services]
Backend -->|Docker Socket| Docker[Docker Containers]
Backend -->|psutil| Telemetry[OS Hardware Status]
- System Telemetry & Telemetries: Real-time tracking of hardware health (CPU, memory, disk usage, and uptime) with sparkline visualizers, and ingress traffic monitoring (requests per second, HTTP status codes, and bandwidth usage).
- Project Deployer & Auto-Setup Engine: Automated deployment of projects directly from Git repositories using Docker, Systemd (Linux), or NSSM (Windows) with dynamic port allocation. Features an Auto-Setup Engine that automatically detects project stacks and configures environments for Node.js, Bun, Python (virtualenv), PHP (Composer), Go, and Rust.
- Deployment History & Build Logs: Tracks git commit metadata (commit message, SHA, author, and timestamp) for every deployment run and records comprehensive build/compilation logs.
- Web-Based File Explorer: Interactive file manager allowing users to browse, create, delete, and edit files (such as configuration
.envfiles) directly in their web browser. - Database Administrator: A lightweight administration interface to inspect tables, review schemas, perform pagination on rows, and execute raw SQL queries securely for SQLite, PostgreSQL, and MySQL.
- Task Scheduler (Cron Jobs): An integrated task scheduler with an interactive cron expression generator and log monitors to capture output and execution history.
- Backup & Recovery System: Folder and database compression tools with scheduled automated backups, supporting local storage and remote storage configurations.
- SSL/HTTPS Automation: Automated Let's Encrypt SSL certificate issuance and renewal (via ACME/Certbot) for configured domains and subdomains pointing to the server.
- System Alerting: Integration with Telegram and Discord webhooks to dispatch notifications when hardware thresholds are exceeded or if service status changes.
- Python 3.10 or newer
- Node.js v18 or newer (with npm)
- Git
- (Optional) Docker Engine
- Navigate to the backend directory and create a Python Virtual Environment:
cd api python -m venv .venv - Activate the virtual environment:
- Linux/macOS:
source .venv/bin/activate - Windows:
.venv\Scripts\activate
- Linux/macOS:
- Install the dependencies:
pip install . - Start the development server using Uvicorn:
uvicorn app.main:app --host 127.0.0.1 --port 8080 --reload
- Navigate to the frontend directory:
cd web - Install the Node.js packages:
npm install
- Run the Next.js development server:
Open http://localhost:3000 to access the dashboard.
npm run dev
Since the frontend of mini.cpanel is a Next.js application, it can be deployed on static hosting platforms like Vercel or Netlify.
- Link your GitHub repository to Vercel or Netlify.
- Add the following environment variable in the dashboard project configuration:
NEXT_PUBLIC_API_URL: The public domain URL of your backend server (e.g.,https://api.yourdomain.com).
- Deploy the application. Note: The backend API agent must run on a persistent virtual private server (VPS) because it requires direct, low-level OS access (Docker, systemd) to run orchestration commands.
This approach runs both the frontend and backend on the same VPS, exposed securely under a private domain or subdomain.
To ensure the backend runs continuously in the background, create a systemd service file at /etc/systemd/system/minicpanel-api.service:
[Unit]
Description=Mini cPanel FastAPI Backend Service
After=network.target
[Service]
User=yourusername
WorkingDirectory=/home/yourusername/mini-cpanel/api
ExecStart=/home/yourusername/mini-cpanel/api/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8080
Restart=always
# Environment Variables
Environment="CPANEL_SECRET_KEY=your-production-secret-key"
Environment="CPANEL_BACKEND_CORS_ORIGINS=https://cpanel.yourdomain.com"
Environment="CPANEL_DATA_DIR=/home/yourusername/.minicpanel"
Environment="CPANEL_APPS_DIR=/home/yourusername/apps"
[Install]
WantedBy=multi-user.targetEnable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable minicpanel-api.service
sudo systemctl start minicpanel-api.service- Build the production application in the
/webdirectory:npm run build
- Start the daemon process. You can use PM2 to manage the background process:
pm2 start npm --name "minicpanel-web" -- start
To handle SSL certificates automatically and expose your dashboard securely over port 80/443, use Caddy Server (recommended for automatic Let's Encrypt integration).
Create a Caddyfile:
cpanel.yourdomain.com {
# Route main requests to the Next.js frontend
reverse_proxy localhost:3000
}
cpanel.yourdomain.com/api/* {
# Route API requests to the FastAPI backend agent
reverse_proxy localhost:8080
}Run Caddy to enable HTTPS automatically.
You can configure automatic redeployments whenever code is pushed to your Git repository:
- Get Webhook Details: Under the project configuration card in the dashboard, expand the Git Webhook section to reveal your project's unique Payload URL (e.g.,
http://your-domain/api/v1/projects/webhook/<project-id>) and Secret Key. - Configure GitHub:
- Open your project repository on GitHub.
- Navigate to Settings -> Webhooks -> Add webhook.
- Paste the Payload URL from your dashboard.
- Change the Content type to
application/json. - Paste the Secret Key into the Secret field.
- Choose Just the push event and click Add webhook.
- Verify: Run a
git pushto your repository. Mini cPanel will verify the cryptographic signature, trigger a redeployment in the background, fetch the latest commit details, and log the build process.
- Backend Tests (Pytest):
cd api .venv/bin/pytest - Frontend Tests (Jest):
cd web npm test
If you encounter any bugs, security vulnerabilities, or have general feedback, please feel free to open a GitHub Issue or contact me directly at luisdimas838@gmail.com.
