How to Install Roundcube on CentOS 7


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Roundcube on CentOS 7

Roundcube is a free and open-source webmail client that provides a modern user interface for accessing emails on a mail server. It supports IMAP and SMTP protocols and is written in PHP, making it easily customizable and extensible. This guide will walk you through the installation process of Roundcube on CentOS 7.


  • A CentOS 7 server with root access
  • Apache or Nginx web server
  • PHP with required extensions (including PHP's IMAP extension)
  • A working mail server with IMAP and SMTP support

Step 1: Update System Packages

Before we begin, let's make sure the server's package repositories are up to date:

# yum update 

Step 2: Install Required Dependencies

We need to install some required packages and extensions for Roundcube. Run the following command:

# yum install -y httpd mariadb-server php php-gd php-xml php-mbstring php-intl php-mysqlnd php-json 

Start the Apache web server and MariaDB database server:

# systemctl start httpd # systemctl start mariadb 

Enable them to start on boot:

# systemctl enable httpd # systemctl enable mariadb 

Step 3: Configure MariaDB

Run the following command to secure your MariaDB installation:

# mysql_secure_installation 

Answer the prompts and set a secure password for the root user.

Create a new database and user for Roundcube:

# mysql -u root -p MariaDB> CREATE DATABASE roundcubemail; MariaDB> GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost' IDENTIFIED BY 'Your_Password'; MariaDB> FLUSH PRIVILEGES; MariaDB> EXIT; 

Step 4: Download and Extract Roundcube

Download the latest stable version of Roundcube from the official website or using the following command:

# wget https://github.com/roundcube/roundcubemail/releases/download/1.4.11/roundcubemail-1.4.11-complete.tar.gz 

Extract the downloaded archive:

# tar xvf roundcubemail-1.4.11-complete.tar.gz 

Move the extracted files to the web server's document root:

# mv roundcubemail-1.4.11 /var/www/html/roundcube 

Step 5: Configure Roundcube

Rename the Roundcube configuration file:

# cd /var/www/html/roundcube # cp config/config.inc.php.sample config/config.inc.php 

Edit the configuration file:

# nano config/config.inc.php 

Update the following settings accordingly:

$config['db_dsnw'] = 'mysql://roundcube:Your_Password@localhost/roundcubemail'; $config['default_host'] = 'ssl://your_mail_server'; $config['smtp_server'] = 'tls://your_mail_server'; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p'; 

Save and close the file.

Step 6: Set File Permissions

Set the appropriate file permissions for Roundcube:

# chown -R apache:apache /var/www/html/roundcube 

Step 7: Configure Apache

Create a new Apache configuration file for Roundcube:

# nano /etc/httpd/conf.d/roundcube.conf 

Add the following content:

   ServerName your_domain_name   Redirect permanent / https://your_domain_name/      ServerName your_domain_name   DocumentRoot /var/www/html/roundcube    SSLEngine on   SSLCertificateFile /path/to/ssl_certificate   SSLCertificateKeyFile /path/to/ssl_certificate_key   SSLCertificateChainFile /path/to/ssl_certificate_chain         Options -Indexes +FollowSymLinks     AllowOverride All     Require all granted       ErrorLog /var/log/httpd/roundcube-error.log   CustomLog /var/log/httpd/roundcube-access.log combined  

Save and close the file.

Restart the Apache web server:

# systemctl restart httpd 

Step 8: Access Roundcube Webmail

You can now access Roundcube webmail by visiting the URL https://your_domain_name/roundcube in your web browser. Log in using your email credentials and start using Roundcube to manage your emails.

Congratulations! You have successfully installed Roundcube on CentOS 7.

Refer A Friend
Get $25

Installing Roundcube
CentOS 7
Roundcube installation
CentOS 7 installation
Roundcube on CentOS 7
CentOS 7 Roundcube setup
Roundcube email client installation
CentOS 7 email client setup
Roundcube webmail installation
CentOS 7 webmail setup

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.