Skip to main content

Open Source Webmail for your mail server (in PHP) – Roundcube is very good about free software (Free as free speech), is the large choice of alternatives. But when several of them are mature enough to be used everyday, especially such as a Webmail….the choice is tough! Roundcube? Xuhek? Horde? SquirrelMail? hastymail? Mailr? AfterLogic? RainLoop? Atmail? or the promissing MailPile (Currently in Alpha) and so many others….

Each of them with their strengths and weaknesses…I do have some preferences like recent design style (Exit Xuhek, Horde, SquirrelMail, hastymail, Mailr,…), without taking too much resources or overkill features (exit Zimbra,…) and of course with recent updates (Exit Atmail, Claros, …) but stable (Exit Mailpile for now)….well still a lot of choice to choose from (Roundcube? AfterLogic Lite? RainLoop? and most probably others good alternatives I’m missing)

But most probably Roundcube is the most popular one of this Webmail set and shouldn’t go wrong about it. But the best will be to test at least the last 3 mentioned (Which I will in different article, but won’t go into the details of the features and comparison as I will need weeks to try them)

Roundcube is a browser based IMAP client (Webmail). It has all of what we will expect from a mail client, such as MIME support, address book, folder manipulation, message searching, spell checking and much more

Screenshow #01

As you may know, few days ago, Roundcube announced finally after 8 years their stableversion 1!!

So it’s time to test it out and write this tutorial!


Obviously you need to have your mail server working on top of your web server (Apache, Nginx, …). If it’s not the case, I suggest you to have a look to my previous tutorial on setting up a mail server.

You can download the latest version from sourceforge here or directly install it from the repo (Might not be the latest).

If you are installing the latest version from Sourceforge, you will need to:

1) Create a dedicated folder.

In root, type:

2) Download the latest version, extract the content inside the folder and change few permissions

3) Create a SQL database

The most common database is MySQL but others such as PostgreSQL and SQLite are also supported.

In my case, I’ll use MySQL with PhpMyAdmin to do so.

I’ll create a database called roundcube and a dedicated user call roundcube with all privileges on this database (And only this). If you don’t know how to do it, I suggest you to install phpmyadmin if not done yet. You will only need few clicks to do that.

4) Point with your Web Browser to the installer and follow the easy steps


Most probably you will want to modify only the Database configuration and the IMAP settings like the username domain ( in my case) and the SMTP settings (smtp_server with smtp_user/smtp_pass or simply tick the option “Use the current IMAP username and password for SMTP authentication”).

It will generate a config file

5) Copy/paste or download/upload the config file

If you have installed the Webmail on the same machine than IMAP server, you don’t need to indicate the username_domain

When done, click on Continue

You will probably have to initialize the database and you could test SMTP and IMAP config.

6) Disable and Remove installer

You should now have a working Roundcube and should be able to login using your username directly. (If installed in localhost with real user, you don’t need to add

Virtualhost configuration

Now you got your webmail working and you want to access it from rc.domain.tld or directly from mywebmail.tld, instead of using the IP/roundcube link, you will need to set up a virtualhost. And obviously you want to force HTTPS connection.

You will need to:

1) Create a A redirection in your DNS server/registrar

2) Have SSL certificate ready. If not you can read this tutorial.

3) Create your virtualhost as following:

In /etc/apache2/sites-enabled/, create a file called roundcube (In root):

and paste the following content:

Adapt the content (Servername, webmaster, SSL certificate and directory, …). Note that I’ve added 3 lines for PHP configuration to allow to send large attachment (10Mb)

When done, save the file (CTRL+X then Yes) and reload apache: (In root)

3 thoughts on “Open Source Webmail for your mail server (in PHP) – Roundcube

  1. I think Vteddy could be mentioned in this list. Is a new open source webmail client written in php. It has useful functionalities, for example you can link emails to business objects such as Invoice, Cases,Calendar, etc. You can find it at:

    1. Interesting one – I didn’t know

      I completely believe emails have became a very ineffective way to work (At least in my work). So I’ll be happy to give it a shot and write an article on it if worthy. (My queue list is quite long tho)

      1. This project thinks that email is still here nowadays, so they try to get them in flow in the business to avoid waste of time. I think that they appreciate if you’ll write and article about it.

Leave a Reply

Your email address will not be published. Required fields are marked *