Skip to content

theNareshofficial/LinuxWebUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐧 LinuxWebUI

⚠️ Beta Release β€” v0.1.0-beta
This project is under active development. Expect bugs, breaking changes, and incomplete features. Contributions and feedback are welcome.

A clean, fast, Apple-inspired web interface for monitoring and controlling your Linux server β€” built with pure PHP, no frameworks, no bloat.

PHP Apache License Status Platform


Screenshots

Dashboard with live RAM, CPU, Disk monitoring and service control cards.

LinuxWebUI Dashboard

LinuxWebUI Dashboard


Features

  • Live System Stats β€” RAM, CPU load, Disk usage, Uptime β€” updates every 3 seconds
  • Service Control β€” Start, Stop, Restart services with one click (Apache2, SSH, FTP, MongoDB, MySQL, Nginx)
  • Real-time Charts β€” RAM donut chart, CPU sparkline history, Disk usage bars
  • User Auth β€” Secure login and registration with bcrypt password hashing
  • Apple-inspired UI β€” Frosted glass design, system font, smooth animations β€” loads fast
  • Session Security β€” PHP sessions with login time tracking
  • Responsive β€” Works on desktop and mobile

Requirements

  • Linux (Debian/Ubuntu/Kali recommended)
  • Apache2
  • PHP 8.0+
  • gcc (for service control binary)
  • systemctl (systemd-based distros only)

Installation

1. Clone the repository

git clone https://github.com/yourusername/LinuxWebUI.git
cd LinuxWebUI

2. Copy to Apache webroot

sudo cp -r . /var/www/html/
sudo chown -R www-data:www-data /var/www/html/
sudo chmod 640 /var/www/html/config/users.json

3. Build the service control binary

sudo gcc svc-control.c -o /tmp/svc-control
sudo chown root:root /tmp/svc-control
sudo chmod 4755 /tmp/svc-control

4. Configure sudoers (optional β€” for systemctl access)

sudo bash -c 'cat > /etc/sudoers.d/www-data-systemctl << EOF
Defaults:www-data !requiretty
www-data ALL=(root) NOPASSWD: /tmp/svc-control
EOF'
sudo chmod 440 /etc/sudoers.d/www-data-systemctl

5. Restart Apache

sudo systemctl restart apache2

6. Open in browser

http://localhost/

Register your first account and you're in.


Project Structure

LinuxWebUI/
β”œβ”€β”€ index.php              # Redirects to login
β”œβ”€β”€ login.php              # Login page
β”œβ”€β”€ register.php           # Registration page
β”œβ”€β”€ dashboard.php          # Main dashboard
β”œβ”€β”€ logout.php             # Session destroy
β”‚
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ stats.php          # Returns RAM/CPU/Disk JSON
β”‚   └── service.php        # Service start/stop/restart API
β”‚
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ auth.php           # Session guard
β”‚   └── functions.php      # getRAM, getCPU, getDisk, getUptime
β”‚
β”œβ”€β”€ config/
β”‚   └── users.json         # User store (bcrypt hashed passwords)
β”‚
└── docker/                # Docker setup (dev only)
    β”œβ”€β”€ Dockerfile
    └── php.ini

Services Monitored

Service Port Description
Apache2 80, 443 Web Server
SSH 22 Secure Shell
FTP (vsftpd) 21 File Transfer
MongoDB 27017 NoSQL Database
MySQL 3306 SQL Database
Nginx 80, 443 Proxy Server

To add more services β€” edit the SERVICES array in dashboard.php and the whitelist in api/service.php.


Security Notes

  • All passwords are hashed with bcrypt (PHP PASSWORD_BCRYPT)
  • Service control uses a whitelisted C binary β€” arbitrary commands are not possible
  • Sessions use httponly cookies
  • All user input is validated and sanitized with htmlspecialchars()
  • open_basedir is configurable via docker/php.ini

This project is intended for local network / homelab use. Do NOT expose it to the public internet without adding HTTPS and additional hardening.


Known Issues (Beta)

  • Service status detection uses port checking β€” may show false positives if another process uses the same port
  • No HTTPS support yet (planned for v0.2.0)
  • No role-based access control yet (all users have equal access)
  • Mobile sidebar not yet implemented
  • Processes, Network, Files pages are UI placeholders only

Contributing

Pull requests are welcome. For major changes please open an issue first.

git checkout -b feature/your-feature
git commit -m "Add your feature"
git push origin feature/your-feature

License

MIT License β€” free to use, modify, and distribute.


Beta disclaimer: This software is provided as-is. It is not production-ready. Use at your own risk on trusted networks only.

About

🐧 Self-hosted Linux server dashboard β€” monitor stats & control services from your browser | v0.1.0-beta

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors