Complete Guide to Installing Roundcube on your Ubuntu 18.04 (for VPS and Dedicated Server)

Complete Guide to Installing Roundcube on your Ubuntu 18.04 (for VPS and Dedicated Server)

Roundcube is one of the best email clients around to use for your own purpose. It supports both SMTP and IMAP, which further increases its popularity. You can use Roundcube email client to send and receive emails and read them using a web browser.

If you’re using Ubuntu version 18.04, you can use Roundcube too. It is available in 70 languages and is SSL-enabled. There’s also support for HTML emails and address book. To speed things up, it comes with a built-in caching software.

Another excellent feature is thread support. You can use it to track email responses and see the conversation just like chat messages. In this article, learn how to get started with Roundcube on your Ubuntu 18.04 sever.

Before you get started, you need to ensure two things. First, make sure that an SMTP server like Postfix is installed along with an IMAP server like Dovecot. Also, make sure you’re using compatible or latest versions of PHP, Apache, and MySQL. Once confirmed, follow the steps mentioned below.

Step-by-Step Process

To start using Roundcube on your Ubuntu server, here are the steps to follow:

Download Roundcube

The first step is to download the latest version of Roundcube email client. Use the terminal and the ‘wget’ command. Before that, you’d have to CD to /tmp directory. Here are the commands to execute:

$ cd /tmp

$ wget

Uncompress the Downloaded File

The Roundcube file you downloaded is in tar.gz format. You need to uncompress it before you can start using it. Here’s the command to execute:

$ tar -xvzf roundcubemail-1.3.6-complete.tar.gz

It will unzip the files that are inside the ‘roundcubemail-1.3.6’ in the tmp folder.

Move the Files to the Root

The next step is to make the files and content inside the ‘roundcubemail-1.3.6’ accessible from the web browser, move them to the root folder. Here’s the command to execute:

$ sudo mv roundcubemail-1.3.6 /var/www/html/roundcube

Specify the directory name that’s convinent to you. In the above command, the files will be accessible at the directory.

Set the Directory and File Permission

Roundcube would need the permissions to access the files via the Apache web server. Execute this command to set the correct directory and file permissions:

$ sudo chown -R www-data:www-data /var/www/html/roundcube/

$ sudo chmod 775 /var/www/html/roundcube/temp/ /var/www/html/roundcube/logs/

Allow the Required Modules

There are certain modules required for Roundcube email client to work as intended. FIrst, module to download is the Apache Mod Rewrite which you can get by running this command:

$ sudo a2enmod rewrite

Next, you’d have to install the PHP modules using this command:

$ sudo apt-get install php-xml php-mbstring php-intl php-zip php-pear php-mysql

Once completed, restart Apache using this command: $ sudo apache2ctl restart

Create the Database

Roundcube will use the MySQL database to store information and retrieve them when required. Therefore, you’d have to allocate database resources. Use the command below to create databases for Roundcube:

$ sudo mysql -u root -p

When prompted, enter the root password for MySQL server and then execute the following commands

mysql> CREATE DATABASE roundcube DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

mysql> GRANT ALL PRIVILEGES ON roundcube.* TO 'username'@'localhost' IDENTIFIED BY 'PASSWORD';



When executing the command replace “PASSWORD” with the code you want to set.

Now that you’ve created the database and user, it’s time to initiate the Roundcube database. Execute the command below for this purpose:

$ sudo mysql -u username -p roundcube < /var/www/roundcube/SQL/mysql.initial.sql

Complete the Installation Process

The last step is to finish the installation. To begin, viist this URL - $

You’ll land on a page that reads “Roundcube Webmail Installer”. Click on the “Next” button to proceed. In the next page that loads, open the Database Setup settings and enter the following details:

Database name



Now scroll to SMTP settings and check the box that reads ‘Use the current IMAP username and password for SMTP authentication’. You can enable the plugins or leave them as they are.

Then, towards the bottom of the page, you’d have to click on ‘CREATE CONFIG’. You’ll see a page where you’d have to click ‘Continue’.

Final Testing

You’ve actually completed all the steps. Lastly, you can conduct a final test to ensure everything is working as intended. In the next screen after clicking on ‘Continue’, enter the username and password and test the services as required. If everything works fine, you can remove the downloaded files by executing this command:

$ sudo rm -rf /var/www/roundcube/installer/

Now, visit this URL -

Login with the details and explore Roundcube.

So that’s how you install Roundcube email client on Ubuntu 18.04 server. For more details or assistance, get in touch with the hosting provider.
First release
Last update
0.00 star(s) 0 ratings

More resources from kumkumsharma