Frequently Asked Questions for Virtual Machines

How to enable the SSH server?

The SSH server is disabled by default in Bitnami virtual machines. However, some applications (like GitLab) require SSH access to import code repositories.

To enable the SSH server, execute the commands below at the server console:

IMPORTANT: Before enabling the SSH server, change the default password for security.

Debian

$ sudo rm -f /etc/ssh/sshd_not_to_be_run
$ sudo systemctl enable ssh
$ sudo systemctl start ssh

Ubuntu

$ sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf
$ sudo start ssh

How to disable the SSH server?

The SSH server is disabled by default in the Bitnami virtual machines. If you have enabled it as described in How to enable SSH, you can disable it following the opposite steps:

Debian

$ sudo systemctl stop ssh
$ sudo systemctl disable ssh

Ubuntu

$ sudo stop ssh
$ sudo mv /etc/init/ssh.conf /etc/init/ssh.conf.back

How to connect to the server through SSH?

IMPORTANT: Before following the steps below, ensure that you have enabled the SSH server (disabled by default) and that your application server is running.

Obtaining your SSH credentials for your client

You can find the default server credentials when the virtual machine console is started up, as shown below:

Server credentials

NOTE: It is strongly recommended to change the default password for security. To change the default login password for the virtual machine console, follow these instructions.

In case you want to configure the SSH server to support key-based authentication, follow the instructions given in the How to configure the SSH server to support key-based authentication? section.

How to configure the SSH server to support key-based authentication?

IMPORTANT: Before following the steps below, ensure that you have enabled the SSH server (disabled by default) and that your application server is running.

To configure the SSH server to support key-based authentication, follow these steps:

  • Log in to the server console as the bitnami user.

  • Create a key pair, consisting of a public and private key, as shown below. Set a long passphrase when prompted.

     $ ssh-keygen
     Generating public/private rsa key pair.
     Enter file in which to save the key (/home/bitnami/.ssh/id_rsa):
     Enter passphrase (empty for no passphrase):
     Enter same passphrase again:
     Your identification has been saved in /home/bitnami/.ssh/id_rsa.
     Your public key has been saved in /home/bitnami/.ssh/id_rsa.pub.
     The key fingerprint is:
     XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX bitnami@linux
    

This command should create two files named id_rsa and id_rsa.pub in the /home/bitnami/.ssh directory.

  • Copy the private key file named id_rsa to a secure location. Do not share this private key file.

  • Transfer the contents of the public key file to the /home/bitnami/.ssh/authorized_keys file:

     $ cd /home/bitnami/.ssh
     $ cat id_rsa.pub >> /home/bitnami/.ssh/authorized_keys
    
  • Edit the /etc/ssh/sshd_config and uncomment (or add if not already present) the following lines:

     RSAAuthentication yes
     PubkeyAuthentication yes
    
  • In the same file, disable basic password authentication:

     ChallengeResponseAuthentication no
     PasswordAuthentication no
     UsePAM no
    
  • Restart the SSH server for the new configuration to take effect:

     $ sudo /etc/init.d/ssh force-reload
    

You can now use the private key file to connect to the virtual machine using SSH.

Connecting with an SSH client

When connecting with an SSH client, you must have the server's IP address and password for the bitnami user account. If you chose to configure key-based authentication, you must have the SSH private key for the bitnami user account in .ppk format (for Windows) or in .pem format (for Linux and Mac OS X).

Depending on your platform, follow the instructions below:

Connecting with an SSH client on Windows

In order to access your server 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. To access the server via SSH tunnel using PuTTY on a specific port using an SSH tunnel, you need to have it configured in order to allow connections to your server.

  • Step 1: Obtain PuTTY

    • Download the PuTTY ZIP archive from its website.
    • Extract the contents to a folder on your desktop.
    • Double-click the putty.exe file to bring up the PuTTY configuration window.
  • Step 2: Configure PuTTY

    • In the PuTTY configuration window, enter the host name or IP address of your virtual machine into the "Host Name (or IP address)" field, as well as into the "Saved Sessions" field. (Refer to the FAQ to know how to find the virtual machine's IP address). Then, click "Save" to save the new session so you can reuse it later.

    PuTTY configuration

    • Obtain your SSH credentials in order to allow the authentication against the server. Refer to the FAQ to learn how to obtain your SSH credentials for your client.
    • In the "Connection -> Data" section, enter the username bitnami into the "Auto-login username" field, under the "Login details" section.

      PuTTY configuration

      Optional: In case you have configured the SSH server to support key-based authentication follow the instructions below.

      • In the "Connection -> SSH -> Auth" section, browse to the private key file (.ppk).

        PuTTY configuration

    • In the "Session" section, click on the "Save" button to save the current configuration.
    • Select the session you want to start (in case that you have saved more than one session) and click the "Open" button to open an SSH session to the server.

      PuTTY configuration

PuTTY will first ask you to confirm the server's host key and add it to the cache. Go ahead and click "Yes" to this request (learn more).

PuTTY connection

You should now be logged in to your server. Here is an example of what you'll see:

PuTTY connection

Connecting with an SSH client on Linux and Mac OS X

Linux and Mac OS X come bundled with SSH clients by default. In order to log in to your server, follow the steps 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).
  • Connect to the server using the following command. Remember to replace SERVER-IP with the IP address of your virtual machine. Refer to the FAQ to know how to find the virtual machine's IP address.

     $ ssh bitnami@SERVER-IP
    

    You should now be logged in to your server. Here is an example of what you'll see:

    PuTTY connection

