PHPackages                             omniglies/laravel-server-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. omniglies/laravel-server-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

omniglies/laravel-server-manager
================================

A Laravel package for server management with SSH connectivity, git deployment, monitoring, and log viewing

v1.9.0(1y ago)019MITPHPPHP ^8.2

Since Jun 22Pushed 11mo agoCompare

[ Source](https://github.com/aanfarhan/laravel-server-manager)[ Packagist](https://packagist.org/packages/omniglies/laravel-server-manager)[ RSS](/packages/omniglies-laravel-server-manager/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (7)Versions (32)Used By (0)

Laravel Server Manager Package
==============================

[](#laravel-server-manager-package)

A comprehensive Laravel package for server management with SSH connectivity, git deployment, monitoring, and log viewing capabilities.

Features
--------

[](#features)

- **SSH Connection Management**: Connect to remote servers using password or private key authentication
- **Terminal Access**: Dual-mode terminal support (Simple + WebSocket with xterm.js)
- **Git Deployment**: Deploy applications from git repositories with customizable build scripts
- **Server Monitoring**: Real-time monitoring of CPU, memory, disk usage, processes, and services
- **Log Management**: View, search, download, and manage server log files
- **Web Interface**: Clean, responsive web interface built with Tailwind CSS and Alpine.js

Installation
------------

[](#installation)

1. Install the package via Composer:

```
composer require omniglies/laravel-server-manager
```

2. Publish the configuration file:

```
php artisan vendor:publish --tag=config --provider="ServerManager\LaravelServerManager\ServerManagerServiceProvider"
```

3. Publish and run migrations (optional, for storing server configurations):

```
php artisan vendor:publish --tag=migrations --provider="ServerManager\LaravelServerManager\ServerManagerServiceProvider"
php artisan migrate
```

4. Publish views (optional, for customization):

```
php artisan vendor:publish --tag=views --provider="ServerManager\LaravelServerManager\ServerManagerServiceProvider"
```

5. For full terminal functionality, install Node.js dependencies and start the WebSocket server:

```
cd vendor/omniglies/laravel-server-manager/terminal-server
npm install
```

Configuration
-------------

[](#configuration)

The package publishes a configuration file to `config/server-manager.php`. You can customize:

- SSH connection settings
- Terminal configurations (Simple and WebSocket modes)
- WebSocket server settings and authentication
- Deployment configurations
- Monitoring thresholds
- Log management settings
- Security restrictions
- UI preferences

### WebSocket Terminal Configuration

[](#websocket-terminal-configuration)

Add these environment variables to your `.env` file:

```
# WebSocket Terminal Server
WEBSOCKET_TERMINAL_HOST=localhost
WEBSOCKET_TERMINAL_PORT=3001
WEBSOCKET_TERMINAL_SSL=false
WEBSOCKET_TERMINAL_JWT_SECRET=your-jwt-secret-here
WEBSOCKET_TERMINAL_TOKEN_TTL=3600
WEBSOCKET_TERMINAL_MAX_CONNECTIONS=100
```

Usage
-----

[](#usage)

### Web Interface

[](#web-interface)

Visit `/server-manager` in your Laravel application to access the web interface.

### Terminal Access

[](#terminal-access)

The package provides two terminal modes:

#### Simple Terminal Mode (Default)

[](#simple-terminal-mode-default)

- Works immediately, no additional setup required
- Execute commands independently
- View command output in real-time
- Perfect for basic server administration

#### WebSocket Terminal Mode (Full Terminal)

[](#websocket-terminal-mode-full-terminal)

Provides complete terminal functionality with interactive programs.

**Start the WebSocket server:**

```
# Development
cd vendor/omniglies/laravel-server-manager/terminal-server
npm run dev

# Production
npm start

# Or with PM2
pm2 start server.js --name "terminal-server"
```

**Features:**

- Real-time terminal emulation via xterm.js
- Interactive programs (nano, vim, top, htop)
- Full keyboard support and terminal resizing
- Copy/paste functionality
- WebSocket-based communication

### SSH Connection

[](#ssh-connection)

```
use ServerManager\LaravelServerManager\Services\SshService;

$sshService = app(SshService::class);

$config = [
    'host' => 'your-server.com',
    'username' => 'user',
    'password' => 'password', // or use 'private_key'
    'port' => 22
];

$connected = $sshService->connect($config);

if ($connected) {
    $result = $sshService->execute('ls -la');
    echo $result['output'];
}
```

### Deployment

[](#deployment)

```
use ServerManager\LaravelServerManager\Services\DeploymentService;

$deploymentService = app(DeploymentService::class);

$config = [
    'repository' => 'https://github.com/user/repo.git',
    'deploy_path' => '/var/www/html',
    'branch' => 'main',
    'build_commands' => ['npm install', 'npm run build'],
    'post_deploy_commands' => ['php artisan migrate', 'php artisan cache:clear']
];

$result = $deploymentService->deploy($config);
```

### Monitoring

[](#monitoring)

```
use ServerManager\LaravelServerManager\Services\MonitoringService;

$monitoringService = app(MonitoringService::class);

$status = $monitoringService->getServerStatus();
$processes = $monitoringService->getProcesses(10);
$services = $monitoringService->getServiceStatus(['nginx', 'mysql']);
```

### Log Management

[](#log-management)

```
use ServerManager\LaravelServerManager\Services\LogService;

$logService = app(LogService::class);

$logs = $logService->readLog('/var/log/nginx/error.log', 100);
$searchResults = $logService->searchLog('/var/log/syslog', 'error', 50);
$logFiles = $logService->getLogFiles('/var/log');
```

API Routes
----------

[](#api-routes)

The package provides several API endpoints:

### Server Management

[](#server-management)

- `GET /server-manager/servers/status` - Get server status
- `POST /server-manager/servers/connect` - Connect to server
- `POST /server-manager/servers/disconnect` - Disconnect from server
- `GET /server-manager/servers/processes` - Get running processes
- `GET /server-manager/servers/services` - Get service status

### Deployment

[](#deployment-1)

- `POST /server-manager/deployments/deploy` - Deploy application
- `POST /server-manager/deployments/rollback` - Rollback deployment
- `GET /server-manager/deployments/status` - Get deployment status

### Terminal Management

[](#terminal-management)

- `POST /server-manager/terminal/create` - Create terminal session (Simple or WebSocket mode)
- `POST /server-manager/terminal/execute` - Execute command in Simple mode
- `POST /server-manager/terminal/close` - Close terminal session
- `POST /server-manager/terminal/websocket/token` - Generate WebSocket authentication token
- `POST /server-manager/terminal/websocket/revoke` - Revoke WebSocket token
- `GET /server-manager/terminal/websocket/status` - Check WebSocket server status
- `POST /server-manager/terminal/websocket/start-server` - Start WebSocket server
- `POST /server-manager/terminal/websocket/stop-server` - Stop WebSocket server

### Log Management

[](#log-management-1)

- `GET /server-manager/logs/files` - List log files
- `GET /server-manager/logs/read` - Read log file
- `GET /server-manager/logs/search` - Search in log file
- `GET /server-manager/logs/tail` - Tail log file
- `GET /server-manager/logs/download` - Download log file
- `POST /server-manager/logs/clear` - Clear log file
- `POST /server-manager/logs/rotate` - Rotate log file

Security
--------

[](#security)

The package includes several security features:

- Command filtering (allowed/blocked commands)
- Connection limits
- Credential encryption options
- SSH key authentication support
- CSRF protection on all forms

Make sure to:

- Use strong SSH credentials
- Limit SSH access to specific IP addresses
- Regularly rotate SSH keys
- Monitor server access logs

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10.0+, 11.0+, or 12.0+
- phpseclib/phpseclib ^3.0
- firebase/php-jwt ^6.0
- Node.js 18+ (for WebSocket terminal server)

### Node.js Dependencies (for WebSocket Terminal)

[](#nodejs-dependencies-for-websocket-terminal)

- ws ^8.14.2
- ssh2 ^1.15.0
- jsonwebtoken ^9.0.2
- dotenv ^16.3.1

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Support
-------

[](#support)

For support, please create an issue in the GitHub repository or contact the maintainers.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance51

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

31

Last Release

368d ago

PHP version history (2 changes)v1.0.0-alpha.1PHP ^8.1

v1.1.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/b4f272483fa15f3e96187465b24731f66b7c00e8f30469408074786d8a546e65?d=identicon)[omniglies](/maintainers/omniglies)

---

Top Contributors

[![aanfarhan](https://avatars.githubusercontent.com/u/19621476?v=4)](https://github.com/aanfarhan "aanfarhan (47 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/omniglies-laravel-server-manager/health.svg)

```
[![Health](https://phpackages.com/badges/omniglies-laravel-server-manager/health.svg)](https://phpackages.com/packages/omniglies-laravel-server-manager)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M831](/packages/laravel-socialite)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k89.4M575](/packages/laravel-passport)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

749284.3k37](/packages/civicrm-civicrm-core)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
