Releases: omar00050/easy-devops
Release list
V1.0.2 🛠️⚙️
[1.0.2] — 2026-04-05
Fixed
nginx -t no longer needs sudo (and never did)
- Root cause:
nginx -tonly reads world-readable config files (/etc/nginx/nginx.confis 644). It was never necessary to run it withsudo. All sudo prefixes have been removed from everynginx -tcall acrosscli/managers/nginx-manager.js,cli/managers/domain-manager.js,dashboard/routes/domains.js, anddashboard/lib/nginx-service.js. - Why it was breaking: The dashboard runs headless (no TTY), so
sudo nginx -ttriggered "a terminal is required to read the password" → the test was always reported as failed even with valid configs.
nginx -t PID file false-negative (/run/nginx.pid Permission Denied)
- Root cause: When run as a non-root user,
nginx -twrites "syntax is ok" to stderr then attempts to write/run/nginx.pid— which requires root. This causes nginx to exit with code 1 even though the config is perfectly valid. - Fix:
isNginxTestOk(result)added tocore/platform.js. Returnstrueifresult.successOR if the output contains"syntax is ok". All 11 nginx config-test result checks now use this function instead of checking exit code directly. - Tip: Always use
isNginxTestOk(result)— never rely onresult.successalone when checkingnginx -tresults on Linux.
sudo -n for all systemctl calls in the dashboard
- The dashboard API runs as a background Express server with no attached terminal. All
sudo systemctlcalls indashboard/lib/nginx-service.jsnow usesudo -n(non-interactive). If NOPASSWD is not configured, the call fails immediately with a clear message instead of hanging. isSudoPermissionError()updated to catch"sudo:"prefix in output (coverssudo: a password is required,sudo: a terminal is required, and other sudo error variants).
Linux permissions setup in Settings
- Problem: On Linux,
sudo -n systemctl start/stop/reload/restart nginxalways fails until NOPASSWD sudoers rules are configured. Previously there was no way to configure this from the app. - Fix: New one-time setup flow:
- CLI:
Settings → Setup Linux Permissions— usesrunInteractive('sudo -v')to authenticate, then writes/etc/sudoers.d/easy-devopswithNOPASSWDrules for systemctl and the detected nginx binary path. - Dashboard:
Settings → Linux Permissions card— password field + "Setup Permissions" button. UsesPOST /api/settings/permissions/setupwhich pipes the password tosudo -Sviaspawnstdin (no terminal needed). - New
core/permissions.jsmodule:setupLinuxPermissions(),checkPermissionsConfigured(). - Status badge shows "✓ Configured" or "⚠ Required". CLI menu shows "✅ configured" or "⚠ required" in the menu item label.
- CLI:
Dynamic nginx binary path detection
which nginxis called viafindNginxPath()in bothcore/permissions.jsanddashboard/lib/nginx-service.jsto detect the real nginx binary path at runtime.- The SUDO_RULES written to
/etc/sudoers.d/easy-devopsinclude the detected path (e.g./usr/sbin/nginx) rather than hard-coding/usr/bin/nginx. - Dashboard nginx test/start/save-config flows use the detected path for
nginx -t.
ssl-manager.js mkdir under /etc/ directories
- On Linux, creating directories under
/etc/easy-devops/requires root.ssl-manager.jsmkdir calls now usesudo -n mkdir -pfollowed bysudo -n chownto restore ownership, instead of failing withEACCES.
Added
core/permissions.js— new module withsetupLinuxPermissions()andcheckPermissionsConfigured().GET /api/settings/permissions— returns{ configured: boolean }.POST /api/settings/permissions/setup— accepts{ password }, runssudo -Ssetup, returns{ success: true }or{ error }.isNginxTestOk(result)exported fromcore/platform.js— the correct semantic check for nginx config validity on all platforms.
Easy DevOps frest v0.1.0
Easy DevOps
A unified DevOps management tool with interactive CLI and web dashboard for managing Nginx, SSL certificates, and Node.js on Linux and Windows servers.
Features
- 🖥️ Interactive CLI — Arrow-key menus with real-time status indicators
- 📊 Web Dashboard — Modern Vue 3 interface with dark/light themes
- 🌐 Nginx Management — Start/stop/reload, config editor, error logs
- 🔒 SSL Certificate Management — Let's Encrypt via Certbot, expiry tracking
- 🔗 Domain Management — Reverse proxy configurations with SSL, WebSocket, gzip, rate limiting
- 📦 Node.js Manager — Version switching via nvm, global package management
- 🔄 Real-time Updates — Socket.io powered status updates in dashboard
- 💿 SQLite Storage — Persistent configuration via
good.db
Requirements
- Node.js 18+ (with npm)
- Linux (Debian/Ubuntu) or Windows
- Optional: Nginx, Certbot, nvm (installed separately or via the tool)
Installation
Quick Install (One-Line)
If you have Node.js 18+ installed, run:
npm install -g easy-devops && easy-devopsIf you don't have Node.js yet, use the bootstrap installer:
Linux / macOS
curl -fsSL https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh | bashOr with wget:
wget -qO- https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.sh | bashWindows (PowerShell)
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.ps1" -OutFile "install.ps1"; ./install.ps1Or from Command Prompt:
powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/omar00050/Easy-DevOps/main/install.ps1' -OutFile 'install.ps1'; ./install.ps1"What the installer does:
- Checks for Node.js 18+ (installs via nvm if missing)
- Installs Easy DevOps globally via npm
- Launches the interactive CLI
Via npm (Recommended)
npm install -g easy-devops
easy-devopsFrom Source
git clone https://github.com/omar00050/Easy-DevOps.git
cd Easy-DevOps
npm install
npm startQuick Start
# Start the interactive CLI
easy-devops
# Or run directly
npx easy-devopsUsage
CLI Overview
╔══════════════════════════════╗
║ Easy DevOps v0.1.0 ║
╚══════════════════════════════╝
nginx: ✅ v1.26.2 | certbot: ✅ v2.9.0 | node: v22.21.1
? Select an option:
📦 Node.js Manager
🌐 Nginx Manager
🔒 SSL Manager
🔗 Domain Manager
🎛️ Open Dashboard
⚙️ Settings
✖ Exit
Press Ctrl+C at any prompt to exit cleanly.
Node.js Manager
Manage your Node.js runtime using nvm (Unix) or nvm-windows (Windows).
| Option | Description |
|---|---|
| Switch Node version | Lists available LTS versions and switches to the selected one |
| Manage global packages | Install, uninstall, or list globally installed npm packages |
| Update npm | Updates npm to the latest version |
Nginx Manager
Control the Nginx web server from the CLI.
| Option | Description |
|---|---|
| Reload nginx | Tests the config then sends a graceful reload signal |
| Restart nginx | Tests the config then performs a full stop/start |
| Test config | Runs nginx -t and displays the result |
| View error log | Shows the last 50 lines of the Nginx error log |
| Install nginx | Installs Nginx via apt-get (Linux) or winget (Windows) |
Domain Manager
Manage Nginx reverse proxy configurations from CLI or dashboard.
| Option | Description |
|---|---|
| List Domains | Show all configured domains in a table |
| Add Domain | Interactive prompts for domain configuration |
| Edit Domain | Modify existing domain settings |
| Delete Domain | Remove domain with confirmation |
Domain Configuration Options:
- SSL/HTTPS with auto-renewal tracking
- WebSocket support (
wsupstream type) - Gzip compression
- Rate limiting (requests/second + burst)
- Security headers (X-Frame-Options, etc.)
- Custom timeout and body size limits
- Domain-specific access logs
SSL Manager
Manage Let's Encrypt SSL certificates using Certbot.
| Status | Meaning |
|---|---|
| ✅ green | Valid, expires in > 30 days |
| Expiring soon (10–30 days) | |
| ❌ red | Critical (< 10 days) |
Note: Renewing a certificate temporarily stops Nginx to free port 80, then restarts it automatically.
Web Dashboard
Start the web dashboard:
# From CLI menu: Select "🎛️ Open Dashboard" → "Start dashboard"
# Or directly:
npm run dashboardAccess at http://localhost:3000 (or configured port).
Dashboard Pages
| Page | Features |
|---|---|
| Overview | System status cards for Nginx, SSL, Domains |
| Nginx | Start/stop controls, config editor, error logs |
| SSL | Certificate list, renewal actions, expiry badges |
| Domains | Add/edit form with collapsible sections, table view |
| Settings | Port, password, directory configuration |
API Endpoints
The dashboard exposes RESTful API endpoints:
| Endpoint | Method | Description |
|---|---|---|
/api/nginx/status |
GET | Get nginx running status |
/api/nginx/start |
POST | Start nginx |
/api/nginx/stop |
POST | Stop nginx |
/api/nginx/reload |
POST | Graceful reload |
/api/nginx/configs |
GET | List config files |
/api/nginx/config/:file |
GET/POST | Read/write config file |
/api/domains |
GET/POST | List/create domains |
/api/domains/:name |
GET/PUT/DELETE | Domain CRUD |
/api/ssl |
GET | List certificates |
/api/ssl/renew/:domain |
POST | Renew certificate |
/api/settings |
GET/POST | Dashboard settings |
Configuration
All configuration is stored in data/easy-devops.sqlite:
| Key | Contents |
|---|---|
config |
Dashboard port, password, Nginx/Certbot directories |
system-detection |
Cached system info (OS, Node, nginx, certbot) |
domains |
Array of domain configurations |
Project Structure
easy-devops/
├── cli/
│ ├── index.js # CLI entry point
│ ├── managers/ # Business logic modules
│ └── menus/ # Menu dispatcher stubs
├── core/
│ ├── config.js # Configuration loader
│ ├── db.js # SQLite database (good.db)
│ ├── detector.js # System environment detection
│ └── shell.js # Cross-platform shell executor
├── dashboard/
│ ├── server.js # Express + Socket.io server
│ ├── routes/ # API endpoints
│ ├── lib/ # Service helpers
│ ├── views/ # EJS templates
│ └── public/ # Static assets (Vue app)
├── data/
│ └── easy-devops.sqlite
└── lib/
└── installer/ # Bootstrap scripts
Platform Support
| Feature | Linux | Windows |
|---|---|---|
| CLI Interface | ✅ | ✅ |
| Web Dashboard | ✅ | ✅ |
| Nginx Management | ✅ | ✅ |
| SSL (Certbot) | ✅ | ✅ |
| Node.js (nvm) | ✅ | ✅ (nvm-windows) |
| System Service | systemd | Task Scheduler |
Development
# Clone and install
git clone https://github.com/omar00050/Easy-DevOps.git
cd Easy-DevOps
npm install
# Run CLI
npm start
# Run dashboard
npm run dashboard
# System info only
npm run system-infoContributing
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
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Omar Farghaly
- GitHub: @omar00050
- npm: abo_farghaly
Support
If you encounter any issues or have questions, please open an issue on GitHub.