In case you have configured the SSH server to support key-based authentication follow the steps below:

  • Set the permissions for your private key file (*.pem) to 600 using a command like the one below. Refer to the FAQ to learn how to obtain your SSH credentials.

    $ chmod 600 KEYFILE
    
  • Connect to the server using the following command:

    $ ssh -i KEYFILE bitnami@SERVER-IP
    

    Remember to replace KEYFILE in the previous commands with the path to your private key file (.pem), and SERVER-IP with the IP address or hostname of your virtual machine. Refer to the FAQ to know how to find the virtual machine's IP address.

  • Your SSH client might ask you to confirm the server's host key and add it to the cache before connecting. Accept this request by typing or selecting "Yes" (learn more).

How to access a server using an SSH tunnel?

Bitnami strongly discourages you from opening server ports apart from those defined by default. In case you need to access a server on a specific port remotely, Bitnami recommends creating an SSH tunnel instead of opening the port in the server firewall.

Depending on your operating system, follow these instructions to create an SSH tunnel and ensure secure access to the application.

IMPORTANT: Before following the steps below, ensure that you have enabled the SSH server (disabled by default) and that your application server is running.

Accessing a server using an SSH tunnel on Windows

In order to access your server 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.

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. For doing so, follow these steps:

  • In the "Connection -> SSH -> Tunnels" section, 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 (127.0.0.1 or localhost). An example of configuring an SSH tunnel between remote port 80 and local port 8888 is displayed below.

    PuTTY safe tunneling

  • 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"). An example of configuring an SSH tunnel between remote port 80 and local port 8888 is displayed below.

    PuTTY safe tunneling

  • 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.

While the tunnel is active, you should be able to access the application through the secure SSH tunnel you created, by browsing to http://127.0.0.1:SOURCE-PORT/ or http://localhost:SOURCE-PORT/. Remember to replace SOURCE-PORT with the source port number specified.

Accessing a server using an SSH tunnel on Linux and Mac OS X

To access the server on a specific port using an SSH tunnel, you need to have the following information:

  • Server's IP address
  • Username and password (if you want to connect the server using the SSH username and password).
  • Server username and corresponding SSH private key in .pem format for Linux and Mac OS X (if you have enabled the key-based authentication).

Learn more about how to obtain your SSH credentials for your client.

Once you have the information above, follow these instructions to access the server using an SSH tunnel:

  • 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).
  • You have two options to configure the SSH tunnel: connect to the server using a private key (recommended) or connect to the server using a SSH password. Follow the instructions below per each option:

    • Option 1: Connect to the server without keyfile
      • Run the following command. Remember to replace SOURCE-PORT with the source port, DESTINATION-PORT with the destination port, USERNAME (bitnami by default), and SERVER-IP with the IP address or hostname of your virtual machine. Refer to the FAQ to know where is the virtual machine's IP address. Enter your SSH password when prompted.

         $ ssh -N -L SOURCE-PORT:127.0.0.1:DESTINATION-PORT bitnami@SERVER-IP
        
    • Option 2: Connect to the server using key-based authentication
      • Make sure that you have your SSH credentials in hand.
      • Run the following command to configure the SSH tunnel. Remember to replace SOURCE-PORT with the source port, DESTINATION-PORT with the destination port, KEYFILE with the path to your private key, and SERVER-IP with the IP address or hostname of your virtual machine. Refer to the FAQ to know how to find the virtual machine's IP address.

         $ ssh -N -L SOURCE-PORT:127.0.0.1:DESTINATION-PORT -i KEYFILE bitnami@SERVER-IP
        
NOTE: If successful, the above commands will create an SSH tunnel but will not display any output on the server console.

While the tunnel is active, you should be able to access the application through the secure SSH tunnel you created, by browsing to http://127.0.0.1:SOURCE-PORT/ or http://localhost:SOURCE-PORT/. Remember to replace SOURCE-PORT with the source port number specified.

What is the directory structure?

The installation process will create several sub-directories under the /opt/bitnami directory:

  • Servers and related tools: apache2/, mysql/, postgresql/, apache-tomcat/, etc.
  • Languages: php/, python/, ruby/, tcl/, etc.
  • Application files: apps/phpMyAdmin/, apps/drupal/, apps/joomla/, apps/redmine/, etc.
  • Common libraries: common/
  • Licenses of the components included in the stack: licenses/

