What a n00b!

Installing Multiple Instances of Zimbra Desktop in Linux

Yahoo! Zimbra Desktop is almost reaching full release status, but it still has one limitation: only one installation on a machine is supported. The problem lies in the fact that Zimbra Desktop uses a Jetty server for the backend application and each instance is configured to use the same port. We can hack Zimbra Desktop by changing the port from the default to another port on the system and then add another installation. This hack worked on Ubuntu 8.10 and should work on any Linux distro. I tried it on my MacBook, but Zimbra Desktop put a directory in the /Applications folder that contained prism and the installer didn't allow me to continue. I haven't tried this on Windows, but I imagine it should work in a similar way.

Disclaimer: This hack is not in any way supported by Zimbra or by the author. I am not responsible if your Zimbra Desktop data becomes unusable. Please backup your Zimbra Desktop installation before beginning if you already have data in Zimbra Desktop. Also, this hack will most likely break upgrades and have to be re-applied. A working knowledge of some Linux shell is recommended. Now that that's out of the way, let's begin.

1. Install Zimbra Desktop as normal.

Download the installer from Zimbra's website and install it as normal on the first user's account. This is the user's account that we will change the web server ports. Once Zimbra Desktop is installed, stop the Zimbra sync services from the command line:

~/zimbra/Zimbra Desktop/Zimbra Desktop stop

You can check that the services have actually been stopped by running:

ps aux | grep zimbra

2. Edit Jetty and Prism config files.

Open up a terminal window in Linux, 'cd' to the Zimbra Desktop directory (~/zimbra/Zimbra Desktop) and find all config files containing the port number:

grep -r 7633 * | grep -v logs

The output will display the file name followed by the line that contains "7633" which is the default listening port for Zimbra Desktop. You can ignore any line that says "Binary file <filename> matches". The following files should have been returned and will need to be edited:

conf/localconfig.xml jetty/etc/jetty.xml jetty/webapps/service/WEB-INF/web.xml jetty/webapps/zimbra/js/Startup1_2_all.js jetty/webapps/zimbra/js/NewWindow_2_all.js jetty/webapps/zimbra/js/zimbraMail/core/ZmZimbraMail.js Zimbra Desktop.webapp/webapp.ini

Open up each file with the editor of your choice and change the text "7633" with "7634" or some other port of your choosing. Just make sure they are all the same.

3. Start Zimbra Desktop again.

You can now start the instance for user:

~/zimbra/Zimbra Desktop/Zimbra Desktop start

If all config files have been changed, the Zimbra Desktop sync engine will start as normal. You can launch the client from the desktop shortcut, or you can connect using another browser. To get the URL to connect to, consult the file: ~/zimbra/Zimbra Desktop/Zimbra Desktop.webapp/webapp.ini and look for the line "uri=". Otherwise, you will receive an error from Jetty saying that you are unauthorized. If you receive an error, be sure to check that all files have been changed by running the grep comand at the beginning of step 2.

4. Login as second user and install.

Login as the second user that you want to install Zimbra Desktop as. You will then be able to install Zimbra Desktop as normal.

5. Rinse and repeat.

You can stop at this point if you don't have any other users or if you don't plan on doing upgrades. I haven't tested this with upgrades, but I imagine that an upgrade will return it to the normal ports. In which case the upgrade will fail and data loss could result. I would recommend repeating steps 1-3 and changing the port in step 3 to 7635 (or whatever port you should choose).

That's it! You can now have multiple users with their own Zimbra Desktop instance on your computer. Again.. this how-to is a total hack and not supported by anyone, but it worked for me. Upgrades to the software will most likely break the setup and could result in data loss. Of course you're already doing this, but be sure to run a backup before trying any upgrades to the software.


Comments powered by Disqus