Bitnami LAPP Virtual Machine


Bitnami LAPP Stack provides a complete PHP, PostgreSQL and Apache development environment for Linux that can be launched in one click. It also bundles phpPgAdmin and more.

First steps with the Bitnami LAPP Stack

Welcome to your new Bitnami application! This guide includes some basic information you will need to get started with your application.

How to import a Bitnami Virtual Machine?

Check the following instructions to import a Bitnami Virtual Machine:

Importing a Bitnami Virtual Machine in VirtualBox
  • Select the "File -> Import Appliance" menu option and select the .ova file downloaded from the Bitnami website. Then click "Continue".
  • Once it is imported, click the "Start" button in the VirtualBox toolbar.

For a detailed walkthrough, check our Virtualbox tutorial.

Importing a Bitnami Virtual Machine in VMware
  • Select the "File -> Import" menu option and select the .ova file downloaded from the Bitnami website. Then click "Continue".
  • Once the import is complete, click "Finish" to start the virtual machine.

For a detailed walkthrough, check our VMware tutorial.

What credentials do I need?

You need two sets of credentials:

  • The application password. This will allow you to log in to the services of the Bitnami stack.

  • The server credentials, consisting of an SSH username and password. These credentials allow you to log in to your Virtual Machines server using an SSH client and execute commands on the server using the command line.

What is the administrator password?

Password: The administrator password to log in to your application is randomly generated during the first boot. Check the FAQ to learn how to retrieve it.

What SSH username should I use for secure shell access to my application?

SSH username: bitnami

How do I get my SSH key or password?

You can obtain the SSH password from the virtual machine console when it starts up. Click here for more information.

How to access your application?

Once you have imported your Bitnami Virtual Machine, the IP address for your application is displayed on the virtual machine's login screen. Access the application via your browser by entering this IP address.

Check these instructions about how to remotely access the Bitnami application.

How to start or stop the services?

Each Bitnami stack includes a control script that lets you easily stop, start and restart services. The script is located at /opt/bitnami/ Call it without any service name arguments to start all services:

$ sudo /opt/bitnami/ start

Or use it to restart a single service, such as Apache only, by passing the service name as argument:

$ sudo /opt/bitnami/ restart apache

Use this script to stop all services:

$ sudo /opt/bitnami/ stop

Restart the services by running the script without any arguments:

$ sudo /opt/bitnami/ restart

Obtain a list of available services and operations by running the script without any arguments:

$ sudo /opt/bitnami/

What are the default ports?

A port is an endpoint of communication in an operating system that identifies a specific process or a type of service. Bitnami stacks include several services or servers that require a port.

Remember that if you need to open some ports you can follow the instructions given in the FAQ to learn how to open the server ports for remote access.

Port 22 is the default port for SSH connections.

Bitnami opens some ports for the main servers. These are the ports opened by default: 80, 443.

How can I get started with LAPP?

Once the deployment finishes, you can access the welcome page from your browser: http://SERVER-IP/.

Regardless of how you access it, you should see a page similar to the examples below:

Lamp Page

To get started with Bitnami AMP stacks, we suggest the following steps:

Step 1. Deploy your PHP application.

The main directory to deploy your PHP application is /opt/bitnami/apache2/htdocs. You can copy your PHP application files to that directory and access the application via your browser. If you do not have a PHP application yet, we suggest deploying the PHP info example.

Do you have issues trying to connect to your server? Check our FAQ.

Step 2. Add a Bitnami application on top of the AMP stack.

You can install additional Bitnami applications on top of an AMP stack using module installers. You can download WordPress, Drupal, Magento, Moodle among other applications from the Bitnami website and extend the functionality of your server.

You can see more info in our step-by-step guide.

Step 3. Access phpMyAdmin.

phpMyAdmin is a PHP-based application intended to handle the administration of MySQL over the Web. Find more information on how to access phpMyAdmin.

How to find the PostgreSQL database credentials?

How to connect to the PostgreSQL database?

You can connect to the PostgreSQL database from the same computer where it is installed with the psql client tool.

$ psql -U postgres