Application files are stored in the /opt/bitnami/apps/APPNAME/htdocs directory. The configuration file for the Apache Web server is stored in the /opt/bitnami/apps/APPNAME/conf/ directory.

What is a Bitnami image?

A Bitnami image includes everything you need to run your Bitnami-packaged application of choice. The installation and configuration of all of the software included in the stack is completely automated, making it easy for everyone, including those who are not very technical, to get them up and running.

All Bitnami images are completely self-contained and run independently of the rest of the software or libraries installed on your system. This means that you don't have to worry about installing any other software on your system to make the new application work. They also won't interfere with any software already installed on the system, so everything will continue to work normally.

How to obtain root privileges?

Execute any command as the root user by prefixing it with the sudo command. For example, to check server status, use the command below and enter the password for the bitnami user when prompted:

$ sudo /opt/bitnami/ctlscript.sh status

To directly log in using the root user account, use this command:

$ sudo su

To set a new password for the root user account, use these commands:

$ sudo su
$ passwd

How to find application credentials?

The default username for the application is user and the password is randomly generated (in older versions it was typically bitnami). You can obtain these credentials from the server console, above the login prompt, as shown below:

Application credentials

You can also obtain the application username from the application page in our documentation.

If you started a server (for example, MongoDB or similar) that isn't a Web application server, you can use the default administrator user to log in to the database (for example, root). You can find more information for each specific server in our documentation.

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/ctlscript.sh. Call it without any service name arguments to start all services:

$ sudo /opt/bitnami/ctlscript.sh start

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

$ sudo /opt/bitnami/ctlscript.sh restart apache

Use this script to stop all services:

$ sudo /opt/bitnami/ctlscript.sh stop

Restart the services by running the script without any arguments:

$ sudo /opt/bitnami/ctlscript.sh restart

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

$ sudo /opt/bitnami/ctlscript.sh

How to change the login password for the virtual machine?

The default login password for the virtual machine console is displayed when it starts up, as shown below:

Server credentials

You will be automatically prompted to change this when you log in the first time. To change it later, execute the command below at the console:

$ passwd

How to remotely access the Bitnami application?

Access the Bitnami application by browsing to the virtual machine's IP address. This address is typically assigned to it by a DHCP server in your network. The IP address is displayed on screen at the end of the boot process, as shown below:

Server configuration

To see the current IP address, execute the following command at the server console after logging in:

$ sudo ifconfig

Check server IP address

If no IP address is assigned, consider the various options below:

  • Option 1: Try reloading the IP address by executing the command below.

     $ sudo /etc/init.d/networking force-reload
    
  • Option 2: Use the built-in hypervisor DHCP server.

    If there is no DHCP server available or the DHCP server is not configured to give IP addresses to unknown hosts, is recommended to use the built-in hypervisor DHCP server. To do so, follow the instructions below:

    • Stop the virtual machine.
    • Update the network adapter to use "NAT" instead of "Bridged" mode.
    • Restart the virtual machine.
    NOTE: This solution produces only an internal IP address for the virtual machine, so the Bitnami application will only be accessible from the hypervisor host.
  • Option 3: Configure the network manually and assign a static IP address to the virtual machine.

    For example, if your local network uses IP addresses of the form 192.168.1.X and you know that the IP address 192.168.1.234 is unassigned, manually assign this to the virtual machine by executing the command below at the virtual machine console:

     $ sudo ifconfig eth0 192.168.1.234 netmask 255.255.255.0 up 
    

With this configuration, the Bitnami application should be accessible from any host on the same network at the IP address 192.168.1.234. You can also persist the static IP address across reboots by modifying the network interface configuration and manually assigning the static IP address to it.

How to configure the application's IP address or hostname?

By default, Bitnami applications update their internal IP address or hostname at boot time. However, it may be necessary to change this manually if the virtual machine IP address changes.

To do this, execute the command below, replacing APPNAME with the directory holding the application and IP-ADDRESS with the new IP address or hostname:

$ sudo /opt/bitnami/apps/APPNAME/bnconfig --machine_hostname IP-ADDRESS

How to configure a static IP address?

To configure a static IP address for the Bitnami virtual machine:

  • Log in to the server console.
  • Obtain the network interface name using the command below. Typically, the interface name is of the form enXXXX.

      $ sudo ifconfig
    
  • Create a configuration file for the network interface by copying an existing configuration file and placing it in the /etc/systemd/network directory. In this example, assume that the new configuration file is named 25-wired.network:

      $ cd /etc/systemd/network
      $ sudo cp 99-dhcp.network 25-wired.network
    
  • Edit the new configuration file and update it to look like the configuration below. Replace the INTERFACE-NAME placeholder with the actual name of the network interface and update the example IP address, gateway and DNS server with values that reflect your local network

      [Match]
      Name=INTERFACE-NAME
    
      [Network]
      Address=10.1.10.9/24
      Gateway=10.1.10.1
      DNS=10.1.10.1
    
  • Save your changes and restart the virtual machine for the changes to take effect.

