How to Install Roundcube on Ubuntu 16.04


Roundcube is a web based email client which can be used to access mails from any mail server like Dovecot and Postfix. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.

Perquisites: LAMP Server , Mail Server

Note: – If you want to see the Installation of LAMP Server, click on below Link:

How to Install Apache ,Mysql ,PHP ( LAMP ) Server on Ubuntu 16.04

Note: – If you want to see the Installation & Configuration of Mail Server, click on below Link:

How to Install Mail Server on Ubuntu 16.04(Part 1) ( Dovecot – Postfix – Roundcube )

Note: – Make sure to install the required packages of PHP for Roundcube:

apt-get install php-curl php-xml php-gettext php-cgi php-mysql libcurl3 libcurl3-dev php-mbstring php7.0-mbstring php-gettext -y

Step 1. Login to your Linux machine.

Step 2. Update packages.

# apt-get update

Step 3. Login Into your Mysql Server.

# mysql -u root -p

Step 4. Create a New Database for RoundCube.

mysql> Create database roundcubedb;

Step 5. Create a new User for RoundCube & specify the new Password for that user.

mysql> create user roundcube;
mysql> GRANT ALL PRIVILEGES ON roundcubedb.* TO ’roundcube’@’localhost’ IDENTIFIED BY ’roundpasswd’;

Step 6. Exit from Mysql.

mysql> exit

Step 7. Move into your web server Document Root.

# cd /var/www/html

Step 8. Create a New Directory for Roundcube.

# mkdir roundcube

Step 9.  Download Roundcube Webmail by using below link.

# wget

Step 8. Extract roundcubemail-1.3-beta-complete.tar.gz.

# tar -xvzf roundcubemail-1.3-beta-complete.tar.gz

Step 9. Move to roundcubemail-1.3-beta directory.

# cd roundcubemail-1.3-beta

Step 10. Move the content of roundcubemail-1.3-beta to /var/www/html/roundcube.

# mv * /var/www/html/roundcube

Step 11. Make a copy of Roundcube .

# cp /var/www/html/roundcube/config/  /var/www/html/roundcube/config/

Step 12. Import database roundcubedb to mysql server by using below command.

# mysql -uroot -pmysqlpasswd roundcubedb < /var/www/html/roundcube/SQL/mysql.initial.sql

Step 13. Open file & Modify below lines.

# vim /var/www/html/roundcube/config/

$config[‘db_dsnw’] = ‘mysql://roundcube:[email protected]/roundcubedb’;
$config[‘default_host’] = ‘’;
$config[‘smtp_server’] = ‘tls://’;
$config[‘smtp_user’] = ‘%u’;
$config[‘smtp_pass’] = ‘%p’;

Step 14. Change the Permission of Roundcube Directory.

# chmod -R 755 /var/www/html/roundcube

Step 15. Restart your Webserver.

# service apache2 restart

Step 16. Search http://YourServerIp/roundcube through your browser.


Step 17. Specify the Username & Password of RoundCube in Login Box.After that click on Login button.



  • Kucay

    What is username & password to login roundcube? and how to configure roundcube to the previous post (mail server) ?

    • Mert Köseoğlu

      did you find it?

      • JeSTeR “JeSTeRH4CK3D” H4CK3D

        should be [email protected] and the password you set with GRANT SELECT ON servermail.* TO
        ‘mailuser’@’’ IDENTIFIED BY ‘mailserverpassword’;
        MD5(‘yourplainpassword’), <—THAT
        '[email protected]');

        • Adam Grzelec

          Nope, it’s the email address you want to use from virtual_users table

  • 22-7ths

    What about testing the install? “/installer” If brand new install, it isn’t as big a deal, but it really should be run once.. either way.
    `$config[‘enable_installer’] = true;`

    Which would tell you: “What about php extensions missing? Can I access the filesystem? Is database access okay?” etc..

    `$config[‘enable_installer’] = false;`
    when done.

  • Bratherkaka Brazza Simon