Webical appears to be working with DaviCal. Originally written to browse multiple ical calenders, there is a working Plugin that adds CalDAV functionality using the caldav4j library. Webical requires a servlet container, such as Apache Tomcat, and uses a MySQL database. There's a live working demo, here. As you can see from the demo, it's a fairly simple program, only allowing calenders in ical and caldav.
I was able to get it up and running on Ubuntu 9.04 Server which already had a basic LAMP stack by doing the following:
Satisfy Some Simple Dependencies
- Check for Java
$ java -version
- Install java if you don't have it already
$ sudo apt-get install sun-java6-jdk
- Download from Apache, extract and move Tomcat to a new directory. DO NOT USE UBUNTU'S PACKAGE IN THE REPO! It will not work in the least.
$ wget http://apache.hoxt.com/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.g $ tar xvzf apache-tomcat-6.0.18.tar.gz $ sudo mv apache-tomcat-6.0.18 /opt/tomcat
This is the current release at the time of this writing, check for newer versions.
- Edit the file
/opt/tomcat/conf/tomcat-users.xmlto something like this
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="manager"/> <role rolename="admin"/> <user username="NEW-NAME" password="NEW-PASSWORD" roles="admin,manager"/> </tomcat-users>
- Set the JAVA_HOME variable for Tomcat by editing your
~/.bashrcfile, adding the following line.
- create a startup script at
/etc/init.d/tomcatwith the following in it
# Tomcat auto-start # # description: Auto-starts tomcat # processname: tomcat # pidfile: /var/run/tomcat.pid export JAVA_HOME=/usr/lib/jvm/java-6-sun case $1 in start) sh /opt/tomcat/bin/startup.sh ;; stop) sh /opt/tomcat/bin/shutdown.sh ;; restart) sh /opt/tomcat/bin/shutdown.sh sh /opt/tomcat/bin/startup.sh ;; esac exit 0
- Make that file executable, and start at system boot.
$ sudo cmosd 775 /etc/init.d/tomcat $ sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat $ sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat
- Mysql Connector/J
- Install with the repo, and link it to Tomcat
$ sudo apt-get install libmysql-java $ sudo ln -s /usr/share/java/mysql.jar /opt/tomcat/lib/mysql.jar
Don't forget to open port 8080 in your firewall if you have one (which you should).
Now you should be able to browse to
http://example.com:8080 and be greeted by a Friendly Tomcat welcome page.
Install WebiCal and the Plugin
- Download the files from here and here and extract the WebiCal archive to any arbitrary folder, but not the plugin archive.
- Make sure you have a user webical with a password of webical that has full permissions on a database webical in MySQL. Execute the two .sql files into that database that were in the contents of the Webical archive you extracted.
- In a web-browser go to http://example.com/manager/html and log in using the username and password you entered in the tomcat-users.xml file. Under the "War file to deploy" section locate the folder you extracted Webical to, selecting the webical.war file there. Once you have done this, select deploy.
- As long as you get no errors, create these two directories
/opt/tomcat/webapps/webical/plugins /opt/tomcat/webapps/webical/plug-workand go to http://example.com:8080/webical in your browser, login in with the user webical, and password webical. You should be taken to an "initialization" page.
- Most of that page is self explanitory, but
- make sure you keep your encryption key written down
- for the value
plugin work directoyuse the folder
- for the value
plugin pathsmake a new path of
- Copy the Webical plugin .zip archive to your
/opt/tomcat/webapps/webical/plugins/directory, and go to your Tomcat manager again, selecting
reloadunder the webical entry. Once this is done go back to the calendar at http://example.com:8080/webical and login, you may have to reinitialize.
Now you can enter in your caldav url as usual as
http://example.com/caldav.php/user/homeand enter in your username and password there.
- There was a bug filed here about some funny business with DaviCal and Webical, but it seems to have been fixed(?).
- If you have issues, you may be out of luck for support, the project appears to have no activity since February of 2008. The logs in Tomcat were pretty useful to me. Check out the project homepage for more info.
- You will want to change the MySQL login information, password being the most critical. Also you can change the login for the WebiCal in the MySQL database directly.
- It appears that the only way to add users is via the database itself.
- The only way I could get my caldav test calender to add to webical successfully was to add a completely empty calender to Webical. After that, it seemed to stay in sync with the DaviCal server as I manipulated events with Evolution on my desktop.
- I have not tested this very much: I know this works as a proof of concept, having just deployed it myself and wanted to write this as such. I likely forgot things in this tutorial. This walk-through will likely eat your puppies and cause your server to turn on you, destroying your truck, your job, and your family.