PhpVirtualBox is an open source web interface written in PHP that allows users to easily manage their VirtualBox virtual machines. It allows to create, start and stop virtual machines via a web browser.

In this tutorial, we will help you install PhpVirtualBox on a system running Ubuntu 11.04 (Natty Narwhal) with VirtualBox 4.1 installed.


1. Download first the latest version of PhpvirtualBox from here (

2. You have to install Apache2 & PHP5 on Ubuntu 11.04, you can install them with these commands:

sudo apt-get install apache2 php5 libapache2-mod-php5
/etc/init.d/apache2 restart

2. Create now a new folder called "public_html" in your home directory using this command from the Terminal (Ctrl+Alt+T):

mkdir public_html

3. Install now this package from the Terminal (for VirtualBox 4.1):

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1-73009.vbox-extpack

4. Load now the "userdir" module in Apache2 using this command:

sudo a2enmod userdir

Restart now Apache2 with this command:

sudo /etc/init.d/apache2 restart

5. To be able to use PHP pages properly in the "public_html" directory, edit the userdir.conf file using this command:

sudo gedit /etc/apache2/mods-available/userdir.conf

Then add # in front of this line:

AllowOverride FileInfo AuthConfig Limit Indexes

It should look like this:

#AllowOverride FileInfo AuthConfig Limit Indexes

Add just below it this line:

AllowOverride All

Save your file and close it.

6. To enable the execution of PHP pages, edit "php5.conf" using this command:

sudo gedit /etc/apache2/mods-available/php5.conf

And add # to these five lines:

#<IfModule mod_php5.c>
#<Directory /home/*/public_html>
#php_admin_value engine Off

7. Restart now Apache2 so as your changes take effect:

sudo /etc/init.d/apache2 restart

Installing PhpvirtualBox

1. Unzip now the downloaded archive file of PhpvirtualBox into the "public-html" directory using your default archive manager.

2. Using the terminal cd to the "public_html" folder and run this command to rename the PhpvirtualBox folder:

mv phpvirtualbox-4.1-1b phpvirtualbox

Then access it with this command:

cd phpvirtualbox

2. Rename now "config.php-exemple" to "config.php" using this command:

mv config.php-example config.php

3. Edit now this file with this command:

gedit config.php

And replace "vbox" and "pass" with your system username and password:

var $username = 'vbox';
 var $password = 'pass';

Save the file and close it.

Running vboxwebsrv in the Terminal

Using the terminal, run this command:

/usr/lib/virtualbox/vboxwebsrv --background

The command must return the following:

$ /usr/lib/virtualbox/vboxwebsrv --background
Oracle VM VirtualBox web service version 4.1.0
(C) 2005-2011 Oracle Corporation
All rights reserved.
VirtualBox web service 4.1.0 r73009 linux.x86 (Jul 19 2011 10:48:51) release log
00:00:00.001 main     Log opened 2011-08-08T14:29:24.996968000Z
00:00:00.001 main     OS Product: Linux
00:00:00.001 main     OS Release: 2.6.38-8-generic
00:00:00.001 main     OS Version: #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011
00:00:00.001 main     OS Service Pack: #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011
00:00:00.001 main     Executable: /usr/lib/virtualbox/vboxwebssrv
00:00:00.001 main     Process ID: 2702
00:00:00.001 main     Package type: LINUX_32BITS_UBUNTU_11_04

Test PhpvirtualBox Using Your Web Browser

Use one of these links to test PhpvirtualBox using your web browser:


Replace user with your own username.

If you receive errors while running PhpvirtualBox, submit your issue here.