In this how-to guide, we will discuss how to set up RoundCube on Ubuntu 20.04. But first, let us discuss the prerequisites required for installing Roundcube on Ubuntu 20.04.


We need to install MariaDB, PHP, and Apache before we install and set up Roundcube. So let’s begin with MariaDB server installation:

Step 1 – Installing MariaDB

Roundcube requires a database to store all the data of the user. This data includes emails, contact lists, and preferences. MariaDB is a community-based open-source fork of MySQL which is available in the official repository of Ubuntu 20.04. It can help the user in creating the database to store all the data of Roundcube. To install MariaDB just use the apt command: Once the process is completed, execute the following command to start MariaDB. To enable the database server to start at every reboot of your system run the below-given command: Also, check the status to confirm whether the MariaDB service is active:

Step 2 – Create Database for Roundcube

Now that MariaDB has been installed, next, we will create a database and a user for Roundcube. To do that first log in to the MariaDB shell as the root user:

Now run the following command to create the database. You can replace ‘roundcubedb’ with whatever you want to name your database: Now, execute the following command to create a new user on the database: You can use whatever name and password you like instead of ‘dbuser’ and ‘testpassword’ respectively. Next, we will grant all the privileges to the new user: Now for the changes to take effect use the following command: Quit the shell by using one of the following commands:

Step 3 – Installing PHP for Roundcube

Roundcube also requires PHP and its extensions as a prerequisite. So now we will install PHP using the below given command:

Step 4 – Installing Apache Web Server

The last prerequisite we require before we start installing Roundcube is Apache. Apache is a web server that will help us create a virtual host. You can use any major web server but for this demonstration, we will use Apache: I already have the latest version installed on my system. Now use the “systemctl” command to start and enable APACHE to start at every reboot: Also, check the status of the Apache service:

Now open the configuration file with nano editor to create a virtual host directory: Copy the following text into the configuration file. Remember to replace “” with your domain name:

After saving and exiting from the file use the following command to enable the virtual host: As instructed by the a2ensite command now run the command given below to activate the new configuration:

Step 5 – Installing Roundcube on Ubuntu

Now that we are done with all the prerequisites required for Roundcube, we will go ahead and install the latest version of Roundcube. At the time of writing this post, the latest version of Roundcube is 1.4.11. You can visit the download section of Rouncube’s official website and get the link to the latest version of Roundcube from there. It is recommended to get the link to the complete, stable version: Now extract the downloaded tarball: And move it to webroot /var/www/roundcube by using the command: Make “www-data” the owner of the content directories so it can write data into these directories: Now initiate the database by executing the following command: Now, open the on any computer over the same network or you can use localhost/installer in the web browser of the same computer where Roundcube is installed, and configure Roundcube according to your needs.

Make sure all the recommended PHP extensions are installed. Then go to the bottom of the page, click NEXT. Here you can customize your Roundcube installation and click CREATE CONFIG at bottom of the page.

You will see a message on the page as “The config file was saved successfully into /var/www/roundcube/config directory of your Roundcube installation.” The webmail is ready to be used now. Next, remove the installer before advancing any further. Access the Roundcube login page at

You have successfully installed and configured Roundcube webmail on your Ubuntu 20.04.


Roundcube is a very sophisticated webmail client that makes it easier for users to manage their emails. It offers cutting-edge email management features such as Plug-ins API, template system for custom skins, import/export functions, canned response templates, and IDNA and SMTPUTF8 support. In this write-up, we focused on how to set up Roundcube on Ubuntu 20.04. If you like desktop clients like Outlook or Gmail then Roundcube is the right option for you.

How to Install Roundcube Webmail on Ubuntu 20 04   TecAdmin - 26How to Install Roundcube Webmail on Ubuntu 20 04   TecAdmin - 41How to Install Roundcube Webmail on Ubuntu 20 04   TecAdmin - 12How to Install Roundcube Webmail on Ubuntu 20 04   TecAdmin - 91How to Install Roundcube Webmail on Ubuntu 20 04   TecAdmin - 27How to Install Roundcube Webmail on Ubuntu 20 04   TecAdmin - 46