How to open the server ports for remote access?

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.

By default, the Bitnami virtual machines firewall is configured to allow access in any ports required by the application and SSH (usually ports 80, 443 and 22).

To open a different port:

  • Log in to the server console.
  • Execute the following command, replacing the PORT placeholder with the number of the port to be opened:

     $ sudo ufw allow PORT
    

More information about modifying the firewall configuration is available on the Debian Wiki.

How to close the server ports and deny remote access?

By default, the Bitnami virtual machines firewall is configured to allow access in any ports required by the application and SSH (usually ports 80, 443 and 22).

To close an open port:

  • Log in to the server console.
  • Execute the following command, replacing the PORT placeholder with the number of the port to be closed:

     $ sudo ufw deny PORT
    

More information about modifying the firewall configuration is available on the Debian Wiki.

How to change the keyboard layout?

Use the dpkg-reconfigure tool to change the keyboard layout, with the command below:

$ sudo dpkg-reconfigure keyboard-configuration

How to enable desktop access?

To allow desktop access for the bitnami user, follow these steps:

Debian

  • Install the gnome-core package:

     $ sudo apt-get update
     $ sudo apt-get install gnome-core
    
  • Reboot the machine.
  • You should now be able to log in to the desktop as bitnami user.

Ubuntu

  • Install the ubuntu-desktop package:

     $ sudo apt-get update
     $ sudo apt-get install ubuntu-desktop
    
  • Create a new file named /usr/share/lightdm/lightdm.conf.d/60-bitnami.conf and add the following lines as shown below:

     [SeatDefaults]
     default-user=bitnami
     greeter-show-manual-login=true
    

    You can create the file by executing the following command:

     $ sudo sh -c 'echo "[SeatDefaults]\ndefault-user=bitnami\ngreeter-show-manual-login=true" > /usr/share/lightdm/lightdm.conf.d/50-bitnami.conf'
    
  • Restart the virtual machine.
  • You should now be able to log in to the desktop as bitnami user.

How to upload files to the server with SFTP?

NOTE: Bitnami applications can be found in /opt/bitnami/apps.
NOTE: The steps in this section assume that the virtual machine's SSH server is enabled and running. Read instructions for enabling the SSH server.

The first step is to ensure that you have the server's IP address and password for the bitnami user account. If you chose to configure key-based authentication, you must have the SSH private key for the bitnami user account in .ppk format (for Windows) or in .pem format (for Linux and Mac OS X).

Once you have confirmed that you have the IP address and correct SSH credentials for your server, follow the instructions below depending on the platform you wish to use.

Although you can use any SFTP/SCP client to transfer files to your server, this guide documents FileZilla (Windows, Linux and Mac OS X), WinSCP (Windows) and Cyberduck (Mac OS X).

Using an SSH Key

Once you have your server's SSH key, choose your preferred application and follow the steps below to connect to the server using SFTP.

FileZilla
IMPORTANT: To use FileZilla, your server private key should be in PPK format.

Follow these steps:

  • Download and install FileZilla.
  • Launch FileZilla and use the "Edit -> Settings" command to bring up FileZilla's configuration settings.
  • Within the "Connection -> SFTP" section, use the "Add keyfile" command to select the private key file for the server. FileZilla will use this private key to log in to the server.

    FileZilla configuration

  • Use the "File -> Site Manager -> New Site" command to bring up the FileZilla Site Manager, where you can set up a connection to your server.
  • Enter your server host name and specify bitnami as the user name.
  • Select "SFTP" as the protocol and "Ask for password" as the logon type.

    FileZilla configuration

  • Use the "Connect" button to connect to the server and begin an SFTP session. You might need to accept the server key, by clicking "Yes" or "OK" to proceed.

You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

If you have problems accessing your server, get extra information by use the "Edit -> Settings -> Debug" menu to activate FileZilla's debug log.

FileZilla debug log

WinSCP
IMPORTANT: To use WinSCP, your server private key should be in PPK format.

Follow these steps:

  • Download and install WinSCP.
  • Launch WinSCP and in the "Session" panel, select "SCP" as the file protocol.
  • Enter your server host name and specify bitnami as the user name.

    WinSCP configuration

  • Click the "Advanced…" button and within the "SSH -> Authentication -> Authentication parameters" section, select the private key file for the server. WinSCP will use this private key to log in to the server.

    WinSCP configuration

  • From the "Session" panel, use the "Login" button to connect to the server and begin an SCP session.

You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

If you need to upload files to a location where the bitnami user doesn't have write permissions, you have two options:

  • Once you have configured WinSCP as described above, click the "Advanced…" button and within the "Environment -> Shell" panel, select sudo su - as your shell. This will allow you to upload files using the administrator account.

    WinSCP configuration

  • Upload the files to the /home/bitnami directory as usual. Then, connect via SSH and move the files to the desired location with the sudo command, as shown below:

     $ sudo mv /home/bitnami/uploaded-file /path/to/desired/location/
    
