How to Install Latest Roundcube Webmail on CentOS 7

Roundcube is a free and open source, fully-featured web-based multilingual IMAP webmail software, with an application-like user interface that is fully functional and customizable, and uses latest web standards. It is built using PHP and offers full functionality you expect from a modern email client.

Step 2: Secure MariaDB Server and Create Roundecube Database

7. The default MariaDB installation is unsecure. You need to run the security script which comes with the binary package, to secure it. You will be asked to set a root password, remove anonymous users, disable root login remotely and remove test database.

# mysql_secure_installation

8. Now login to the MariaDB database, create a database for Roundecube and grant the user to appropriate permissions on the database (remember to set a strong/secure password in a production environment).

Step 3: Download Roundcube Package

10. In this step, download the latest stable version (1.3.7 at the time of this writing) of Roundcube from the download page or use wget command-line downloader to get it, extarct the TAR file, and upload the files into your web server document root.

13. Next, open the file /etc/php-fpm.d/www.conf to make a few changes to PHP-FPM web directive.

# vim /etc/php-fpm.d/www.conf

Change the user apache to nginx in the following variables.

user = nginx
group = nginx

Then comment out the line listen = 127.0.0.1:9000 and set the listen variable to listen on a unix socket set in the nginx server block file:

listen = /var/run/php-fpm/php-fpm.sock

Also set the permissions for unix socket, uncomment and change the lines to:

listen.owner = nginx
listen.group = nginx
listen.mode = 0660

Configure PHP-FPM

Once you are done, save the file and close it.

14. Then restart the Nginx and PHP-FPM services to apply the recent changes, as follows.

# systemctl restart nginx php-fpm

Step 5: Access Roundcube Web UI

15. Before you start the install wizard, to avoid any sessions errors, set the appropriate permissions on the directory /var/lib/php/session/. The default group owner is apache, change it to nginx as shown.

16. Now open a browser and use the address http://mail.example.com/installer (replace domain with the server name you set while creating a Nginx server block for roundcube) to access the web installer. If all PHP versions, extensions and php.ini/.htaccess settings are correct, you will see following screenshot, click on Next to go to the configurations page.

http://mail.example.com/installer
OR
http://IP-address/installer

Access Roundcube Webmail Installer

17. The configurations page allows you to setup your roundcube instance. We will only explain the important options for the scope of this guide.

Under the General Configuration, set a product_name for example Example.com Webmail.

Roundcube Product Name

Go to Database setup, enter the database host, name, user and password to connect to the MySQL server.

Roundcube Database Settings

Then scroll down to IMAP and SMTP settings and enter the IP address of your IMAP and SMTP server, if its same server on which you are running roundcube, leave it as “localhost” and also specify other necessary parameters.

You can specify other settings according to your needs, once you are done, click on Create Config.

18. You should new see a message saying ”The config file was saved successfully into /var/www/html/roundcubemail/config directory of your Roundcube installation.” Click on Continue.

Roundcube Configuration File Created

19. You can review your configuration from the Test config page as shown in the following screenshot.

Test Roundcube Configuration

20. Next, remove the whole installer folder (which contains files that may expose sensitive configuration data like server passwords and encryption keys to the public) from the roundcube root directory (or make sure that enable_installer option in config.inc.php is disabled).

# rm -rf /var/www/html/roundcubemail/installer

21. Finally, use the URL http://mail.example.com to access the roundcube login page. Enter your user name and password to view your mails.

Roundcube Webmail Login

Roundcube Webmail Access

Summary

Roundcube is a widely used, fully-featured web-based multilingual mail client. In this article, we showed how to install the latest stable version of Roundcube Webmail on a CentOS 7 with Nginx web server. If you have any questions, use the feedback form below to reach us.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

On my server Postfix (SMTP) and roundcube (IMAP) is install and running properly, but at certain instant of time ( say 1 in 50 attempts) when a user login to webmail (roundcube) then it show a error of “no input file” what could be the problem?