How To Install phpVirtualBox On Linux

phpVirtualBox is a web-based front-end to VirtualBox that enables you to control your VirtualBox environment.An open source, AJAX execution of the VirtualBox user interface written in PHP. As a cutting edge web interface, it enables you to access and control remote VirtualBox cases. phpVirtualBox is intended to enable users to oversee VirtualBox in a headless environment – copy the VirtualBox GUI through its web interface.


Install Apache and PHP

$ sudo apt-get install apache2 php5 php5-mysql libapache2-mod-php5 php-soap

Start Apache service

# /etc/init.d/httpd start
# systemctl start apache2

Now download the latest phpVirtualBox for its official website.

$ sudo wget https://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-5.0-5.zip
$ sudo unzip phpvirtualbox-5.0-5.zip
$ sudo mv phpvirtualbox-5.0-5 /var/www/html/phpvirtualbox
$ sudo chmod 777 /var/www/html/phpvirtualbox

Its provides a service called vboxwebsrv which allow phpVirtualBox to connect to it.

Create a user and add to vboxuser group

$ sudo useradd virtual
$ sudo passwd virtual
$ sudo usermod -a -G vboxuser virtual

Edit or create configuration file and add the above user in it.

$ sudo nano /etc/default/virtualbox

Configure phpVirtualBox by editing config.php file.

$ sudo cp /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php
$ sudo vim /var/www/html/phpvirtualbox/config.php
var $username = 'virtual';
var $password = '[email protected]';

Start virtual box web service.

$ sudo systemctl start vboxweb-service
$ sudo /etc/init.d/vboxweb-service start

Enable on boot.

$ sudo enable start vboxweb-service
$ sudo chkconfig vboxweb-service on

Restart Apache.

$ sudo systemctl restart apache2
$ sudo /etc/init.d/apache2 restart
$ sudo systemctl restart httpd
$ sudo /etc/init.d/httpd restart

Now open internet browser and access your phpVirtualBox web console which will provide you GUI desktop environment.


Enter your name and password:

Username: admin
Password: admin


You will get virtualbox interface. Now you can Manage and administrate your virtual servers.



Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author


Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment