↓ Twitter is updated more often, so read it! ↓

HOWTO Install Roundcube Webmail on Ubuntu Feisty

HOWTO Install Roundcube Webmail on Ubuntu Feisty

Last time I installed Roundcube Webmail, I did it on Dapper and had to fanagle it a bit. However, with my new VPS from colo4jax, I had Feisty installed and setting up Roundcube was fairly straightforward.

Roundcube is a very attractive, secure, AJAX-powered webmail application that is very streamlined and beautiful. I like it far more than Horde or Squirrelmail.

To the task, ladies and gentlemen.

First, make sure that you’ve got apache2, mysql, and your favorite SMTP and IMAP servers installed. I’m using Postfix and Courier, respectively.

Second, install Roundcube with

sudo apt-get install roundcube-webmail

This will place Roundcube in /usr/share/roundcube-webmail. We need a way to get to it, though.

Third, you need to edit the Roundcube configs before we make it live. Edit /usr/share/roundcube-webmail/db.inc.php.dist and /usr/share/roundcube-webmail/main.inc.php.dist and save them without the .dist. Take very, very good care to have the database DSN correct.

Fourth, execute the SQL script found in the SQL/ for your database. I’m using MySQL, so I did

mysql -u mailusername -p roundcube < mysql.initial.sql

You might also need to create the databse if you haven't done that already or aren't using an existing database.

Fifth, you need to make it live. You can either throw a symlink to it from somewhere, or do I like do and give it its own subdomain. Place this in /etc/apache2/sites-available/webmail:

<VirtualHost *:80>
        ServerAdmin webmaster@example.com #change these!
        ServerName      webmail.example.com
        ServerAlias     mail.example.com
        DocumentRoot /var/www/roundcube
        <Directory /var/www/roundcube>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all
                Order allow,deny
                allow from all
        </Directory>
        ServerSignature Off
</VirtualHost>

Go to http://webmail.example.com and you should be presented with the login screen. Good luck!

7 Comments

  1. Tim:

    I tried these instructions on a typical ubuntu server and I found I had to make the DocumentRoot and Directory “/usr/share/roundcube-webmail”. Also, I had to add the PHP Directive:

    AddType application/x-httpd-php .php

    Otherwise, these were excellent instructions. Thanks.

    Tim

  2. Colin Dean:

    Yes, you will need to change the DocumentRoot and Directory like so if you do not link /var/www/roundcube to /usr/share/roundcube-webmail. I chose to do this in the event that Ubuntu falls behind with Roundcube releases and I choose to install Roundcube myself into /var/www/roundcube after changing it to a folder.

    Out-of-the-box, the AddType directive should already be in your master configuration, /etc/apache/apache2.conf. However, if you chosen to disable PHP globally and only enable it per-directory/per-virtual/per-whatever, then you will need to insert that directive line.

    Thanks for the feedback!

  3. AnRkey:

    Thanks for this. It was straight forward and worked first time. I created a symbolic link like this

    sudo ln -s /usr/share/roundcube-webmail/ /var/www/webmail

    instead of the vhost entry for apache2

    I have not had any problems yet…

    AnRkey

  4. JP:

    You will also need to install the webmail file by running this command:

    sudo a2ensite webmail

    otherwise it will do nothing

  5. lucky:

    good doc.

    installed nice and easy
    seems to link up with the websites nice and easy.. but have no clue how to add to a control panel or create users for each domain..
    any ideas?

  6. Colin Dean:

    I administer my user accounts and domains manually at the command line. I never have found a good admin panel which fits my database structure.

  7. The Flow of Consciousness » Blog Archive » 2010 in review: the year of travel:

    [...] gave me a giant traffic burst I did not replicate this past year. My 2007 article on installing Roundcube Webmail on Ubuntu Feisty continued to be the #1 article on my blog (as it has been since its writing), followed by my 2008 [...]

Leave a comment