Hosting java webservice on Live server Hosting java webservice on Live server apache apache

Hosting java webservice on Live server


You can deploy your webservice in a Java cloud service like cloudbees or open shift

Cloudbees is simple and has a good free quota ( memory , disk space )

Open Shift is simple also and the deployment process is easy .. and it has a free quota also.

Open shift has good command line tools , very helpful for automatisation of deployments tasks.

There are other alternatives like Heorku.

The webservice's application will be hosted in a sub domain ( ie : xxx.cloudbess.com )

If you want to use a custom domain you have to buy it ( from godaddy for example ) and then you can use it and configure it to point to the actual host

If you want to use HTTPS .. you must generally buy a paid plan from cloud provider ( cloudbees, Open shift ... )


I wouldn't recommend using your home computer as a web server. Here are the steps it takes to get a java web app up and running exposed to the internet.

  1. Buy a domain name from a registrar
  2. Find a host provider that gives you some sort of linux VM (CentOS, Debian, RHEL, etc). Lowendbox has some cheap ones. AWS is more expensive but you'll get the same thing
  3. Modify the DNS for wherever you registered to point to the IP address of the VM you just rented.
  4. ssh to your VM and install Java, as well as all the dependencies for your application server (Tomcat, JBoss, Netty, etc) via the command line
  5. Most of these servers run at port 8080 by default, so you will need to find a way to reroute requests from 80 to 8080 (do not run your server directly on 80). Best to let Apache run on 80 and forward the requests to 8080 (dependent on the server that you run)
  6. Deploy your application