How to connect RoundCube to a Calendar

Background

RoundCube is excellent Webmail but doesn’t have a calender – something people used to Outlook may require.

Fortunately the makers of RoundCube, namely Kolab, have an excellent Calendar plugin for their webmail.

Just one problem – it doesn’t come with instructions and it’s rather technical to install.

Fortunately by the Magic of Google and some blood, sweat, and tears, we were able to get it working. To follow these instructions you need to be a fairly confident sysadmin that knows how to navigate a file system and edit configuration files. How to turn on PHP error logging. Where to find those log files.

Most of the instructions were taken from anther outdated article here, modified to bring it up to date with 2021. Also we’re using Ubuntu not CentOS for this guide, although doing in on CentOS should be fairly similar.

If you’re not technical enough, you could just purchase the plugin from RoundCube plus or Kolab. See references for one possible solution.

Prerequisites

  • You have to know where Roundcube is installed. E.g.: /home/example.com/public_html/webmail
  • If your web server isn’t reporting PHP errors, you’re in for the long haul. If this procedure doesn’t work then you might get a 500 error and if the normal Apache/NGINX log doesn’t spit out the exact message you have a problem. Fixing PHP not logging errors is outside of the scope of this article but we’ve left advanced users one tip later in this article.
  • You need to know how to retrieve your MySQL credentials from the existing Roundcube
  • Elastic Skin must be selected in RoundCube
  • `apt install node-less` for the lessc compiler
  • Compiling of less assets
  • Removing of Dark mode switch in the less asset.
  • Adding a config for Calendar in the main include.

Instructions

Here are the instructions

apt install git php-sabre-*
cd /tmp
git clone https://git.kolab.org/diffusion/RPK/
[find your webmail installation] or [cd /usr/share/roundcube/plugins]
cp -r /tmp/RPK/plugins/calendar .
cp -r /tmp/RPK/plugins/libcalendaring .
cp -r /tmp/RPK/plugins/libkolab .
cd calendar [your actual new folder]
cp config.inc.php.dist config.inc.php

Edit config.inc.php to fit your needs but when we did it all defaults were good.

Config.php (in Main installation)

You have to calendar after copying the three directories as specified above:

// List of active plugins (in plugins/ directory)
$config['plugins'] = array('virtuser_file',
   'archive',
   'zipdownload',
   'calendar',
);

Edit the file mysql.initial.sql and the line that import system change to single backtick system single backtick

mysql -u root -pYOURPASSWORD roundcubedb < drivers/database/SQL/mysq.initial.sql

Caveats

Error 500

Well sorry 500 is server error so you need more granular logging. Enable PHP ini for errors. This worked for us:

ini_set('display_errors',1)

We added this to calendar.php init() function which allowed us to see that libkolab wasn’t present. So we modified the original instructions from that site to include libkolab

Patching?

The source article it refers to patching libcalendaring but to us it looked like it’s a more modern version of PHP and not needed.

Caveats

Unable to find CALDAV Url? You are not alone!

https://www.roundcubeforum.net/index.php?topic=29222.0

This most like indicates that you don’t have a CALDAV server, like WHM, who uses Apple’s CALDAV server, long ago deprecated.

Distorted Layout

Even though the calendar works, for some reason none of the list of calendar’s are showing. Please leave us a comment if you know how to fix this.

References

Share this article

5 thoughts on “How to connect RoundCube to a Calendar”

  1. Thanks for this article.
    I don’t use any database with roundcube.
    Is there a way to do so with calendar plugin?

    1. Eugène van der Merwe

      Hi @Nathan,

      I spent many hours trying to get it working. It’s too complicated. So far our ideas are:

      – Use Outlook instead (expensive)
      – Use Google Workspace
      – Use Kopano
      – Use WHM (but still lots of extra work)

  2. G. Wustenstein

    Eugene-
    I feel for you, there is no valid reason it should be this bad other than neglect. Well, I found this article after digging through layers of issues, attempted upgrades, etc., now pouring through the code and have this to say: The existing solution is a kludge at best, and built upon layers of ancient ones. While it is pretty straight-forward to extend the built-in addressbook and get cardDAV up and running with the roundcube/carddav plugin, architecture of the DAV extensions to the calendar extensions are profoundly different. One such major difference is the complete lack of configuration U/I for server and calendar URL that roundcube/carddav has from the start. In the caldav extension, the config is global, with few terse directives allowing only minimal variable substitution in the URI creation, and if you use a backend server such as radicale where calendar hashes are long and complicated you are completely out of luck. Maybe if I get some (maybe a lot) of spare time I can fork this crusty mess and patch the user config piece of cardDAV into it and make it ‘work out of the box’ on v1.6 of Roundcube like it should, at the expense of just making the mess of code even more of a mess.

  3. Eugène van der Merwe

    Hi there G. Wustenstein,

    Yep I really wish this was easier. It seems that the people who have the technology, e.g. Microsoft and Google, still don’t work well together on these issues. Since this article was written I’ve done one successful implementation of Kopano where I was about to loose the client because they urgently needed calendar sharing. However, I still have legacy infrastructure, e.g. Virtualmin, which has beautiful Roundcube but no calendars. Basically every day I’m waiting for that dreaded call of a client asking me why they can’t see their calendar on their phone and on their PC.

    With WHM I’ve since discovered it requires massive memory to work:
    > This plugin requires a minimum of 7 GB of RAM and 4 CPU cores.
    Also the instructions on setting it up makes one want to weep:
    https://docs.cpanel.net/knowledge-base/webmail/how-to-set-up-calendars-and-contacts/
    FYI the WHM solution is also based on Z-Push which is similar to what Kopano uses.

    Bit by bit we’re solving this problem but I can see how this is going to drag out for years.

Leave a Reply

Your email address will not be published.

Scroll to Top