Jeremy Davis's picture

WebCalendar (aka k5nCal) is an open source calendar and organiser web app written in php. Similar to other web app TKLPatches I have published recently, it's actually quite easy to install yourself (on LAMP) but as I have been testing it for inhouse use at my work, I thought I'd create a TKLPatch and share the love! I think it would make a great addition to the TKL library.

It can be configured as a multi-user setup with each individual having their own calendar (with users having access to read/write/edit other's calendars or not as desired). Or it can be configured as a single-user calendar. One cool thing about it is that even with the single-user, single calendar model, multiple users can be defined so for example a secretary can add/delete/edit appointments. Secondary users such as this can have full power, or these additions can require 'master' user's approval. Full activity logs can be kept so it can be clearly seen who has done what.


I have been looking for something for use as a calendar, organiser and shift roster for my work. We need something that can be editable by all staff but each worker can easily see their own appointments and shifts (but also see what others are up to). Ideally we also want something that can be eaily printed out and/or exported (for use with other organiser software such as Outlook, Gcal and smart phone apps). In my search, this is the best one I have come across so far, so I thought I'd share.

As well as being a web app, it also has a (java based) cross platform desktop GUI (which I haven't tested yet but looks quite good).

What the patch does so far (in order):

  • Add Apache2 site "webcal-standalone" [overlay]
  • Add an amended services.txt to Confconsole output. [overlay]
  • Add webcal.sql database and custom settings.php (config file) to webroot (loaded later by conf). [overlay]
  • Sets hostname to 'webcalendar'. [conf]
  • Install  php5-gd. [conf]
  • Download and untar (then delete) current stable WebCalendar (WebCalendar 1.2.4) archive to /var/www/webcalendar. [conf]
  • Disable default apache site, enable webcal-standalone (doc root of /var/www/webcalendar). [conf]
  • Copy in customised settings.php (overwrites default). [conf]
  • Create MySQL user, create and populate database (from webcal.sql). [conf]
  • Set ownership of 'includes' folder to www-data:www-data. [conf]
  • Stop Apache2 & MySQL services (so patching finalises cleanly). [conf]
  • Clean up. [conf]

Things that ideally should be done

  • Allow default user (admin) password to be set at first boot (currently 'admin') - needs your touch Alon - again! :)
  • Create random WebCalendar MySQL password? (not sure if this is necessary but probably be better).
  • Set base appliance URL/domain on first boot (see "Additional end-user config" below). This is stored in the MySQL db unfortunately which makes it a little trickier to set up (at least for me). I think ideally it should ask for domain on first boot, with the option to leave blank and it just picks up the IP. If left as IP, it probably needs to run (in the background and update IP silently) on every boot, otherwise it won't work properly with an appliance getting IP via DHCP (which is TKL default networking behaviour).
  • Email notifications - WebCalendar has the facility to email notifications out, but I have not played with this at all yet. Ideally should be pre-configured IMO. I don't think this will require much work.
  • Install password - Not sure about this one - Similar to many webapps, by default WebCalendar has a php install script. During initial install the user is asked for a password. This seems to be because the install script is available all the time (not just the first time it runs) and from what I can gather can be used to update the app.  So I'm not sure of the best course of action here. For now all I have done is commented out the bit I put in the patch initially to change permissions on that folder. I don't think that this is reallty enough...


  • Needs the included script to set the default site URL in MySQL (or to be done manually). If this is not done you will get a 404 (site/page not found) error. Without this set, even if you type the correct IP directly into the address bar of your browser, it will redirect straight to the defined URL, which will cause error if not correct.

Additional end-user config [base URL must be set]

Admin password can be manually reset by end users from the admin area. All other settings can be found there too such as timezone, date format etc. By default it picks these up from your browser settings. These settings can be set as site default but most can be overridden by individual users (for their own preferences).

  • I have included a clunky bash script to help get you going - instruction below. Note: This will need to be set prior to first use or your site won't work!

Setting base URL:

Download the attached tarball to your patched appliance, untar, cd into the directory and edit the file 'url' (I use nano in the instructions but any commandline text editor is fine). The url can be an IP or a FQDN but it must include the 'http://' or 'https://' at the start (as appropriate) and must also be followed by a trailing slash ('/') eg '' or '' (without quotes). Then run the script. You will be required to enter your root MySQL password (that was set on first boot). Detailed  instructions are as follows:

tar xvfz update-url.tar.gz
cd update-url/
nano url # ctrl-x to save and exit
./update-url # enter MySQL root password and hit enter
# should now be good to go :)

Default Login Credentials

Username: admin
Password: admin

This patch is also hosted on GitHub here.
Precreated ISO and OVZ templates are available on the TKL Community Downloads SourceForge page here.


Add new comment