PHP Classes
elePHPant
Icontem

PHP Small Server Administrator: Web panel for small Debian and Ubuntu servers

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (640)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-07-03 (3 months ago) RSS 2.0 feedStarStarStarStar 72%Total: 418 This week: 3All time: 6,083 This week: 377Up
Version License PHP version Categories
smallserveradmin 1.0.57Custom (specified...5System information, Utilities and Tools, S...
Description Author

This package implements a Web based control panel for small Debian and Ubuntu servers.

It connects to a remote server via ssh to retrieve information and perform the necessary actions.

It provides several modules but can be extended with new modules. Currently it provides modules for:

- Starting and stopping services
- Manage user accounts and groups
- Monitor running processes
- Manage files and directories
- Manage Subversion users, groups and repositories
- Edit Web server file configurations

Innovation Award
PHP Programming Innovation award winner
July 2016
Winner


Prize: One big elePHPant Plush Mascott
Most hosting companies provide plans that let developers controls several aspects of configuration of a server via a Web browser by accessing a control panel installed in the server machine to be configured.

This package provides a more advanced solution in pure PHP that allows you to manage several aspects of configuration of hosting servers remotely.

It uses ssh to communicate with the remote server that you want to manage and lets you perform several useful aspects like: managing user accounts, starting and stopping local servers and or services, configuring Web servers, managing files and directories, as well monitoring the server machine user resources.

Manuel Lemos
Picture of Aleksey Nemiro
  Performance   Level  
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Details

?# SmallServerAdmin (SSA)

This control panel for small Debian and Ubuntu servers.

The interaction with a server is performed via SSH.

The panel has a modular structure. One can easily create new modules or enhance existing ones.

Features

  • User Management: * viewing, creating, editing and deleting users.
  • Sites Management: * supports Nginx, Nginx + Apache; * list of sites; * config files editor; * enabling and disabling sites; * creating a configuration-based templates; * deleting sites.
  • File Management: * list of files and folders; * creation of new folders and text files; * viewing and editing files; * moving, copying and deleting files and folders; * permissions management.
  • Subversion Management: * users and groups; * repositories.
  • Server Monitoring: * list of processes; * CPU, RAM and HDD usage.
  • Service Management: start, stop and reload;
  • SSH client: unilateral execution of commands.

License

SmallServerAdmin is licensed under the Apache License Version 2.0.

See also Third-Party License.

Requirements

Server requirements to manage (administrable server):

  • Debian 7 or Debian 8, or Ubuntu Server 16;
  • OpenSSH >= 6.7;
  • sudo >= 1.8.10;
  • sysstat >= 11.0.1;
  • Nginx >= 1.6 and/or Apache >= 2.4 (for web server);
  • htan-runner for ASP.NET FastCGI;
  • See also README files for individual modules.

The panel can be located on any server.

Server requirements for the control panel:

  • Linux, Windows, Mac OS/OS X;
  • Apache and/or Nginx, or IIS, or another web server with PHP support;
  • PHP5 >= 5.5 or PHP7 with ssh2 extension;

_NOTE: Earlier versions have not been tested._

_NOTE: For Windows required PHP v5.5._

Installation & Configuration

Server Configuration (administrable server)

If SmallServerAdmin will be located on the managed (administrable) server, it is recommended to use HTAN to automatic install SmallServerAdmin:

Debian

# root access is required
su -l root

# update packages
apt-get update && apt-get upgrade

# prerequisites
apt-get install -y less libpcre3 git

# clone htan to /usr/lib/htan
git clone https://github.com/adminstock/htan.git /usr/lib/htan

# create symbolic links to htan
[[ -f /sbin/htan ]] || ln -s /usr/lib/htan/run /sbin/htan
[[ -f /usr/sbin/htan ]] || ln -s /usr/lib/htan/run /usr/sbin/htan

# set permissions
chmod u=rwx /usr/lib/htan/run

# run
htan --yes --install=ssa

Ubuntu Server

# update packages
sudo apt-get update && sudo apt-get upgrade

# prerequisites
sudo apt-get install -y less libpcre3 git

# clone htan to /usr/lib/htan
sudo git clone https://github.com/adminstock/htan.git /usr/lib/htan

# create symbolic links to htan
[[ -f /sbin/htan ]] || sudo ln -s /usr/lib/htan/run /sbin/htan
[[ -f /usr/sbin/htan ]] || sudo ln -s /usr/lib/htan/run /usr/sbin/htan

# set permissions
sudo chmod u=rwx /usr/lib/htan/run

# run
sudo htan --yes --install=ssa

Manually installation

To manually install and configure the server, use the following instructions below.

All commands to the server are performed through sudo. On the server, you must install and configure sudo.

For Debian only, istall sudo:

su -l root
apt-get -y sudo

The interaction with the server will be carried out via SSH. Usually on a server must already be installed OpenSSH package, but if it is not, you need to install OpenSSH.

To obtain information about the system used sysstat, which is also necessary to install.

sudo apt-get -y install openssh-server sysstat

And also recommended etckeeper to install:

sudo apt-get -y install etckeeper
[[ ! -d "/etc/.git" ]] && cd /etc && sudo etckeeper init

The best practice is to create a single user on whose behalf will be server management.

For example, add ssa user:

sudo adduser ssa --shell /bin/bash --no-create-home --gecos 'SmallServerAdmin'

_NOTE: You can use any name instead of ssa._

_ATTENTION: Remember user password. It is required for the Panel Configuration._

Add the user to the sudo group:

sudo usermod -a -G sudo ssa

And restart sudo:

sudo service sudo restart

If the connection via SSH is limited to narrow the list of users, add the created user in the list of allowed.

Open /etc/ssh/sshd_config:

sudo nano /etc/ssh/sshd_config

Add user name to the AllowUsers and save changes:

AllowUsers ssa

_NOTE: List of users separated by spaces. For example: user1 user2 ssa userN._

This is the minimum configuration that must be done.

If you have connection problems, try restarting the server.

Panel Configuration

General (default) panel settings contained in the ssh.config.php file. The parameters are stored in the global variable $config as an associative array.

In addition, each server can have its own settings, which are located in the /servers folder.

The panel has a modular design. Each module has its own set of parameters. For details see the README file of a specific module.

SSH

_NOTE: If you use automatic installation with HTAN, then change the settings of SSH is not need._

To operate the panel, you must configure the SSH connection settings.

By first opening the panel in a browser, you will be redirected to the servers management page where you can add and configure a new server. If it does not, open or create the /servers/default.php file and specify the connection settings to the server.

// ssh server address
$config['ssh_host'] = '192.168.56.139';
// connection port (default: 22)
$config['ssh_port'] = '22';
// username (for example: ssa)
$config['ssh_user'] = 'username';
// user password
$config['ssh_password'] = 'password';
// required password for sudo user
$config['ssh_required_password'] = TRUE;

If the connection settings are incorrect, the panel can not connect to the server.

All commands are executed via sudo. If the value ssh_required_password is TRUE, for each command will use the user password (ssh_password).

If you are the only one user on the server, you can disable the password. For this set the FALSE to the ssh_required_password.

And also allow the execution of commands without entering a password:

sudo bash -c 'echo "ssa ALL=(ALL) NOPASSWD:ALL" | (EDITOR="tee -a" visudo)'

_NOTE: At the same time, the password will still be used to connect to the server._

_WARNING: If the server has other users, then for security reasons it is not recommended to disable the requirement of password._

Modules

In the parameter modules you can specify a list of required modules, separated by commas. These modules will be displayed in the menu in this order.

$config['modules'] = 'users,svn,sites,files,monitoring,services,ssh';

The absence of modules in the list does not restrict access to them.

Modules in the menu will be displayed in the order in which they are specified in the list.

In the file ssa.config.php specified the default list of modules that will be used for all servers, who have not their own list of modules.

Widgets

Some modules have widgets that can be displayed on the main page.

Widget settings are located in the root element - widgets, the child elements that contain settings for specific module: $config['widgets']['moduleName'].

Each widget must contain the required parameter Enabled, which indicates the need to display the widget panel on the main page.

In the optional parameter Format, you can specify a custom format to display widget on the page.

In addition, the widget may comprise any other individual parameters. For more information, see the README file of a specific module.

$config['widgets']['monitoring'] = ['Enabled' => TRUE];
$config['widgets']['services'] = [
  'Enabled' => TRUE, 
  'Format' => '<div>%s</div>', 
  'NgInit' => 'SearchString = \'nginx,apache\'; Load()' 
];
$config['widgets']['sites'] = [
  'Enabled' => TRUE, 
  'Format' => '<div>%s</div>'
];

See Also

Screenshots  
  • ssa6.jpg
  • ssa7.jpg
  • ssa5.jpg
  • ssa4.jpg
  • ssa2.jpg
  • ssa3.jpg
  • ssa1.jpg
  Files folder image Files  
File Role Description
Files folder image.nuget (1 file)
Files folder imageConfigExamples (2 files)
Files folder imageFrontEndScripts (8 files, 7 directories)
Files folder imageSmallServerAdmin (17 files, 14 directories)
Accessible without login Plain text file CHANGELOG.md Data Change History
Accessible without login Plain text file CODEOFCONDUCT.md Data Contributor Covenant Code of Conduct
Accessible without login Plain text file CONTRIBUTING.md Data Contributing to SmallServerAdmin
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. ReadMe
Accessible without login Plain text file SmallServerAdmin.sln Data Visual Studio solution file
Accessible without login Plain text file THIRDPARTYNOTICE.md Lic. Third-Party License
Accessible without login Plain text file WebEssentials-Settings.json Data WebEssentials config for Visual Studio 2013

 Version Control Unique User Downloads Download Rankings  
 98%
Total:418
This week:3
All time:6,083
This week:377Up
User Ratings User Comments (1)
 All time
Utility:95%StarStarStarStarStar
Consistency:85%StarStarStarStarStar
Documentation:80%StarStarStarStarStar
Examples:85%StarStarStarStarStar
Tests:-
Videos:-
Overall:72%StarStarStarStar
Rank:203