How To Install Roundcube Webmail

Article By: frank


The following tutorial will show you how to install and set-up the Roundcube webmail interface on a CentOS VPS.

What is Roundcube Webmail?

Roundcube Webmail is a web-based IMAP email client written in PHP. Its most prominent feature is the pervasive use of Ajax technology to present a more fluid and responsive user interface than the one of traditional webmail clients. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching, spell checking etc…

install roundcube Webmail on your BIP media VPS

As usual, before proceeding any further, SSH to your CentOS 6 VPS, start a screensession and make sure your system is fully up-to-date by running:

## screen -U -S roundcube-screen
## yum update

Roundcube requires PHP, a webserver and a database server. We are going to use the LAMP stack here, so, if LAMP is not already set-up on your system please search the learning center for tutorials on "How to install LAMP" (Linux Apache MySQL and PHP) on CentOS 6 with phpMyAdmin and APC cache how to install LAMP (Linux Apache MySQL and PHP) on CentOS 6.

Ok, next step is to set-up a database for Roundcube using the following commands:

## mysql -u root -p
mysql> GRANT ALL PRIVILEGES ON `roundcube` . * TO 'roundcube'@'localhost' IDENTIFIED BY 'mySecretPassword';
mysql> quit

make sure you change ‘mySecretPassword‘ with your own one.

Before downloading and installing it, let’s first create Roundcube’s Apache configuration file in /etc/httpd/conf.d/90-roundcube.conf by using an editor:

## vim  /etc/httpd/conf.d/90-roundcube.conf

and paste the following:

Alias /webmail /var/www/html/roundcube

    Options -Indexes
    AllowOverride All

    Order Deny,Allow
    Deny from All

    Order Deny,Allow
    Deny from All

    Order Deny,Allow
    Deny from All

Now, download and set-up the latest version to/var/www/html/roundcube using:
## curl -L "" > /tmp/roundcube-latest.tar.gz
## tar -zxf /tmp/roundcube-latest.tar.gz -C /var/www/html
## rm -f /tmp/roundcube-latest.tar.gz
## cd /var/www/html
## mv roundcubemail-* roundcube
## chown root: -R roundcube/
## chown apache: -R roundcube/temp/
## chown apache: -R roundcube/logs/

Next thing to do, is to set-up configuration file. But, before setting it up, let’s first create all the necessary database tables:
## mysql -u roundcube -p"mySecretPassword" roundcube < roundcube/SQL/mysql.initial.sql

again, make sure you use the correct MySQL user/password combination

with tables in place, proceed with copying the sample configuration file and editing

## cp roundcube/config/ roundcube/config/
## vim roundcube/config/
  $rcmail_config['default_host'] = '';
  $rcmail_config['default_host'] = 'localhost';

  $rcmail_config['smtp_server'] = '';
  $rcmail_config['smtp_server'] = 'localhost';

  $rcmail_config['smtp_user'] = '';
  $rcmail_config['smtp_user'] = '%u';

  $rcmail_config['smtp_pass'] = '';
  $rcmail_config['smtp_pass'] = '%p';

  $rcmail_config['quota_zero_as_unlimited'] = false;
  $rcmail_config['quota_zero_as_unlimited'] = true;

  $rcmail_config['preview_pane'] = false;
  $rcmail_config['preview_pane'] = true;

  $rcmail_config['read_when_deleted'] = true;
  $rcmail_config['read_when_deleted'] = false;

  $rcmail_config['check_all_folders'] = false;
  $rcmail_config['check_all_folders'] = true;

save and close the configuration file and proceed with setting up the database configuration file:
## cp roundcube/config/ roundcube/config/
## vim roundcube/config/
  $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
  $rcmail_config['db_dsnw'] = 'mysqli://roundcube:mySecretPassword@localhost/roundcube';

save and close the configuration file and remove the installer directory using:
## rm -rf roundcube/installer/

finally, restart Apache using:
## service httpd restart

and login to your webmail at

There are still other parts missing such as SSL encrypted connection, anti-spam service, digital signatures using opendkim, filter rules etc for a full-featured mail server. Simply search the Community Learning Center for more tutorials on these topics to show you how to set them up.

Of course, if you use Linux VPS Hosting packages, you don’t have to do any of this. Our admins will take care of it for you.

Tags: , , , , , , ,

Welcome to the healthcare-only HIPAA - GDPR compliant cloud. Exclusively hosted on a HPC environment!

Learn more or start today by choosing your secure HIPAA - GDPR compliant server's Operating System bellow and pick the package that's best for you.

BIPmd makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine, thousand or more.

Windows VPS options and add ons
Linux VPS options and add ons


Looking for a custom solution?

Our technicians can provide you with the best custom-made solutionss on the market, no matter whether you're a small business or large enterprise.

Get in touch

Leave a Reply