Cyberduck
IMPORTANT: To use Cyberduck, your server private key should be in PEM format.

Follow these steps:

  • Select the "Open Connection" command and specify "SFTP" as the connection protocol.

    Cyberduck configuration

  • In the connection details panel, under the "More Options" section, enable the "Use Public Key Authentication" option and specify the path to the private key file for the server.

    Cyberduck configuration

  • Use the "Connect" button to connect to the server and begin an SFTP session.

You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

Using a Password

Once you have your server's SSH credentials, choose your preferred application and follow the steps below to connect to the server using SFTP.

FileZilla

Follow these steps:

  • Download and install FileZilla.
  • Launch FileZilla and use the "File -> Site Manager -> New Site" command to bring up the FileZilla Site Manager, where you can set up a connection to your server.
  • Enter your server host name.
  • Select "SFTP" as the protocol and "Ask for password" as the logon type. Use bitnami as the server username and the password generated during the server deployment process.

    FileZilla configuration

  • Use the "Connect" button to connect to the server and begin an SFTP session. You might need to accept the server key, by clicking "Yes" or "OK" to proceed.

You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

If you have problems accessing your server, get extra information by use the "Edit -> Settings -> Debug" menu to activate FileZilla's debug log.

FileZilla debug log

WinSCP

Follow these steps:

  • Download and install WinSCP.
  • Launch WinSCP and in the "Session" panel, select "SCP" as the file protocol.
  • Enter your server host name and set bitnami as the server username. Enter the corresponding password as well.

    WinSCP configuration

  • From the "Session" panel, use the "Login" button to connect to the server and begin an SCP session.

You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

Cyberduck

Follow these steps:

  • Select the "Open Connection" command and specify "SFTP" as the connection protocol.

    Cyberduck configuration

  • In the connection details panel, enter the server IP address, bitnami as the username, and the password generated during the deployment process.

    Cyberduck configuration

  • Use the "Connect" button to connect to the server and begin an SFTP session.

You should now be logged into the /home/bitnami directory on the server. You can now transfer files by dragging and dropping them from the local server window to the remote server window.

How to configure your application to use a third-party SMTP service for outgoing email?

Bitnami applications can be configured to use a third-party SMTP service for outgoing email. Examples of such third-party SMTP services are SendGrid and Mandrill. Instructions for using both these are provided below.

SendGrid

SendGrid's SMTP service can be accessed using your SendGrid account credentials. These credentials can be obtained by logging in to the SendGrid website and visiting the "Account Details" page.

SendGrid configuration

To configure your application to send email through SendGrid's SMTP service, use the settings below. Replace USERNAME with your SendGrid account username and PASSWORD with your SendGrid account password.

  • SMTP host: smtp.sendgrid.net
  • SMTP port: 25 or 587 for unencrypted/TLS email, 465 for SSL-encrypted email
  • SMTP username: USERNAME
  • SMTP password: PASSWORD

Here's an example of configuring WordPress to use SendGrid:

WordPress with SendGrid

More information is available in the SendGrid documentation.

Mandrill

Mandrill's SMTP service requires an API key for access. To obtain this key, log in to the Mandrill website, navigate to the "SMTP & API" section and create an API key. Note the SMTP server name, username and API key, as these serve as your credentials for accessing the Mandrill SMTP server.

Mandrill configuration

To configure your application to send email through Mandrill's SMTP service, use the settings below. Replace USERNAME with your SMTP username and API-KEY with the generated API key.

  • SMTP host: smtp.mandrillapp.com
  • SMTP port: 25, 587 or 2525 for unencrypted/TLS email, 465 for SSL-encrypted email
  • SMTP username: USERNAME
  • SMTP password: API-KEY

Here's an example of configuring WordPress to use Mandrill:

WordPress with Mandrill

More information is available in the Mandrill documentation.

Similar steps can be followed for other third-party SMTP services as well. Consult your service provider's documentation to obtain details on authentication credentials and available ports.

How to reset the system password?

IMPORTANT: The steps in this section require console access to the virtual machine.

If you forget the bitnami user's password for a Bitnami virtual machine, follow the steps below to reset it:

  • Configure the GRUB boot loader to boot directly to the Bash shell in read-write mode as the root user. To do this:
    • Boot the virtual machine and immediately press the Esc key to load the boot menu.
    • Type e to edit the boot commands.
    • Navigate down the menu until you are on the line starting with kernel.
    • Type e to edit that line.
    • Change

        (...) ro quiet splash
      

      to

        (...) rw init=/bin/bash
      
    • Save the change with the Enter key.
    • Boot the system with the b key.
    NOTE: The changes made are temporary and will be reset after a reboot.
  • Once the system boots to a Bash shell, run the command below and enter a new password when prompted:

    $ passwd bitnami
    
  • Reboot the virtual machine.

