In this tutorial we will cover the steps needed to install the RoundCube webmail client on your CentOS 6.4, Debian or Ubuntu platform.


Install RoundCube on CentOS 6.4

We will use bash script for the RoundCube installation provided on the RoundCube official website.

Open new file and place the following lines inside:

The script assumes that the default Apache web root folder is /var/www/html. In case your default Apache web root folder is different the script should be edited with the correct value.

Install and configure RoundCube on Ubuntu:

The RoundCube webmail client requires a MySQL database where the information will be stored. During the installation the database name, database username and password should be specified so we will go ahead and create new empty database through SSH:

You will be prompted to fill in the MySQL root password. After that the command prompt will be switched to a MySQL one.

New MySQL database can be created with the following command:

After that create new MySQL username and assign it to the database:

You can set desired password in the first MySQL query.

When ready flush the MySQL privileges in order for the changes to take effect:

When ready you can exit the MySQL prompt:

After that download the RoundCube installation archive and extract its content inside the Apache web root folder (usually this is /var/www/):

When the content is extracted we will need to import the RoundCube default database information into the newly created empty database:

The RoundCube webmail client requires also a date.timezone PHP value set inside the php.ini file. With the following command we will set UTC as default PHP time zone and restart the Apache service in order for the changes to take effect:

We can continue the installation by accessing the RoundCube installation wizard through the browser:

where X.X.X.X is your server's IP address, i.e.

An easy way to find your server's IP address is to execute the following command:

After filling the MySQL credentials and configuring RoundCube in Step 2 you will be prompted to save two configuration files ( & which should be placed inside the /var/www/roundcube/config folder.

After completing the installation and the final tests please remove the whole installer/ folder from the document root of the webserver or make sure that enable_installer option in config/ is disabled.

Test the functionality of the service

Once installed the RoundCube webmail client can be accessed through the following URL:

You should be able to access the webmail interface using a valid email address which was already created on the server.