If you want to set up your Contiki development environment on a server rather than using the Instant Contiki virtual machine, this is for you.
Follow the steps in Contiki wiki page Setup Contiki toolchain in ubuntu 13.04.
Instead of cloning the Contiki repo in the Step 3 mentioned above, you should upload the Contiki folder from the Instant Contiki VM to your server. This is because the repo is outdated somehow. I had the problem that the source file cannot be compiled using the source files in the repo.
Now you should be able to compile example files.
You may want to simulate your application using Cooja on the server, which is useful when you need to do a batch simulation without GUI.
Do the following steps to configure Cooja simulation tools on your server.
Upload all files under the contiki/tools/cooja folder from the Instant Contiki to your server.
Go to cooja directory, run ant run to compile.
Now navigate to cooja/dist folder, run ......