You should now have access to the bitnami user account with the new password.

How to increase the available memory for the virtual machine?

Increase the RAM for a virtual machine through the "Settings" panel. Here's what it looks like for VirtualBox:

Machine configuration

Recent versions of Bitnami virtual machines include the PAE kernel, which allows you to increase assigned RAM memory to more than 4 GB. The optimal setting will also depend on the host machine's capabilities and the number of virtual machines running simultaneously.

TIP: It's good practice to share the RAM between the host machine and the virtual machine. For example, if the host machine has 2 GB RAM and you are only running one virtual machine, increase the RAM of the virtual machine to 1 GB. It is not advisable to increase it to more than this because this may result in the host machine running out of physical memory and switching to swap memory, which significantly decreases overall performance.

How to add a new virtual disk?

To create a new virtual disk and increase the disk space available on your virtual machine, follow these steps:

  • In the machine's "Settings", add a new SCSI disk drive and configure the disk size.

  • Start the virtual machine and log in.

  • At the console, run the following command to format the new disk:

     $ sudo mkfs.ext4 /dev/sdb
    
  • Create a new directory to mount the disk:

     $ sudo mkdir /mnt/disk
    
  • Mount the new disk:

     $ echo "/dev/sdb /mnt/disk ext4 defaults 0 0" | sudo tee -a /etc/fstab
     $ sudo mount -a
    

Check if the new disk is available with the command below:

$ df -h

If you have a directory containing a large amount of data, you can now move it to the new hard drive and create a symbolic link. Here's an example of moving the Joomla data directory:

$ sudo mv /opt/bitnami/apps/joomla/data /mnt/disk/data
$ ln -s /mnt/disk/data /opt/bitnami/apps/joomla/data

How to extend an existing virtual disk?

NOTE: Before proceeding with the steps below, back up your existing virtual disk by making a copy of it.

To extend an existing virtual disk and increase the disk space available on your virtual machine, follow the steps below:

  • If you are using VirtualBox, use the VBoxManage tool on the host system (bundled with VirtualBox) to clone the existing VMDK disk to VDI format. Replace the DISK placeholder with the full path to your virtual disk.

    In VirtualBox, you can obtain the location of the virtual disk by right-clicking the virtual machine and checking the value of the "Settings -> Storage -> Select your disk -> Location" property.

      $ VBoxManage clonehd DISK.vmdk cloned.vdi --format vdi
    

    Resize the cloned disk to your desired size (here, 36 GB or 36864 MB). Note that approximately 2 GB of the disk will be utilized by Linux system volumes like /dev and /run/shm.

      $ VBoxManage modifyhd cloned.vdi --resize 36864
      $ VBoxManage clonehd cloned.vdi expanded.vmdk --format vmdk
    

    Resizing and cloning operations

  • If you are using VMware, use the vmware-vdiskmanager tool (bundled with VMware Workstation and VMware Fusion) to resize the existing VMDK disk to your desired size (here, 36 GB). Replace the DISK placeholder with the full path to your virtual disk.

      $ vmware-vdiskmanager -x 36GB DISK.vmdk
    
NOTE: The remaining steps in this section assume that you are using VirtualBox, but you can perform similar steps in VMware Workstation and other VMware products.
  • In the VirtualBox user interface, select the virtual machine and then use the "Settings -> Storage" menu to remove the current VMDK disk and replace it with the expanded one.

    Replacing disk image

  • Download the GParted LiveCD ISO image.
  • In the VirtualBox user interface, select the virtual machine and then use the "Settings -> Storage -> Add Optical Drive" menu item to select and attach the GParted LiveCD ISO image file.

    Attaching ISO

  • Save the changes and boot the virtual machine.
  • Once the GParted LiveCD starts, it will automatically launch the GParted partition editor, which looks like this:

    Partition editor

    Select the /dev/sda1 partition, click the "Resize/Move" button and enter the new size of the disk (in this example, 36864) in the "New size (MiB)" field. Click the "Resize/Move" button so that the /dev/sda1 partition fully utilizes the unallocated space.

    Partition resize

  • In the main GParted window, click the "Apply" button to apply and save the changes to the partition table.

    Partition table save

  • Shut down the virtual machine by clicking the "Exit" link on the GParted LiveCD desktop once the changes are applied.
  • In the VirtualBox user interface, select the virtual machine and then use the "Settings -> Storage" menu to detach the GParted LiveCD from the virtual machine.
  • Save the changes and boot the virtual machine.

Your virtual disk should have been resized. Check this by running the command below at the console and verifying the size of the /dev/sda1 partition:

    $ df -h

Verification

How to install and configure Webmin?

Installing Webmin

Webmin is a web-based interface for system administration. Using any modern web browser, it enables management of user accounts, Apache, DNS, file sharing and much more.

