Lightweight, Powerful, and Modern Web-Based Infrastructure Automation Tool
- π₯οΈ Modern Web UI - Beautiful, responsive dashboard with real-time updates
- π Parallel Execution - Run commands on multiple hosts simultaneously
- π File Manager - Push/pull files across hosts with ease
- π Playbooks - Create and automate multi-step deployments
- π» Interactive Terminal - Real-time terminal with xterm.js
- π Dashboard - Monitor infrastructure with live statistics and charts
- π Command History - Track all executed commands
- π SSH Key-Based Auth - Secure, password-less authentication
- β‘ FastAPI Backend - High-performance async API
- π¨ React + TailwindCSS - Modern, customizable frontend
- Python 3.8+
- Node.js 18+
- SSH key for host authentication
Windows:
.\setup-web.batLinux/Mac:
chmod +x setup-web.sh
./setup-web.shBackend:
cd backend
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
venv\Scripts\activate # Windows
pip install -r requirements.txtFrontend:
cd frontend
npm install
npm run buildProduction Mode (Single Server):
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
uvicorn main:app --host 0.0.0.0 --port 8080Development Mode (Two Servers):
# Terminal 1 - Backend
cd backend
source venv/bin/activate
uvicorn main:app --host 0.0.0.0 --port 8080
# Terminal 2 - Frontend
cd frontend
npm run dev- URL: http://localhost:8080
- API Docs: http://localhost:8080/docs
- ReDoc: http://localhost:8080/redoc
Generate SSH key pair:
ssh-keygen -t ed25519 -f ~/.ssh/neutron.key
chmod 600 ~/.ssh/neutron.keyDistribute public key to hosts:
ssh-copy-id -i ~/.ssh/neutron.key.pub root@192.168.1.100Neutron Web can automatically import hosts from config.yaml:
ssh_user: "root"
private_key_file: "~/.ssh/neutron.key"
strict_host_key_checking: "no"
hosts:
- "192.168.1.100:22"
- "192.168.1.101:22"Place config.yaml in the project root and hosts will be auto-imported on startup.
Once the backend is running, visit http://localhost:8080/docs for interactive API documentation.
GET /api/hosts - List all hosts
POST /api/hosts - Add new host
PUT /api/hosts/{id} - Update host
DELETE /api/hosts/{id} - Delete host
POST /api/hosts/{id}/connect - Connect to host
POST /api/commands/execute - Execute command
POST /api/files/push - Upload file
POST /api/files/pull - Download file
GET /api/playbooks - List playbooks
POST /api/playbooks - Create playbook
POST /api/playbooks/execute - Run playbook
GET /api/history - Command history
GET /api/dashboard - Dashboard stats
Navigate to /hosts and click "Add Host" or use the API:
curl -X POST http://localhost:8080/api/hosts \
-H "Content-Type: application/json" \
-d '{
"name": "web-server-1",
"ip_address": "192.168.1.100",
"port": 22,
"user": "root"
}'Use the Terminal page at /terminal:
- Select target hosts
- Enter command (e.g.,
uptime,df -h) - Click Execute to run on all selected hosts in parallel
Navigate to /playbooks:
- Click "New Playbook"
- Add commands sequentially
- Select target hosts
- Execute with one click
Example playbook:
Name: Deploy Web App
Commands:
1. systemctl stop nginx
2. cd /var/www && git pull
3. systemctl start nginx
4. systemctl status nginx
Use the Files page at /files:
- Push: Upload local file to multiple hosts
- Pull: Download remote file from multiple hosts
- SSH key-only authentication (no passwords)
- Configurable StrictHostKeyChecking
- Input sanitization on all endpoints
- SQLite database with proper permissions
- CORS configured for production use
neutron-v10-web/
βββ backend/
β βββ main.py # FastAPI application
β βββ ssh_manager.py # SSH connection pool
β βββ commands.py # Command executor
β βββ models.py # SQLAlchemy models
β βββ requirements.txt # Python dependencies
βββ frontend/
β βββ src/
β β βββ App.jsx # Main app router
β β βββ main.jsx # React entry point
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ services/ # API client
β βββ package.json
β βββ vite.config.js
βββ config.yaml # SSH configuration & hosts
βββ .env.example # Environment variables template
βββ setup-web.bat # Windows setup script
βββ setup-web.sh # Linux/Mac setup script
βββ README.md
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Apache License 2.0 - See LICENSE for details
faruk-guler - github.com/faruk-guler
- FastAPI for the amazing backend framework
- React and the frontend ecosystem
- Paramiko for SSH support
- xterm.js for terminal emulation
Neutron v10 Web - Modern infrastructure automation made simple β‘
