# PM2 Web Manager 🚀
### A light weight web manager for all your PM2 processes
---
### Screenshots in site:
## ✨ Features
- **🔒 High Security**: Password hashing with Argon2id.
- **🛡️ Two-Factor Auth (2FA)**: Support for TOTP (Google Authenticator, Authy, etc.).
- **📊 Real-time Monitoring**: CPU, memory, and uptime tracking for all processes.
- **📜 Log Explorer**: Live terminal logs with "Load More" pagination and separate Standard/Error streams.
- **💾 Persistent Sessions**: SQLite-backed session storage that survives server restarts.
- **🛠️ Remote Control**: Start, stop, restart, and add processes directly from the UI.
---
## 🛠️ Installation
### 1. Prerequisites
- Node.js (v18 or higher recommended)
- PM2 installed globally: `npm install -g pm2`
### 2. Setup
Clone the repository and install dependencies:
```bash
git clone https://github.com/leodenglovescode/pm2-webmanager.git
cd pm2-webmanager
npm install
```
### 3. Start the Manager
You can run it directly with **NPX** without even installing:
```bash
npx pm2-webmanager
```
Or (Recommended) deploy it as a PM2 service for 24/7 uptime:
```bash
pm2 start server.js --name "pm2-webmanager" && pm2 save
```
Or install it globally and use the command:
```bash
npm install -g pm2-webmanager
pm2-webmanager
```
---
## 🚀 Usage
1. Open your browser and navigate to **[http://localhost:3434](http://localhost:3434)**.
2. **First Run**: You will be prompted to create an Administrator account. This is a **one-time** registration.
3. **2FA Setup**: Go to the **Settings** tab to enable Two-Factor Authentication for maximum security.
4. **Manage**: Click any process in the list to view its real-time logs and detailed statistics.
---
## 📦 Dependencies
- **Express**: Web framework.
- **PM2**: Programmatic control of process list.
- **Argon2**: Secure password hashing.
- **Otplib & QRCode**: TOTP-based 2FA.
- **Connect-SQLite3**: Persistent session store.
- **Tailwind CSS**: Modern UI styling.
## Coding Guide
- Framework and prompt by @leodenglovescode
- Code generated by Github Copilot