The steps below walk you through the process of installing and configuring Webmin on a Bitnami virtual machine or server:

  • Log in at the machine console.
  • Download the latest stable version of Webmin.
  • Install dependencies and uncompress the tarball:

      $ sudo apt-get install perl5 libnet-ssleay-perl
      $ tar -xzvf webmin-*
      $ cd webmin-*
    
  • Run the installer and follow the installation steps. During the installation, you will be prompted for user credentials.

      $ sudo sh setup.sh
    
  • Open the default Webmin port of 10000 in the server firewall, as described in the FAQ.

Once Webmin is installed, access it with the credentials set during the installation process by browsing to http://SERVER-IP:10000.

Configuring Webmin

To configure Webmin to manage the Bitnami servers:

  • Create the configuration file /etc/webmin/mysql/config for MySQL and fill it with the content below:

     start_cmd=sudo /opt/bitnami/ctlscript.sh start mysql >/dev/null 2>&1
     stop_cmd=sudo /opt/bitnami/ctlscript.sh stop mysql >/dev/null 2>&1
     mysql=/opt/bitnami/mysql/bin/mysql
     mysqladmin=/opt/bitnami/mysql/bin/mysqladmin
     mysqldump=/opt/bitnami/mysql/bin/mysqldump
     mysqlimport=/opt/bitnami/mysql/bin/mysqlimport
     my_cnf=/opt/bitnami/mysql/my.cnf
     mysqlshow=/opt/bitnami/mysql/bin/mysqlshow
     mysql_libs=/opt/bitnami/mysql/lib
     mysql_data=/opt/bitnami/mysql/data
     access=*: *
     style=0
     date_subs=0
     max_text=1000
     perpage=25
     nodbi=0
     max_dbs=50
     nopwd=0
     add_mode=1
     passwd_mode=0
     blob_mode=0
    
  • Similarly, create the configuration file /etc/webmin/apache/config for Apache and fill it with the content below:

     start_cmd=sudo /opt/bitnami/ctlscript.sh start apache >/dev/null 2>&1
     stop_cmd=sudo /opt/bitnami/ctlscript.sh stop apache >/dev/null 2>&1
     httpd_dir=/opt/bitnami/apache2
     httpd_conf=/opt/bitnami/apache2/conf/httpd.conf
     apachectl_path=/opt/bitnami/apache2/bin/apachectl
     apply_cmd=/opt/bitnami/apache2/bin/apachectl graceful
     defines_file=/opt/bitnami/apache2/bin/envvars
     link_dir=/opt/bitnami/apache2/conf/sites-enabled
     mime_types=/opt/bitnami/apache2/conf/mime.types
     access_conf=/opt/bitnami/apache2/conf/access.conf
     virt_file=/opt/bitnami/apache2/conf/sites-available
     srm_conf=/opt/bitnami/apache2/conf/srm.conf
     httpd_path=/opt/bitnami/apache2/bin/httpd
     test_manual=0
     show_list=0
     auto_mods=1
      test_apachectl=1
     max_servers=100
     show_order=0
     test_always=0
     show_names=0
     test_config=1
    
  • Similarly, create the configuration file /etc/webmin/postgresql/config for PostgreSQL (if you have it installed) and fill it with the content below:

     start_cmd=sudo /opt/bitnami/ctlscript.sh start postgresql >/dev/null 2>&1
     stop_cmd=sudo /opt/bitnami/ctlscript.sh stop postgresql >/dev/null 2>&1
     psql=/opt/bitnami/postgresql/bin/psql
     dump_cmd=/opt/bitnami/postgresql/bin/pg_dump
     rstr_cmd=/opt/bitnami/postgresql/bin/pg_restore
     pid_file=/opt/bitnami/postgresql/data/postmaster.pid
     hba_conf=/opt/bitnami/postgresql/data/pg_hba.conf
     simple_sched=0
     sameunix=1
     date_subs=0
     max_text=1000
     perpage=25
     plib=
     nodbi=1
     max_dbs=50
     pass=
     access=*: *
     webmin_subs=0
     style=0
     access_own=0
     basedb=template1
     login=postgres
     add_mode=1
     blob_mode=0
    
  • Browse to the Webmin application, log in and click the "Refresh Modules" button. You should now see the "Apache Webserver", "PostgreSQL Database Server" and "MySQL Database Server" listed in the "Servers" tab.

Webmin

How to install VirtualBox Guest Additions on Bitnami virtual machines?