You will be prompted to enter the *postgres* user password. This is the same as the [application password](/virtual-machine/faq#how-to-find-application-credentials).

How to connect to LAPP from a different machine?

For security reasons, the LAPP ports in this solution cannot be accessed over a public IP address. To connect to LAPP from a different machine, you must open port 80, 443 for remote access. Refer to the FAQ for more information on this.

IMPORTANT: Making this application's network ports public is a significant security risk. You are strongly advised to only allow access to those ports from trusted networks. If, for development purposes, you need to access from outside of a trusted network, please do not allow access to those ports via a public IP address. Instead, use a secure channel such as a VPN or an SSH tunnel. Follow these instructions to remotely connect safely and reliably.

How to access phpPgAdmin?

For security reasons, phpPgAdmin is accessible only when using as the hostname. To access it from a remote system, you must create an SSH tunnel that routes requests to the Apache Web server from This implies that you must be able to connect to your server over SSH in order to access these applications remotely.

IMPORTANT: Before following the steps below, ensure that your Apache and PostgreSQL servers are running.
NOTE: The steps below suggest using port 8888 for the SSH tunnel. If this port is already in use by another application on your local machine, replace it with any other port number greater than 1024 and modify the steps below accordingly. Similarly, if you have enabled Varnish, your stack's Apache Web server might be running on port 81. In this case, modify the steps below to use port 81 instead of port 80 for the tunnel endpoint.

Accessing phpPgAdmin on Windows

In order to access phpPgAdmin via SSH tunnel you need an SSH client. In the instructions below we have selected PuTTY, a free SSH client for Windows and UNIX platforms. The first step is having PuTTY configured. Please, check how to configure it in the section how to connect to the server through SSH using an SSH client on Windows.

Once you have your SSH client correctly configured and you tested that you can successfully access to your instance via SSH, you need to create an SSH tunnel in order to access phpPgAdmin. For doing so, follow these steps:

  • In the "Connection -> SSH -> Tunnels" section, add a new forwarded port by introducing the following values:

    • Source port: 8888
    • Destination: localhost:80

    This will create a secure tunnel by forwarding a port (the "destination port") on the remote server to a port (the "source port") on the local host ( or localhost).

  • Click the "Add" button to add the secure tunnel configuration to the session. (You'll see the added port in the list of "Forwarded ports").

    PuTTY configuration

  • In the "Session" section, save your changes by clicking the "Save" button.
  • Click the "Open" button to open an SSH session to the server. The SSH session will now include a secure SSH tunnel between the two specified ports.
  • Access the phpPgAdmin console through the secure SSH tunnel you created, by browsing to
  • Log in to phpPgAdmin by using the following credentials:

    • Username: postgres
    • Password: application password. (Refer to our FAQ to learn how to find your application credentials).

Here is an example of what you should see:


If you are unable to access phpPgAdmin, verify that the SSH tunnel was created by checking the PuTTY event log (accessible via the "Event Log" menu):

PuTTY configuration

Accessing phpPgAdmin on Linux and Mac OS X

To access the application using your Web browser, create an SSH tunnel, as described below.

  • Open a new terminal window on your local system (for example, using "Finder -> Applications -> Utilities -> Terminal" in Mac OS X or the Dash in Ubuntu).
  • Run the following command, remembering to replace SERVER-IP with the public IP address or hostname of your server. Enter your SSH password when prompted.

         $ ssh -N -L 8888: bitnami@SERVER-IP
NOTE: If successful, the above command will create an SSH tunnel but will not display any output on the server console.
  • Access the phpPgAdmin console through the secure SSH tunnel you created, by browsing to
  • Log in to phpPgAdmin by using the following credentials:

    • Username: postgres
    • Password: application password. (Refer to our FAQ to learn how to find your application credentials).

Here is an example of what you should see:


How to reset the MariaDB root password?

Please note that depending on the version you have installed, you may find the MariaDB files at /opt/bitnami/mysql

If you don't remember your MariaDB root password, you can follow the steps below to reset it to a new value:

  • Create a file in /home/bitnami/mysql-init with the content shown below (replace NEW_PASSWORD with the password you wish to use):

     UPDATE mysql.user SET Password=PASSWORD('NEW_PASSWORD') WHERE User='root';
  • Stop the MariaDB server:

     $ sudo /opt/bitnami/ stop mariadb
  • Start MariaDB with the following command:

     $ sudo /opt/bitnami/mariadb/bin/mysqld_safe --defaults-file=/opt/bitnami/mariadb/my.cnf --pid-file=/opt/bitnami/mariadb/data/ --init-file=/home/bitnami/mysql-init 2> /dev/null &
  • Restart the MariaDB server:

     $ sudo /opt/bitnami/ restart mariadb
  • Remove the init script

     $ rm /home/bitnami/mysql-init

How to change the MariaDB root password?

You can modify the MariaDB password using the following command at the shell prompt:

$ /opt/bitnami/mariadb/bin/mysqladmin -p -u root password NEW_PASSWORD

How can I run a command in the Bitnami LAPP Stack?

Log in to the server console as the bitnami user and run the command as usual. The required environment is automatically loaded for the bitnami user.

Which components are included in LAPP?

The Bitnami LAPP Stack ships the components listed below. If you want to know which specific version of each component is bundled in the stack you are downloading, check the README.txt file in the download page or in the /opt/bitnami directory. You can also find more information about each component using the links below.

Main components:

  • PHP scripting language
  • Apache Web server
  • PostgreSQL database server
  • phpPgAdmin web application management tool for PostgreSQL database

Frameworks for development (included in stacks with PHP 5.6 and lower):

  • Zend Framework
  • Symfony
  • CodeIgniter
  • CakePHP
  • Smarty
  • Laravel

Dependencies and additional components:

  • Varnish proxy cache server
  • ImageMagick tool
  • SQLite database
  • ModSecurity module
  • XDebug module
  • Xcache module
  • OAuth module
  • Memcache module
  • FastCGI module
  • APC module
  • GD library
  • OpenSSL library
  • CURL library
  • OpenLDAP library
  • PEAR and PECL package manager tools

How can I check the PHP configuration with phpinfo?

Some versions of the Bitnami LAPP Stack include a docs/ folder in the installation directory that contains some PHP examples. Among these is a phpinfo.php script that shows the current PHP configuration and is typically used to check that PHP was installed correctly. In order to be able to access it, follow these steps below:

  • Copy the phpinfo.php script from the installation directory to a publicly accessible location under the Web server document root.

     $ cp /opt/bitnami/docs/phpinfo.php /opt/bitnami/apache2/htdocs
  • Browse to http://SERVER-IP/phpinfo.php.

You should see something like the page below, which contains detailed information on your PHP deployment.


How to create a custom PHP application?

Many users run a Bitnami stack as a development environment for their own PHP projects (as opposed to running third-party applications such as Joomla! or WordPress). To deploy your PHP application in this environment, you have two options:

  • To make a single PHP application accessible at the root URL of the Web server (for example, http://localhost), simply copy the PHP files into the /opt/bitnami/apache2/htdocs folder. For an example, take a look at the phpinfo example.

  • To have several applications running, create the same structure used by Bitnami when installing Bitnami PHP applications. Recent versions of Bitnami stacks ship a demo application with this structure to help you get started. To use this, follow the steps below:

    • Copy the /opt/bitnami/docs/demo folder into the /opt/bitnami/apps directory.

      $ sudo cp -r /opt/bitnami/docs/demo /opt/bitnami/apps
    • Add the following line to the end of the /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf file:

      Include "/opt/bitnami/apps/demo/conf/httpd-prefix.conf"
    • Restart the Apache server using the command-line tool.

      $ sudo /opt/bitnami/ restart apache

    You should now be able to access the demo application at http://SERVER-IP/demo. You should see a "Hello world" message in your browser.

  • If your stack does not include a demo application, or if you prefer to create a custom PHP application from scratch, follow the steps below. These steps assume that your application will live in the /opt/bitnami/apps/myapp/ directory:

    • Run the following commands to create the directories:

      $ sudo mkdir /opt/bitnami/apps/myapp
      $ sudo mkdir /opt/bitnami/apps/myapp/htdocs/
      $ sudo mkdir /opt/bitnami/apps/myapp/conf
    • Create and edit the /opt/bitnami/apps/myapp/conf/httpd-prefix.conf file and add the line below to it:

      Alias /myapp/ "/opt/bitnami/apps/myapp/htdocs/"
      Alias /myapp "/opt/bitnami/apps/myapp/htdocs/"
      Include "/opt/bitnami/apps/myapp/conf/httpd-app.conf"
    • Create and edit the /opt/bitnami/apps/myapp/conf/httpd-app.conf file and add the content below to it. This is the main configuration file for your application, so modify it further depending on your application's requirements.

      <Directory /opt/bitnami/apps/myapp/htdocs/>
          Options +FollowSymLinks
          AllowOverride None
          <IfVersion < 2.3 >
          Order allow,deny
          Allow from all
          <IfVersion >= 2.3>
          Require all granted
      NOTE: If your application uses .htaccess files, you should change the AllowOverride None option to AllowOverride All. Find out how to move the .htaccess file content to the main server configuration file.
    • Once you have created the files and directories above, add the following line to the end of the main Apache configuration file at /opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf, as shown below:

      Include "/opt/bitnami/apps/myapp/conf/httpd-prefix.conf"
    • Restart the Apache server:

      $ sudo /opt/bitnami/ restart apache

      You should now be able to access the application at http://SERVER-IP/myapp.

How can I deploy my PHP application?

The main directory to deploy your PHP application is /opt/bitnami/apache2/htdocs. You can copy your PHP application files to that directory and access the application via your browser at http://SERVER-IP/.

How can I run a custom PHP script?

Add your PHP script to the /opt/bitnami/apache2/htdocs/ directory, then browse to it via the URL http://SERVER-IP/FILENAME.php, where FILENAME is the name of the PHP script.

For an example, refer to the section on using phpinfo.

NOTE: If your script file is named index.php, then you must access it using the URL http://SERVER-IP/index.php and not http://SERVER-IP. This is because the Apache server included in the AMP stack is configured to recognize both index.html and index.php files by default, but to give the included index.html file priority. To alter this behaviour, simply move the /opt/bitnami/apache2/htdocs/index.html file to a different location.

What are the "development" and "production" modes for applications?

Some applications can be configured in either "development" or "production" mode:

  • Production mode: File permissions and configuration settings are set with security and performance in mind. Installing certain plugins, themes and updates may require manual changes or installation of additional services like FTP.
TIP: This mode is recommended if the stack will be deployed on a public server.

Applications are configured using production mode for cloud servers by default.

If you install a module or stack and select production mode, these applications will request an FTP account in order to download their extensions. If you already have an FTP server on your machine, use this mode.

  • Development mode: File permissions and configuration settings are not optimal from a security standpoint but make it easy to install plugins, themes and updates for certain applications.
TIP: This mode is recommended for development purposes or for use on a private company network or intranet.

How to disable the cache in the server?

If you are developing on top of an AMP Stack or customizing any Bitnami Stack, your files (like JavaScript files) may be cached by the server and even you modify them your changes will not appear to be applied.

In order to disable the cache in the server and let the files be served each time, disable PageSpeed for Apache and OPCache, enabled by default in PHP.

To disable PageSpeed, comment out the following lines in your httpd.conf (/opt/bitnami/apache2/conf/httpd.conf)

#Include conf/pagespeed.conf

#Include conf/pagespeed_libraries.conf

To disable OPCache, change opcache.enable in your php.ini file and set it to 0 (/opt/bitnami/php/etc/php.ini)

How to create a full backup of LAPP?


The Bitnami LAPP Stack is self-contained and the simplest option for performing a backup is to copy or compress the Bitnami stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continuously.

Follow these steps:

  • Change to the directory in which you wish to save your backup:

      $ cd /your/directory
  • Stop all servers:

      $ sudo /opt/bitnami/ stop
  • Create a compressed file with the stack contents:

      $ sudo tar -pczvf application-backup.tar.gz /opt/bitnami
  • Restart all servers:

      $ sudo /opt/bitnami/ start

You should now download or transfer the application-backup.tar.gz file to a safe location.


Follow these steps:

  • Change to the directory containing your backup:

      $ cd /your/directory
  • Stop all servers:

      $ sudo /opt/bitnami/ stop
  • Move the current stack to a different location:

      $ sudo mv /opt/bitnami /tmp/bitnami-backup
  • Uncompress the backup file to the original directoryv

      $ sudo tar -pxzvf application-backup.tar.gz -C /
  • Start all servers:

      $ sudo /opt/bitnami/ start

If you want to create only a database backup, refer to these instructions for MySQL and PostgreSQL.


Bitnami Documentation