A modern, feature-rich terminal UI for managing NGINX servers, built with Bubble Tea and Go.
- Interactive, keyboard-driven dashboard: Sites, Logs, Stats, and Metrics tabs
- Site management: enable/disable, config test, graceful reload, quick add
- Powerful template system for "Add Site" with 11 pre-configured templates:
- Static, SPA, Node.js, WordPress, Laravel, Django, Docker/Proxy, WebSocket, Domain Redirect, API Gateway, Blank
- Auto-populated forms, validation, and quick-start guides per template
- NGINX config generation with SSL/TLS, proxy, PHP-FPM, and custom block support
- Real-time metrics: CPU, memory, network, request throughput with live charts
- Access log viewer: color-coded by status code, auto-scroll, quick filtering
- Statistics: site distribution and performance summaries
- Modular architecture: testable, production-ready, easy to extend
- Modern TUI styling with a clean dark theme
Prerequisites:
- Go 1.24 or higher
- NGINX installed and running
- A Unix-like OS (Linux recommended)
Build from source:
git clone https://github.com/aitmiloud/ngxtui.git
cd ngxtui
make build
# or
go build -o bin/ngxtui ./cmd/ngxtuiRun the application (requires elevated privileges to manage NGINX configs):
sudo ./bin/ngxtui # after building locally
# or
sudo make run # build and run in one stepNotes:
- Sudo is required to read/write NGINX configuration files and reload the service.
- NgxTUI does not modify your configs without explicit actions from you.
←/→orh/l: Switch between tabs↑/↓ork/j: Navigate itemsEnter: Select/Execute actionEsc: Go backa: Add siter: Refresh sitesq: Quit application
- View all configured NGINX sites
- Enable/disable sites
- Test configuration
- Reload NGINX server
- Add new site configuration
- Real-time access log viewing
- Color-coded by status codes
- Auto-scroll support
- Quick status filtering
- Total sites overview
- Active sites count
- Request rate statistics
- Uptime monitoring
- Real-time CPU usage
- Memory utilization
- Network traffic
- Request rate trends
NgxTUI ships with a comprehensive template system for quick, safe site provisioning.
- 11 ready-to-use templates: Static, SPA, Node.js, WordPress, Laravel, Django, Docker/Proxy, WebSocket, Domain Redirect, API Gateway, Blank
- Auto-populates form fields and generates production-grade NGINX configs
- Includes SSL/TLS, proxying, PHP-FPM, and custom configuration blocks
- Built-in validation, previews, and quick-start guidance
- Go 1.24 or higher
- NGINX installed and configured
- Unix-like operating system (Linux, macOS)
- Terminal with true color support
This project follows a modular architecture with clear separation of concerns. See ARCHITECTURE.md for detailed documentation.
cmd/ngxtui/ # Application entry point
internal/
├── app/ # Bubble Tea application logic
├── model/ # Data models and types
├── nginx/ # NGINX service layer
├── styles/ # UI styling
└── ui/ # View rendering
make build # Build the application
make run # Build and run (requires sudo)
make test # Run tests
make lint # Run linter
make fmt # Format code- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Follow the architecture patterns (see
ARCHITECTURE.md) - Add tests for new functionality
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
-
Permission denied / operation not permitted
- Run via
sudoas shown above. - Ensure your user is allowed to reload NGINX (e.g., via
sudoers).
- Run via
-
NGINX reload fails
- Check syntax with
sudo nginx -t. - Inspect error logs (e.g.,
/var/log/nginx/error.log).
- Check syntax with
-
No sites listed / paths differ
- Verify your NGINX
sites-availableandsites-enableddirectories. - Customize paths in your system or adjust service configuration as needed.
- Verify your NGINX
-
Colors or graphics look wrong
- Use a terminal with true-color support.
- Ensure
TERMis set appropriately (e.g.,xterm-256color).
This project is licensed under the MIT License. See the LICENSE file for details.
- Charm for their amazing terminal UI libraries
- NGINX community for inspiration and documentation