To install VirtualBox Guest Additions, follow these steps:

  • Stop the virtual machine.

  • Edit the virtual machine settings and from the "System" tab, add a new CD-ROM device to the machine.

  • Restart the virtual machine.

  • Check the current kernel version:

     $ uname -a
    
  • Install some needed dependencies as shown below. Remember to replace the VERSION placeholder with the kernel version from the previous command. packages with the proper kernel_version shown by the previous command:

     $ sudo apt-get -y install dkms build-essential linux-headers-VERSION
    
  • Restart the virtual machine:

     $ sudo reboot
    
  • From the virtual machine menu, select the "Devices -> CD/DVD Devices -> Choose a virtual CD/DVD disk file" option. Select the VBoxGuestAdditions.iso file. This action simulates inserting a CD-ROM that includes the tools.

    The VBoxGuestAdditions.iso file is usually located in the /usr/share/virtualbox/ directory on Linux, in the C:\Program Files\Oracle\VirtualBox directory on Windows and the Contents/MacOS directory of the VirtualBox package on Mac OS X.

  • Mount the CD-ROM and install the VirtualBox Guest Additions:

     $ sudo mkdir /mnt/cdrom
     $ sudo mount /dev/cdrom /mnt/cdrom
     $ cd /mnt/cdrom
     $ sudo sh ./VBoxLinuxAdditions.run --nox11
    

    You can safely ignore the error below if it appears during the installation process:

     Installing the Window System drivers ...fail!
     (Could not find the X.Org or XFree86 Window System.) 
    
  • Once the process is complete, check that the output resembles that shown below. If it does, the VirtualBox Guest Additions have been successfully installed.

     Verifying archive integrity... All good.
     Uncompressing VirtualBox 4.1.22 Guest Additions for Linux.........
     VirtualBox Guest Additions installer
     Removing existing VirtualBox DKMS kernel modules ...done.
     Removing existing VirtualBox non-DKMS kernel modules ...done.
     Building the VirtualBox Guest Additions kernel modules ...done.
     Doing non-kernel setup of the Guest Additions ...done.
    

How to use Bitnami stacks with headless VirtualBox?

NOTE: The steps below require the VMDK version of the Bitnami virtual machine.

Bitnami stacks can also be used with VirtualBox running in headless mode. To do this, follow the steps below on your VirtualBox host:

  • Convert the VMDK file for the Bitnami stack into a VirtualBox Disk Image (VDI) file:

     $ VBoxManage clonehd --format VDI bitnami-APP-VERSION.vmdk myserver.vdi
    
  • Create and register a new virtual machine.

     $ VBoxManage createvm --name "My Server" --ostype "Ubuntu_64" --register
    

    It is important to choose the correct operating system type when doing this. For a complete list of available operating system types, use the command below:

     $ VBoxManage list ostypes
    
  • Add a storage device and attach the VDI file created earlier to it.

     $ VBoxManage storagectl "My Server" --name "SATA Controller" --add sata --controller IntelAHCI
     $ VBoxManage storageattach "My Server" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium myserver.vdi
    
  • Define other characteristics of the virtual machine, such as the boot device, available RAM and network interfaces. The commands below are illustrative only and will need to be modified for your specific hardware devices. For more information on how to configure your virtual machine with VBoxManage, please refer to the VirtualBox manual.

     $ VBoxManage modifyvm "My Server" --ioapic on 
     $ VBoxManage modifyvm "My Server" --boot1 disk --boot3 none --boot4 none 
     $ VBoxManage modifyvm "My Server" --memory 512 --vram 64 
     $ VBoxManage modifyvm "My Server" --nic1  bridged --bridgeadapter1 "11b/g Wireless Adapter"
    
  • Start the virtual machine in headless mode:

     $ VBoxHeadless --startvm "My Server"
    

The virtual machine will be accessible using RDP. You can use any RDP viewer to connect and work with the virtual machine. For more information on available RDP viewers for your host platform and how to connect, refer to the VirtualBox manual.

TIP: When connecting to your headless VirtualBox machine with an RDP client, remember to use the IP address of the host system and not the VirtualBox machine.

Does Bitnami collect any data from deployed Bitnami stacks?

Yes. Bitnami cloud images and virtual machines include a small agent that starts on boot and collects a few pieces of information about the system. For users of Bitnami Virtual Machine Images, Cloud Templates, and Container Images we may also collect information from downloaded, pulled or deployed images or instances, such as the instance type, IP address and operating system version or the Bitnami account used to launch the image in order to improve our product offerings.

We encourage you to leave this tracking on, but if you would like to turn it off, you can comment out or delete the following line in the /etc/crontab file:

X * * * * bitnami cd /opt/bitnami/stats && ./agent.bin --run -D

(where X is a random number for each instance generated at the boot time)

Our complete privacy policy is available online. If you have any questions, please feel free to contact us at hello@bitnami.com.

What does the SSH warning 'REMOTE HOST IDENTIFICATION HAS CHANGED' mean?

This warning is normal when trying to connect to the same IP address but a different machine - for instance, when you assign the same static IP address to another server. You can fix the problem by removing the IP address that you are trying to connect to from your ~/.ssh/known_hosts file.

If you use PuTTY, the SSH key mismatch warning looks like the image below:

SSH warning

In this case, click "Yes" if you know the reason for the key mismatch (IP address reassigned to another server, machine replaced, and so on).

How to improve server performance?

Consider the following tips to improve the performance of your server.

virtualMachine

Bitnami Documentation