VPS Pilot is a server monitoring and management platform designed for private VPS servers.
It provides real-time monitoring, alerting, project management, and (future) cron job automation — all from a single dashboard.
- Agents installed on each node (server). (Agent repo)
- Agents send system metrics to the central server via TCP:
- CPU usage
- Memory usage
- Network statistics
- Disk usage
- Metrics are visualized in the dashboard with selectable time ranges:
- 5 minutes, 15 minutes, 1 hour, 1 day, 2 days, 7 days
- Real-time updates via WebSocket connection
- Interactive charts with historical data
- Configure alerts based on metric thresholds
- Multiple notification channels supported:
- Discord ✅
- Email ✅
- Slack ✅
- Flexible alert conditions (CPU, Memory, Disk, Network)
- Alert history and tracking
- Each node can have multiple projects
- Projects require a
config.vpspilot.jsonfile - Agents scan disks for project config files and send project metadata to the central server
- Central server will display available projects and allow:
- Running predefined commands
- Managing project logs
- Backing up project directories and databases
Sample config.vpspilot.json:
{
"name": "meta ads dashboard",
"tech": ["laravel", "react", "mysql"],
"logs": [],
"commands": [
{ "name": "node build", "command": "npm run build" },
{ "name": "php build", "command": "composer install" }
],
"backups": {
"env_file": ".env",
"zip_file_name": "project_backup",
"database": {
"connection": "DB_CONNECTION",
"host": "DB_HOST",
"port": "DB_PORT",
"username": "DB_USERNAME",
"password": "DB_PASSWORD",
"database_name": "DB_DATABASE"
},
"dir": [
"storage/app",
"database/companies"
]
}
}- Remote cron job creation and management
- Schedule tasks across multiple nodes
- Monitor job execution and logs
- Status: Not yet implemented
| Component | Technology |
|---|---|
| Agent | Golang |
| Central Server | Golang |
| Dashboard | React + Vite |
| Database | SQLite (dual DB) |
| Deployment | Single executable |
- Operational DB: Users, nodes, alerts, projects
- Timeseries DB: Metrics data (CPU, Memory, Network stats)
- Embedded UI: React app bundled into Go binary
- TCP Server: Receives metrics from agents (port 55001)
- HTTP/WebSocket: REST API + real-time data streaming
- Go 1.21+ (install)
- Node.js 18+ or Bun (install node or install bun)
- Git
git clone https://github.com/sanda0/vps_pilot.git
cd vps_pilot# Build both frontend and backend into single binary
./build.sh
# Binary created at: server/vps_pilotcd server
cp .env.example .env
# Edit .env with your settingsRequired .env variables:
DB_PATH=./data
TOKEN_LIFESPAN=60
TOKEN_SECRET=your-secret-key-min-32-chars
TCP_SERVER_PORT=55001
# Email alerts (optional)
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email@gmail.com
MAIL_PASSWORD=your-app-password
MAIL_FROM_ADDRESS=noreply@vpspilot.com# Migrations run automatically on first start
./vps_pilot -create-superuser./vps_pilotOpen your browser: http://localhost:8000
Login with the credentials you created in step 4.
For development with hot reload:
cd server
go run main.gocd client
npm install
npm run devAccess:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
cd server
# Migrations
make migrate # Run database migrations
make db-info # Show database info
make db-reset # Reset databases
# Building
make build # Build server only
make build-full # Build with embedded UI
make sqlc # Generate SQLC code
# Running
make run # Run server
make dev # Run with hot reload (requires air)
# User Management
make create-superuser # Create admin user
# Testing
make test # Run tests
make test-coverage # Run tests with coverage
# Maintenance
make backup # Backup databases
make clean # Clean build artifactsConfigure in .env for email notifications:
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email@gmail.com
MAIL_PASSWORD=your-app-password
MAIL_FROM_ADDRESS=noreply@vpspilot.com- Go to your Slack workspace
- Navigate to Apps → Incoming Webhooks
- Create a new webhook for your desired channel
- Copy the webhook URL and paste it in the alert configuration
- Go to your Discord server settings
- Navigate to Integrations → Webhooks
- Create a new webhook for your desired channel
- Copy the webhook URL and paste it in the alert configuration
Docker Compose setup will be available in future releases.
vps_pilot/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utilities and API client
│ └── dist/ # Built frontend (after build)
├── server/ # Go backend
│ ├── cmd/
│ │ ├── app/ # Main application
│ │ │ └── dist/ # Embedded UI (after build)
│ │ └── cli/ # CLI tools
│ ├── internal/
│ │ ├── db/ # Database layer
│ │ ├── handlers/ # HTTP handlers
│ │ ├── services/ # Business logic
│ │ ├── middleware/ # HTTP middleware
│ │ ├── tcpserver/ # TCP server for agents
│ │ └── utils/ # Utilities
│ └── data/ # SQLite databases
├── docs/ # Documentation
├── build.sh # Build script
└── README.md
- Change default admin credentials immediately
- Use a strong
TOKEN_SECRET(min 32 characters) - Keep databases in a secure location
- Use HTTPS in production (reverse proxy recommended)
- Secure TCP port 55001 with firewall rules
- Real-time metrics collection (CPU, Memory, Network, Disk)
- WebSocket-based live updates
- Discord alert integration
- Email alert integration
- Slack alert integration
- SQLite dual-database architecture
- Embedded UI in single binary
- User authentication with JWT
- Project management via
config.vpspilot.json - Remote command execution for projects
- Project backups (database + directories)
- Remote cron job creation and management
- Docker Compose deployment
- Multi-user support with roles
- API documentation (Swagger)
- Mobile app
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Build fails:
# Check frontend builds
cd client && npm run build
# Check Go compiles
cd server && go build .Server won't start:
# Check if port 8000 is in use
lsof -i :8000
# Check database permissions
ls -la data/Metrics not showing:
- Ensure agent is installed and running on nodes
- Check TCP port 55001 is open
- Verify node is registered in dashboard
For more help, see QUICKSTART.md or docs/BUILDING.md
Made with ❤️ by Sandakelum
This project is licensed under the MIT License.
- Agent Repository: https://github.com/sanda0/vps_pilot_agent
- Issues: https://github.com/sanda0/vps_pilot/issues
- Documentation: docs/
⭐ Star this repo if you find it useful!
