Adam, you can modify the location of the ThingWorx Storage folder. Here is a link to the Help Center document on how to do so. I personally have two instances running on my local system; ThingWorx 5.4 running on Tomcat 7 (port 80) and ThingWorx 6.5 running on Tomcat 8 (port 8080), although I run only one instance at a time.
I didn't know that, but it doesn't seem to solve my problem. I can move ThingWorxStorage, but I still can't have a different location for ThingWorxStorage for different instances. It is based on a system variable - doesn't that make it fixed for both instances?
Do you have to change that environment variable before you flip from one instance to the other? If so, I still can't run more than one instance at a time on the same box.
Adam, there is an OS Env variable THINGWORX_PLATFORM_SETTINGS that drives where Tomcat will pick up the platform-settings.json and modelproviderconfig.json. These files then drive the location of the Storage and BackupStorage folders and the database connection (if you use Postgres).
For multiple independent TWX instances on the same host you'll need multiple tomcat instances running on different ports. You can drive this setting from TOMCAT_HOME/conf/server.xml . Furthermore tomcat has a nice mechanism to start up with custom OS Env params: you can simply add a sentenv.bat (or setenv.sh) to TOMCAT_HOME/bin with a content like:
and this Thingworx Tomcat instance will start up with its own platform settings.
I use this mechanism myself to run multiple versions of ThingWorx with different databases on my laptop.