Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could I execute multiple instances of Tomcat server as windows services from same physical location (CATALINA_HOME)? In other words, could I execute Tomcat windows service referred to specific server.xml (not a default location)? I know that this option is available for Tomcat execution from bat file.

share|improve this question

migrated from Jan 3 '12 at 12:52

This question came from our site for professional and enthusiast programmers.

Maybe you can just try it? – home Jan 3 '12 at 12:18
I did not succeed to do it. How I can point a Tomcat server to specific server.xml file? – user1126486 Jan 3 '12 at 13:27
Yes but each has to use a different listenning port but that is possible for sure – Kiwy Jan 8 '14 at 14:39
@Kiwy I guess that's the answer, I just didn't realize how many ports you'd need to change. There are like 4 ports that tomcat uses for each server.xml – Peter Turner Jan 8 '14 at 15:37

Yes, you can do this.

If you are using Windows you can use the official documentation:

I would recommend downloading the service.bat file associated with your windows distribution. This answer covers how to do that:

If you do not have the service.bat file, you will need to use the command line arguments for Tomcat7.exe in your bin folder. Check "Installing services" and "Updating Services" for example on how to run the executable through the command line and configure your service the way you'd like.

Most importantly, you need an instance folder (which you will set your using your CATALINA_HOME variable). Inside that, you should have a conf folder with a web.xml and a server.xml). Like Peter suggested, change the four ports specified in connectors (8080, 8005, 8009, and 8443) to something else so they do not conflict with your first installation.

share|improve this answer
We installed tomcat from the .exe and one thing I noticed is that there's a service install log file with 4 commands in it, that was totally awesomely useful for making it work in multiple instances, just copy the four lines fiddle around with the paths and install all the instances your server can handle. – Peter Turner Jan 14 '14 at 15:32

The best way to do this is with CATALINA_BASE variable, you don't want to mess around and copy binaries for each instance. Just install the base installation, then create a servers folder with your unique instances which will just contain the conf/lib/bin/logs/temp folders for each instance you need.

Each instance needs it's own port, so if using shutdown/http/ajp/JMX ports, remember to offset these.


You can look up vFabric tc server documentation which has good examples on this.

share|improve this answer

If you want to run several instance you need to use different port on every different config.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.