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.
config.vpspilot.json fileSample 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"
]
}
}
| Component | Technology |
|---|---|
| Agent | Golang |
| Central Server | Golang |
| Dashboard | React + Vite |
| Database | SQLite (dual DB) |
| Deployment | Single executable |
55001)8080)git clone https://github.com/sanda0/vps_pilot.git
cd vps_pilot
The build.sh script handles everything: installs frontend dependencies, builds the React UI, and compiles it into the Go binary.
chmod +x build.sh
./build.sh
What it does:
client/dist/)server/cmd/app/dist/Output: server/vps_pilot
cd server
cp .env.example .env
Then open .env and fill in your values:
# Database directory
DB_PATH=./data
# JWT settings
TOKEN_LIFESPAN=60
TOKEN_SECRET=your-secret-key-min-32-chars
# TCP server (receives metrics from agents)
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
Note:
TOKEN_SECRETmust be at least 32 characters long.
Migrations run automatically on startup, but you can also run them manually:
cd server
./vps_pilot -migrate
Then create your admin account:
./vps_pilot -create-superuser
Follow the interactive prompts to set a username and password.
cd server
./vps_pilot
By default the server listens on port 8080. To use a different port:
./vps_pilot -port 9090
Open your browser: http://localhost:8080
Log in with the credentials you created in step 4.
All flags are passed directly to the vps_pilot binary:
| Flag | Default | Description |
|---|---|---|
-port |
8080 |
HTTP server port |
-migrate |
— | Run database migrations and exit |
-create-superuser |
— | Create an admin user interactively and exit |
-create-makefile |
— | Generate a Makefile in server/ and exit |
Examples:
# Run on a custom port
./vps_pilot -port 3000
# Only run migrations (no server started)
./vps_pilot -migrate
# Create an admin user
./vps_pilot -create-superuser
# Generate Makefile helper
./vps_pilot -create-makefile
For development with hot reload:
cd server
go run main.go
Or with air for hot reload:
cd server
air
cd client
npm install # or: bun install
npm run dev # or: bun run dev
Access:
Generate the Makefile first if you don’t have one:
cd server
./vps_pilot -create-makefile
Then use:
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 (runs ../build.sh)
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 artifacts
Configure in .env:
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
vps_pilot/
├── client/ # React + Vite frontend
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ └── lib/ # Utilities and API client
│ └── dist/ # Built frontend (generated, gitignored)
├── server/ # Go backend
│ ├── cmd/
│ │ ├── app/ # HTTP server + embedded UI
│ │ │ └── dist/ # Embedded UI files (generated, gitignored)
│ │ └── cli/ # CLI tools (migrations, superuser, makefile)
│ ├── internal/
│ │ ├── db/ # Database layer (SQLC + migrations)
│ │ ├── handlers/ # HTTP handlers
│ │ ├── services/ # Business logic
│ │ ├── middleware/ # HTTP middleware
│ │ ├── tcpserver/ # TCP server for agent metrics
│ │ └── utils/ # Utilities
│ ├── data/ # SQLite databases (gitignored)
│ ├── main.go # Entry point
│ └── vps_pilot # Compiled binary (gitignored)
├── docs/ # Documentation
├── build.sh # Full build script
└── README.md
Docker Compose setup will be available in a future release.
TOKEN_SECRET (minimum 32 characters)data/ directory in a secure, backed-up location55001 to trusted agent IPs via firewall rulesBuild fails:
# Check the frontend builds cleanly
cd client && npm run build
# Check the Go code compiles
cd server && go build .
Server won’t start:
# Check if port 8080 is already in use
lsof -i :8080
# Check database directory permissions
ls -la server/data/
# Verify .env exists
ls -la server/.env
UI doesn’t load after build:
# Check that dist was copied into the server
ls server/cmd/app/dist/
# If missing, rebuild
./build.sh
Metrics not showing up:
55001 is open and reachable from the nodeconfig.vpspilot.jsonContributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Made with ❤️ by Sandakelum
This project is licensed under the MIT License.
⭐ Star this repo if you find it useful!