Skip to content

greenerytx/serverpilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

ServerPilot - Windows Hosting Panel

A custom hosting panel for Windows Server 2022 with support for Node.js, Python, .NET applications, custom scheduler, system monitoring, and AI-powered features.

Features

  • Multi-runtime Support: Host Node.js, Python, .NET, and static websites
  • Process Manager: Auto-start, auto-restart with health checks
  • Custom Scheduler: Cron-like job scheduling (replaces Windows Task Scheduler)
  • System Monitoring: Real-time CPU, memory, disk, and network metrics with alerts
  • AI Integration: OpenAI-powered system analysis and chat assistant
  • Modern Dashboard: React/Next.js web interface

Access Points

Windows Services

ServerPilot runs as Windows services for automatic startup:

  • serverpilotapi.exe - API Service
  • serverpilotdashboard.exe - Dashboard Service

Service Commands

# Start services
net start serverpilotapi.exe
net start serverpilotdashboard.exe

# Stop services
net stop serverpilotdashboard.exe
net stop serverpilotapi.exe

# Check status
sc query serverpilotapi.exe
sc query serverpilotdashboard.exe

Or use the batch scripts:

  • C:\ServerPilot\start.bat - Start all services
  • C:\ServerPilot\stop.bat - Stop all services

Configuration

API Configuration

Edit C:\ServerPilot\api\.env:

PORT=4000
HOST=127.0.0.1
NODE_ENV=production
JWT_SECRET=your-secure-secret
ADMIN_PASSWORD=admin123
OPENAI_API_KEY=your-openai-api-key
APPS_PATH=C:\ServerPilot\apps
LOGS_PATH=C:\ServerPilot\logs
DATA_PATH=C:\ServerPilot\data

Default Login

  • Username: admin
  • Password: admin123

Important: Change the admin password after first login!

Directory Structure

C:\ServerPilot\
├── api\                  # Backend API (Node.js/Express)
│   ├── src\              # TypeScript source
│   ├── dist\             # Compiled JavaScript
│   └── .env              # Configuration
├── dashboard\            # Frontend (Next.js/React)
│   └── .next\            # Build output
├── apps\                 # Hosted applications
├── data\                 # Database (JSON files)
├── logs\                 # Application logs
├── web\                  # IIS web root
│   └── web.config        # Reverse proxy config
├── start.bat             # Start all services
├── stop.bat              # Stop all services
└── README.md             # This file

API Endpoints

Health

  • GET /health - API health check

Authentication

  • POST /api/auth/login - Login

Applications

  • GET /api/apps - List all apps
  • POST /api/apps - Create app
  • GET /api/apps/:id - Get app details
  • PUT /api/apps/:id - Update app
  • DELETE /api/apps/:id - Delete app

Processes

  • GET /api/processes - List running processes
  • POST /api/processes/:id/start - Start app
  • POST /api/processes/:id/stop - Stop app
  • POST /api/processes/:id/restart - Restart app

Scheduler

  • GET /api/scheduler/jobs - List jobs
  • POST /api/scheduler/jobs - Create job
  • DELETE /api/scheduler/jobs/:id - Delete job
  • POST /api/scheduler/jobs/:id/run - Run job now
  • GET /api/scheduler/history - Job execution history

Monitoring

  • GET /api/monitor/metrics - Current system metrics
  • GET /api/monitor/history - Metrics history
  • GET /api/monitor/alerts - System alerts
  • DELETE /api/monitor/alerts/:id - Dismiss alert

AI Features

  • POST /api/ai/chat - Chat with AI assistant
  • GET /api/ai/analyze-health - AI system health analysis
  • POST /api/ai/analyze-logs - AI log analysis

Logs

  • GET /api/logs - Get application logs

Reinstalling Services

# Uninstall
node C:\ServerPilot\api\uninstall-service.js

# Install
node C:\ServerPilot\api\install-service.js
node C:\ServerPilot\dashboard\install-service.js

Troubleshooting

Services won't start

  1. Check Windows Event Viewer for errors
  2. Verify Node.js is installed: node --version
  3. Check service logs in the daemon folder

Dashboard not loading

  1. Verify API is running: curl http://localhost:4000/health
  2. Check dashboard service: sc query serverpilotdashboard.exe
  3. Rebuild if needed: npm run build --prefix C:\ServerPilot\dashboard

IIS Proxy issues

  1. Verify ARR is enabled: Check IIS Manager
  2. Test direct access: http://localhost:3000 and http://localhost:4000
  3. Check web.config in C:\ServerPilot\web

Built with Node.js, Express, Next.js, React, and TypeScript.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors